User: user57 Date: 02/01/02 20:00:52 Modified: src/main/org/jboss/resource ConnectionFactoryLoaderMBean.java ConnectionManagerFactoryLoaderMBean.java RARDeployer.java Log: o migrated all components to a new JMX domain name model. jboss.system is now where to core/spine components live. moved all components that were in JBOSS-SYSTEM that did not move into a jboss.* domain into jboss (where the server is now registered). The point was to limit the members of jboss.system to core bits only. o Created org.jboss.system.Server, which does the work of initialization that org.jboss.Main used to do. Main now only parses the command line, sets up basic legecy properties and creates a Server instance. o Moved functionality of Shutdown (component not cl tool) into Server ( which is bound as jboss.system:service=Server) o Moved more Runtime access from Info into Server. Exposed memory info as attributes. o Logging a WARN everywhere that uses System.getProperty("jboss.system.home") as that should go away soon/eventually. o Initialized the invokerMap in the harmi impl to avoid NPE o Made getopt.jar a member of the lib/* dir instead of adding it to the run.jar and shutdown.jars each time. o Minor cosmetic changes along the way. Revision Changes Path 1.7 +4 -3 jbosscx/src/main/org/jboss/resource/ConnectionFactoryLoaderMBean.java Index: ConnectionFactoryLoaderMBean.java =================================================================== RCS file: /cvsroot/jboss/jbosscx/src/main/org/jboss/resource/ConnectionFactoryLoaderMBean.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- ConnectionFactoryLoaderMBean.java 2001/11/10 21:38:03 1.6 +++ ConnectionFactoryLoaderMBean.java 2002/01/03 04:00:52 1.7 @@ -4,6 +4,7 @@ * Distributable under LGPL license. * See terms of license at gnu.org. */ + package org.jboss.resource; import javax.management.ObjectName; @@ -18,19 +19,19 @@ * * @author Toby Allsopp ([EMAIL PROTECTED]) * @see RARDeployer - * @version $Revision: 1.6 $ + * @version $Revision: 1.7 $ */ public interface ConnectionFactoryLoaderMBean extends ServiceMBean { - String OBJECT_NAME = ":service=ConnectionFactoryLoader"; + String OBJECT_NAME = "jboss.jca:service=ConnectionFactoryLoader"; /** * The name of the mbean representing the resource adapter deployment. * This is the value from the <code> * display-name</code> element in its deployment descriptor becase I can't * see a better name to use, turned into an ObjectName of the form - * JCA:service=RARDeployment,name=(display-name). + * jboss.jca:service=RARDeployment,name=(display-name). * * @return The ResourceAdapterName value */ 1.6 +6 -12 jbosscx/src/main/org/jboss/resource/ConnectionManagerFactoryLoaderMBean.java Index: ConnectionManagerFactoryLoaderMBean.java =================================================================== RCS file: /cvsroot/jboss/jbosscx/src/main/org/jboss/resource/ConnectionManagerFactoryLoaderMBean.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- ConnectionManagerFactoryLoaderMBean.java 2001/11/10 21:38:03 1.5 +++ ConnectionManagerFactoryLoaderMBean.java 2002/01/03 04:00:52 1.6 @@ -9,22 +9,17 @@ import org.jboss.system.ServiceMBean; /** - * Binds a <code>ConnectionManagerFactory</code> instance into JNDI so that - * <code>ConnectionFactoryLoader</code> s can get at it. + * Binds a <code>ConnectionManagerFactory</code> instance into JNDI so that + * <code>ConnectionFactoryLoader</code> s can get at it. * * @author Toby Allsopp ([EMAIL PROTECTED]) - * @see - * @version $Revision: 1.5 $ + * @version $Revision: 1.6 $ */ public interface ConnectionManagerFactoryLoaderMBean - extends ServiceMBean + extends ServiceMBean { - // Constants ----------------------------------------------------- + String OBJECT_NAME = "jboss.jca:service=ConnectionManagerFactoryLoader"; - String OBJECT_NAME = "JCA:service=ConnectionManagerFactoryLoader"; - - // Public -------------------------------------------------------- - String getFactoryName(); void setFactoryName(String name); @@ -41,7 +36,6 @@ void setFactoryClass(String c); - //used instead of jndi binding + // used instead of jndi binding ConnectionManagerFactory getConnectionManagerFactory(); - } 1.16 +67 -93 jbosscx/src/main/org/jboss/resource/RARDeployer.java Index: RARDeployer.java =================================================================== RCS file: /cvsroot/jboss/jbosscx/src/main/org/jboss/resource/RARDeployer.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- RARDeployer.java 2001/12/18 21:06:30 1.15 +++ RARDeployer.java 2002/01/03 04:00:52 1.16 @@ -1,15 +1,12 @@ /* -* JBoss, the OpenSource J2EE webOS -* -* Distributable under LGPL license. -* See terms of license at gnu.org. -*/ -package org.jboss.resource; - - + * JBoss, the OpenSource J2EE webOS + * + * Distributable under LGPL license. + * See terms of license at gnu.org. + */ +package org.jboss.resource; -//import java.net.URLClassLoader;Replaced with org.jboss.system.URLClassLoader. import java.io.File; import java.io.FileFilter; import java.io.FileInputStream; @@ -42,75 +39,57 @@ import org.w3c.dom.Element; /** -* Service that deploys ".rar" files containing resource adapters. Deploying -* the RAR file is the first step in making the resource adapter available to -* application components; once it is deployed, one or more connection -* factories must be configured and bound into JNDI, a task performed by the -* <code>ConnectionFactoryLoader</code> service. -* -* @author Toby Allsopp ([EMAIL PROTECTED]) -* @author <a href="mailto:[EMAIL PROTECTED]">David Jencks</a> -* @version $Revision: 1.15 $ -* @see org.jboss.resource.ConnectionFactoryLoader <p> -* -* <b>Revisions:</b> <p> -* -* <b>20010725 Toby Allsopp (patch from David Jencks)</b> -* <ul> -* <li> Implemented <code>getMetaData</code> so that connection factories -* can be loaded after RAR deployment</li> -* </ul> -* <b>20011219 Marc Fleury</b> -* <ul> -* <li> Make the deployer call create and start on the service it deploys</li> -* </ul> -* -*/ + * Service that deploys ".rar" files containing resource adapters. Deploying + * the RAR file is the first step in making the resource adapter available to + * application components; once it is deployed, one or more connection + * factories must be configured and bound into JNDI, a task performed by the + * <code>ConnectionFactoryLoader</code> service. + * + * @author Toby Allsopp ([EMAIL PROTECTED]) + * @author <a href="mailto:[EMAIL PROTECTED]">David Jencks</a> + * @version $Revision: 1.16 $ + * @see org.jboss.resource.ConnectionFactoryLoader <p> + * + * <b>Revisions:</b> <p> + * + * <b>20010725 Toby Allsopp (patch from David Jencks)</b> + * <ul> + * <li> Implemented <code>getMetaData</code> so that connection factories + * can be loaded after RAR deployment</li> + * </ul> + * <b>20011219 Marc Fleury</b> + * <ul> + * <li> Make the deployer call create and start on the service it deploys</li> + * </ul> + */ public class RARDeployer -extends DeployerMBeanSupport -implements RARDeployerMBean + extends DeployerMBeanSupport + implements RARDeployerMBean { - - // Package protected --------------------------------------------- - - // Protected ----------------------------------------------------- - - // Private ------------------------------------------------------- - private static int nextNum = 0; - // Constants ----------------------------------------------------- - - // Attributes ---------------------------------------------------- - /** - * The next sequence number to be used in notifications about (un)deployment - */ + * The next sequence number to be used in notifications about (un)deployment + */ private int nextMessageNum = 0; - // Static -------------------------------------------------------- - - // Constructors -------------------------------------------------- - - // Public -------------------------------------------------------- - /** - * Gets the DeployableFilter attribute of the RARDeployer object - * - * @return The DeployableFilter value - */ + * Gets the DeployableFilter attribute of the RARDeployer object + * + * @return The DeployableFilter value + */ public FilenameFilter getDeployableFilter() { return new FilenameFilter() { /** - * #Description of the Method - * - * @param dir Description of Parameter - * @param filename Description of Parameter - * @return Description of the Returned Value - */ + * #Description of the Method + * + * @param dir Description of Parameter + * @param filename Description of Parameter + * @return Description of the Returned Value + */ public boolean accept(File dir, String filename) { return filename.endsWith(".rar"); @@ -123,10 +102,10 @@ // DeployerMBeanSupport overrides --------------------------------- /** - * Gets the Name attribute of the RARDeployer object - * - * @return The Name value - */ + * Gets the Name attribute of the RARDeployer object + * + * @return The Name value + */ public String getName() { return "RARDeployer"; @@ -134,15 +113,15 @@ /** - * The <code>deploy</code> method deploys a rar at the given url. - * - * @param url The <code>URL</code> location of the rar to deploy. - * @return an <code>Object</code> to identify this deployment. - * @exception IOException if an error occurs - * @exception DeploymentException if an error occurs - */ + * The <code>deploy</code> method deploys a rar at the given url. + * + * @param url The <code>URL</code> location of the rar to deploy. + * @return an <code>Object</code> to identify this deployment. + * @exception IOException if an error occurs + * @exception DeploymentException if an error occurs + */ protected Object deploy(URL url) - throws IOException, DeploymentException + throws IOException, DeploymentException { getLog().info("Attempting to deploy RAR at '" + url + "'"); RarDeploymentInfo rdi = new RarDeploymentInfo(url); @@ -181,17 +160,17 @@ // Ok, now we have the URLs of the JARs contained in the RAR we // can create a classloader that loads classes from them - //Note, we're using the jboss system classloader so the rar - //will be universally available without unavailable interface - //problems! - //We use the original (uncopied) url as the id key. + // Note, we're using the jboss system classloader so the rar + // will be universally available without unavailable interface + // problems! + // We use the original (uncopied) url as the id key. ClassLoader cl = rdi.createClassLoader(); metadata.setClassLoader(cl); - //set up the RARDeployment mbean for dependency management. + // set up the RARDeployment mbean for dependency management. try { - ObjectName deploymentName = new ObjectName("JCA:service=RARDeployment,name=" + metadata.getDisplayName()); + ObjectName deploymentName = new ObjectName("jboss.jca:service=RARDeployment,name=" + metadata.getDisplayName()); getServer().createMBean("org.jboss.resource.RARDeployment", deploymentName, new Object[] {metadata}, @@ -221,7 +200,7 @@ } protected void undeploy(URL url, Object o) - throws DeploymentException + throws DeploymentException { getLog().info("Undeploying RAR at '" + url + "'"); @@ -236,7 +215,7 @@ RARMetaData metadata = rdi.metadata; try { - ObjectName deploymentName = new ObjectName("JCA:service=RARDeployment,name=" + metadata.getDisplayName()); + ObjectName deploymentName = new ObjectName("jboss.jca:service=RARDeployment,name=" + metadata.getDisplayName()); log.info("About to undeploy RARDeploymentMBean, objectname: " + deploymentName); getServer().invoke(getServiceControllerName(), @@ -249,11 +228,10 @@ { log.error("Problem undeploying RARDeployment MBean", e); throw new DeploymentException("Problem undeploying RARDeployment MBean", e); - } // end of try-catch - + } - //unregister the classloader from the system libraries. - //this is the org.jboss.system.URLClassLoader. + // unregister the classloader from the system libraries. + // this is the org.jboss.system.URLClassLoader. URLClassLoader cl = (URLClassLoader)metadata.getClassLoader(); try { @@ -264,15 +242,12 @@ log.error("problem removing classloader " + cl, e); } metadata.setClassLoader(null); + // Remove the temporary copy rdi.cleanup(getLog()); } - // Inner classes ------------------------------------------------- - - /** - */ private static class RarDeploymentInfo extends ServiceDeploymentInfo { public RARMetaData metadata; @@ -283,4 +258,3 @@ } } } -
_______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development