Thread: [Ejtools-cvs] CVS: applications/management/src/main/net/sourceforge/ejtools/management/model Connect
Brought to you by:
letiemble
From: Laurent E. <let...@us...> - 2002-04-28 19:38:04
|
Update of /cvsroot/ejtools/applications/management/src/main/net/sourceforge/ejtools/management/model In directory usw-pr-cvs1:/tmp/cvs-serv16275/applications/management/src/main/net/sourceforge/ejtools/management/model Modified Files: ConnectionService.java Resource.java Log Message: Modifications to use MBeanCustomizer (to remove later) Index: ConnectionService.java =================================================================== RCS file: /cvsroot/ejtools/applications/management/src/main/net/sourceforge/ejtools/management/model/ConnectionService.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ConnectionService.java 22 Apr 2002 17:38:42 -0000 1.1 --- ConnectionService.java 28 Apr 2002 13:04:42 -0000 1.2 *************** *** 4,7 **** --- 4,8 ---- import javax.management.Attribute; import javax.management.MBeanInfo; + import javax.management.ObjectInstance; import javax.management.ObjectName; import javax.management.QueryExp; *************** *** 36,39 **** --- 37,57 ---- /** + * Description of the Method + * + * @param className Description of the Parameter + * @param name Description of the Parameter + * @param loaderName Description of the Parameter + * @param params Description of the Parameter + * @param signature Description of the Parameter + * @return Description of the Return Value + * @exception Exception Description of the Exception + */ + public ObjectInstance createMBean(String className, ObjectName name, ObjectName loaderName, Object[] params, String[] signature) throws Exception + { + return null; + } + + + /** * Gets the attribute attribute of the ConnectionService object * *************** *** 129,138 **** - // public Set queryNames(ObjectName name) throws Exception - // { - // return (getEJB().queryNames(name)); - // } - - /** * Setter for the eJBName attribute --- 147,150 ---- *************** *** 180,183 **** --- 192,206 ---- this.url = url; remote = null; + } + + + /** + * Description of the Method + * + * @param name Description of the Parameter + * @exception Exception Description of the Exception + */ + public void unregisterMBean(ObjectName name) throws Exception + { } Index: Resource.java =================================================================== RCS file: /cvsroot/ejtools/applications/management/src/main/net/sourceforge/ejtools/management/model/Resource.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Resource.java 22 Apr 2002 17:41:03 -0000 1.1 --- Resource.java 28 Apr 2002 13:04:42 -0000 1.2 *************** *** 37,40 **** --- 37,74 ---- /** + * Description of the Method + * + * @param className Description of the Parameter + * @param name Description of the Parameter + * @param loaderName Description of the Parameter + * @param params Description of the Parameter + * @param signature Description of the Parameter + * @return Description of the Return Value + */ + public ObjectInstance createMBean(String className, ObjectName name, ObjectName loaderName, Object[] params, String[] signature) + { + BeanContextServices context = (BeanContextServices) getBeanContext(); + ObjectInstance result = null; + + if (context.hasService(ConnectionService.class)) + { + try + { + ConnectionService service = (ConnectionService) context.getService(this, this, ConnectionService.class, this, this); + + result = service.createMBean(className, name, loaderName, params, signature); + + context.releaseService(this, this, ConnectionService.class); + } + catch (Exception e) + { + e.printStackTrace(); + } + } + return result; + } + + + /** * Gets the attribute attribute of the Resource object * *************** *** 107,111 **** try { ! c = new GenericMBeanCustomizer(true, this); } catch (Exception e) --- 141,145 ---- try { ! c = new GenericMBeanCustomizer(this); } catch (Exception e) *************** *** 235,238 **** --- 269,299 ---- { return (this.canonicalName == null ? "undefined" : this.canonicalName); + } + + + /** + * Description of the Method + * + * @param name Description of the Parameter + */ + public void unregisterMBean(ObjectName name) + { + BeanContextServices context = (BeanContextServices) getBeanContext(); + + if (context.hasService(ConnectionService.class)) + { + try + { + ConnectionService service = (ConnectionService) context.getService(this, this, ConnectionService.class, this, this); + + service.unregisterMBean(name); + + context.releaseService(this, this, ConnectionService.class); + } + catch (Exception e) + { + e.printStackTrace(); + } + } } } |