1 23 24 package com.sun.enterprise.management.agent; 25 26 import java.security.*; 27 import java.rmi.RemoteException ; 28 import java.util.*; 29 import java.io.ObjectInputStream ; 30 import javax.ejb.*; 31 import javax.management.*; 32 import javax.management.j2ee.*; 33 import javax.naming.*; 34 35 41 public class MEJBBean implements SessionBean { 42 private SessionContext ctx; 43 private MEJBHelper mejbHelper = null; 44 45 public void setSessionContext(SessionContext context) { 46 ctx = context; 47 } 48 49 public void ejbActivate() { 50 } 51 52 public void ejbPassivate() { 53 } 54 55 public void ejbRemove() { 56 } 57 58 public void ejbCreate() throws CreateException { 59 this.mejbHelper = MEJBHelper.getMEJBHelper(); 60 } 61 62 64 79 public Set queryNames(ObjectName name, QueryExp query) throws RemoteException { 80 try{ 81 return this.mejbHelper.queryNames(name,query); 82 }catch(Exception ex){ 83 throw new RemoteException (this.toString() +"::queryNames", ex); 84 } 85 } 86 87 92 public boolean isRegistered(ObjectName name) throws RemoteException { 93 try{ 94 return this.mejbHelper.isRegistered(name); 95 }catch(Exception ex){ 96 throw new RemoteException (this.toString() +"::isRegistered", ex); 97 } 98 } 99 100 101 public Integer getMBeanCount() throws RemoteException { 102 try{ 103 return this.mejbHelper.getMBeanCount(); 104 }catch(Exception ex){ 105 throw new RemoteException (this.toString() +"::getMBeanCount", ex); 106 } 107 } 108 109 117 public MBeanInfo getMBeanInfo(ObjectName name) throws javax.management.InstanceNotFoundException , 118 javax.management.IntrospectionException , javax.management.ReflectionException , 119 java.io.IOException , RemoteException { 120 return this.mejbHelper.getMBeanInfo(name); 121 } 122 123 135 public Object getAttribute(ObjectName name, String attribute) throws MBeanException, 136 javax.management.AttributeNotFoundException , javax.management.InstanceNotFoundException , 137 javax.management.ReflectionException , java.io.IOException , RemoteException { 138 return this.mejbHelper.getAttribute(name,attribute); 139 } 140 141 151 public javax.management.AttributeList getAttributes(ObjectName name, String [] attributes) 152 throws javax.management.InstanceNotFoundException , javax.management.ReflectionException , java.io.IOException , RemoteException { 153 return this.mejbHelper.getAttributes(name,attributes); 154 } 155 156 169 public void setAttribute(ObjectName name, javax.management.Attribute attribute) 170 throws javax.management.InstanceNotFoundException , javax.management.AttributeNotFoundException , 171 javax.management.InvalidAttributeValueException , MBeanException, 172 javax.management.ReflectionException , java.io.IOException , RemoteException { 173 this.mejbHelper.setAttribute(name,attribute); 174 } 175 176 187 public javax.management.AttributeList setAttributes(ObjectName name, javax.management.AttributeList attributes) 188 throws javax.management.InstanceNotFoundException , javax.management.ReflectionException , java.io.IOException , RemoteException { 189 return this.mejbHelper.setAttributes(name,attributes); 190 } 191 192 205 public Object invoke(ObjectName name, String operationName, Object [] params, String [] signature) 206 throws javax.management.InstanceNotFoundException , MBeanException, 207 javax.management.ReflectionException , java.io.IOException , RemoteException { 208 return this.mejbHelper.invoke(name,operationName,params,signature); 209 } 210 211 216 public String getDefaultDomain() throws java.io.IOException , RemoteException { 217 return this.mejbHelper.getDefaultDomain(); 218 } 219 220 223 224 public ListenerRegistration getListenerRegistry() throws RemoteException { 225 return this.mejbHelper.getListenerRegistry(); 226 } 227 228 } 229 | Popular Tags |