Thread: [Ejtools-cvs] applications/jndi.browser/src/main/org/ejtools/jndi/browser/web Constants.java,1.2,1.3
Brought to you by:
letiemble
|
From: <let...@us...> - 2003-11-27 01:30:33
|
Update of /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/web In directory sc8-pr-cvs1:/tmp/cvs-serv17169/jndi.browser/src/main/org/ejtools/jndi/browser/web Modified Files: Constants.java JNDIContainer.java Log Message: Address Todo #755528 Address Todo #800902 Index: Constants.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/web/Constants.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Constants.java 3 Mar 2003 20:34:48 -0000 1.2 --- Constants.java 27 Nov 2003 01:30:29 -0000 1.3 *************** *** 1,37 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.web; ! ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 28 février 2002 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public final class Constants ! { ! /** Description of the Field */ ! public final static String EJBMODULE_NAMES = "moduleNames"; ! /** Description of the Field */ ! public final static String EJBMODULE_TREE = "moduleTree"; ! /** Description of the Field */ ! public final static String EJBMODULE_TREES = "moduleTrees"; ! /** Description of the Field */ ! public final static String GLOBAL_TREE = "globalTree"; ! /** Description of the Field */ ! public final static String LOCAL_TREE = "localTree"; ! /** Description of the Field */ ! public final static String WEBAPP_TREE = "webappTree"; ! /** Description of the Field */ ! public final static String WEBAPP_TREES = "webappTrees"; ! /** Description of the Field */ ! public final static String WEBSERVER_OBJECTNAME = "jboss.web:service=WebServer"; ! } ! --- 1,37 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.web; ! ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 28 février 2002 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public final class Constants ! { ! /** Description of the Field */ ! public final static String EJBMODULE_NAMES = "moduleNames"; ! /** Description of the Field */ ! public final static String EJBMODULE_TREE = "moduleTree"; ! /** Description of the Field */ ! public final static String EJBMODULE_TREES = "moduleTrees"; ! /** Description of the Field */ ! public final static String GLOBAL_TREE = "globalTree"; ! /** Description of the Field */ ! public final static String LOCAL_TREE = "localTree"; ! /** Description of the Field */ ! public final static String WEBAPP_TREE = "webappTree"; ! /** Description of the Field */ ! public final static String WEBAPP_TREES = "webappTrees"; ! /** Description of the Field */ ! public final static String WEBSERVER_OBJECTNAME = "jboss.web:service=WebServer"; ! } ! Index: JNDIContainer.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/web/JNDIContainer.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** JNDIContainer.java 12 Feb 2003 21:24:37 -0000 1.2 --- JNDIContainer.java 27 Nov 2003 01:30:29 -0000 1.3 *************** *** 1,129 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.web; ! ! import java.beans.beancontext.BeanContextServicesSupport; ! import java.util.Collection; ! ! import org.apache.log4j.Logger; ! import org.ejtools.jndi.browser.model.Server; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 25 avril 2002 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public class JNDIContainer extends BeanContextServicesSupport ! { ! /** Description of the Field */ ! protected ClassLoader classLoader = null; ! /** Description of the Field */ ! protected Server server; ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(JNDIContainer.class); ! ! ! /** Constructor for the JMXTree object */ ! public JNDIContainer() ! { ! try ! { ! this.server = new Server(); ! this.add(this.server); ! } ! catch (Exception e) ! { ! e.printStackTrace(); ! } ! } ! ! ! /** ! * Returns the classLoader. ! * ! * @return ClassLoader ! */ ! public ClassLoader getClassLoader() ! { ! return this.classLoader; ! } ! ! ! /** ! * Gets the name attribute of the JNDIContainer object ! * ! * @return The name value ! */ ! public String getName() ! { ! return this.server.getName(); ! } ! ! ! /** ! * Getter for the server attribute ! * ! * @return The value of server attribute ! */ ! public Collection getServer() ! { ! return this.server; ! } ! ! ! /** Description of the Method */ ! public void refresh() ! { ! ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader(); ! if (currentClassLoader.equals(this.classLoader)) ! { ! this.server.refresh(); ! } ! else ! { ! Thread.currentThread().setContextClassLoader(this.classLoader); ! this.server.refresh(); ! Thread.currentThread().setContextClassLoader(currentClassLoader); ! } ! } ! ! ! /** ! * Sets the classLoader. ! * ! * @param classLoader The classLoader to set ! */ ! public void setClassLoader(ClassLoader classLoader) ! { ! this.classLoader = classLoader; ! } ! ! ! /** ! * Sets the context attribute of the JNDIContainer object ! * ! * @param context The new context value ! */ ! public void setContext(String context) ! { ! this.server.setContext(context); ! } ! ! ! /** ! * Sets the name attribute of the JNDIContainer object ! * ! * @param name The new name value ! */ ! public void setName(String name) ! { ! this.server.setName(name); ! } ! } --- 1,126 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.web; ! ! import java.beans.beancontext.BeanContextServicesSupport; ! import java.util.Collection; ! ! import org.ejtools.jndi.browser.model.Server; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 25 avril 2002 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public class JNDIContainer extends BeanContextServicesSupport ! { ! /** Description of the Field */ ! protected ClassLoader classLoader = null; ! /** Description of the Field */ ! protected Server server; ! ! ! /** Constructor for the JMXTree object */ ! public JNDIContainer() ! { ! try ! { ! this.server = new Server(); ! this.add(this.server); ! } ! catch (Exception e) ! { ! e.printStackTrace(); ! } ! } ! ! ! /** ! * Returns the classLoader. ! * ! * @return ClassLoader ! */ ! public ClassLoader getClassLoader() ! { ! return this.classLoader; ! } ! ! ! /** ! * Gets the name attribute of the JNDIContainer object ! * ! * @return The name value ! */ ! public String getName() ! { ! return this.server.getName(); ! } ! ! ! /** ! * Getter for the server attribute ! * ! * @return The value of server attribute ! */ ! public Collection getServer() ! { ! return this.server; ! } ! ! ! /** Description of the Method */ ! public void refresh() ! { ! ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader(); ! if (currentClassLoader.equals(this.classLoader)) ! { ! this.server.refresh(); ! } ! else ! { ! Thread.currentThread().setContextClassLoader(this.classLoader); ! this.server.refresh(); ! Thread.currentThread().setContextClassLoader(currentClassLoader); ! } ! } ! ! ! /** ! * Sets the classLoader. ! * ! * @param classLoader The classLoader to set ! */ ! public void setClassLoader(ClassLoader classLoader) ! { ! this.classLoader = classLoader; ! } ! ! ! /** ! * Sets the context attribute of the JNDIContainer object ! * ! * @param context The new context value ! */ ! public void setContext(String context) ! { ! this.server.setContext(context); ! } ! ! ! /** ! * Sets the name attribute of the JNDIContainer object ! * ! * @param name The new name value ! */ ! public void setName(String name) ! { ! this.server.setName(name); ! } ! } |