ejtools-cvs Mailing List for EJTools (Page 10)
Brought to you by:
letiemble
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
(471) |
May
(303) |
Jun
(176) |
Jul
(67) |
Aug
(64) |
Sep
(84) |
Oct
(148) |
Nov
(57) |
Dec
(272) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(356) |
Feb
(304) |
Mar
(214) |
Apr
(22) |
May
(7) |
Jun
(25) |
Jul
|
Aug
(5) |
Sep
(106) |
Oct
|
Nov
(95) |
Dec
(193) |
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2016 |
Jan
(2) |
Feb
(1) |
Mar
(2) |
Apr
(1) |
May
|
Jun
|
Jul
(2) |
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
From: <let...@us...> - 2003-11-27 01:30:33
|
Update of /cvsroot/ejtools/applications/jndi.browser/src/resources In directory sc8-pr-cvs1:/tmp/cvs-serv17169/jndi.browser/src/resources Modified Files: JNDIBrowser_WebResources.properties Log Message: Address Todo #755528 Address Todo #800902 Index: JNDIBrowser_WebResources.properties =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/resources/JNDIBrowser_WebResources.properties,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JNDIBrowser_WebResources.properties 8 Jan 2003 22:26:54 -0000 1.1 --- JNDIBrowser_WebResources.properties 27 Nov 2003 01:30:30 -0000 1.2 *************** *** 1,33 **** ! # ------------------------------------------------------------ ! # ! # EJTools, the Enterprise Java Tools ! # ! # Distributable under LGPL license. ! # See terms of license at www.gnu.org. ! # ! # Feedback and support at http://sourceforge.net/project/ejtools ! # ! # ------------------------------------------------------------ ! ! # Titles ! web.index.title=JNDI View ! web.detail.title=Detail View ! ! # Label ! web.label.name=Name : ! web.label.shortDescription=Description : ! web.label.viewType=View Type : ! ! # Buttons ! web.button.submit=Submit ! web.button.view=View ! web.button.refresh=Refresh ! ! # Misc. text ! web.text.namespace=Namespace ! web.text.namespace.java=java:/ ! web.text.namespace.javacomp=java:/comp ! web.text.namespace.global=Global ! web.text.namespace.ejbmodule=EJB Module ! web.text.namespace.ejb=EJB ! web.text.namespace.webapp=Web Application --- 1,33 ---- ! # ------------------------------------------------------------ ! # ! # EJTools, the Enterprise Java Tools ! # ! # Distributable under LGPL license. ! # See terms of license at www.gnu.org. ! # ! # Feedback and support at http://sourceforge.net/project/ejtools ! # ! # ------------------------------------------------------------ ! ! # Titles ! web.index.title=JNDI View ! web.detail.title=Detail View ! ! # Label ! web.label.name=Name : ! web.label.shortDescription=Description : ! web.label.viewType=View Type : ! ! # Buttons ! web.button.submit=Submit ! web.button.view=View ! web.button.refresh=Refresh ! ! # Misc. text ! web.text.namespace=Namespace ! web.text.namespace.java=java:/ ! web.text.namespace.javacomp=java:/comp ! web.text.namespace.global=Global ! web.text.namespace.ejbmodule=EJB Module ! web.text.namespace.ejb=EJB ! web.text.namespace.webapp=Web Application |
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); ! } ! } |
From: <let...@us...> - 2003-11-27 01:30:33
|
Update of /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/state/rules In directory sc8-pr-cvs1:/tmp/cvs-serv17169/jndi.browser/src/main/org/ejtools/jndi/browser/state/rules Added Files: ServerInternalFrameRule.java ServerRule.java Log Message: Address Todo #755528 Address Todo #800902 --- NEW FILE: ServerInternalFrameRule.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package org.ejtools.jndi.browser.state.rules; import java.util.Map; import org.ejtools.jndi.browser.frame.ServerInternalFrame; import org.ejtools.util.state.DefaultRule; /** * @author letiembl * @version $Revision: 1.1 $ * @created 20 juin 2003 */ public class ServerInternalFrameRule extends DefaultRule { /** * Description of the Method * * @param context Description of the Parameter */ public void loadEnter(Map context) { ServerInternalFrame frame = new ServerInternalFrame(); context.put("FRAME", frame); context.put("HOLDER", frame); } } --- NEW FILE: ServerRule.java --- /* * Created on 20 juin 2003 * * To change this generated comment go to * Window>Preferences>Java>Code Generation>Code Template */ package org.ejtools.jndi.browser.state.rules; import java.beans.beancontext.BeanContextServices; import java.util.Map; import org.ejtools.jndi.browser.frame.ServerInternalFrame; import org.ejtools.jndi.browser.model.Server; import org.ejtools.util.state.DefaultRule; import org.xml.sax.Attributes; /** * @author letiemble * @created 20 juin 2003 * @version $Revision: 1.1 $ */ public class ServerRule extends DefaultRule { /** * Description of the Method * * @param context Description of the Parameter */ public void loadEnter(Map context) { BeanContextServices container = (BeanContextServices) context.get("CONTAINER"); ServerInternalFrame frame = (ServerInternalFrame) context.get("FRAME"); Server server = new Server(); context.put("SERVER", server); frame.setServer(server); container.add(frame); Attributes attrs = (Attributes) context.get("ATTRIBUTES"); String name = attrs.getValue("name"); server.setName(name); } } |
From: <let...@us...> - 2003-11-27 01:30:33
|
Update of /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/web/taglib In directory sc8-pr-cvs1:/tmp/cvs-serv17169/jndi.browser/src/main/org/ejtools/jndi/browser/web/taglib Modified Files: ConnectTag.java TreeRendererImpl.java Log Message: Address Todo #755528 Address Todo #800902 Index: ConnectTag.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/web/taglib/ConnectTag.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ConnectTag.java 24 Feb 2003 22:32:30 -0000 1.2 --- ConnectTag.java 27 Nov 2003 01:30:30 -0000 1.3 *************** *** 1,137 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.web.taglib; ! ! import javax.servlet.ServletContext; ! import javax.servlet.jsp.JspException; ! import javax.servlet.jsp.tagext.TagSupport; ! ! import org.ejtools.jndi.browser.web.Constants; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 1 mars 2002 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @jsp:tag name="connect" ! * body-content="empty" ! */ ! public class ConnectTag extends TagSupport ! { ! /** The key of the application-scope bean we look for. */ ! private String name = Constants.GLOBAL_TREE; ! /** The page to which we should forward for the user to log on. */ ! private String page = "/refresh.do"; ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Returned Value ! * @exception JspException Description of Exception ! */ ! public int doEndTag() ! throws JspException ! { ! boolean valid = false; ! ! ServletContext context = pageContext.getServletContext(); ! ! if (context.getAttribute(name) != null) ! { ! valid = true; ! } ! ! // Forward control based on the results ! if (valid) ! { ! return (EVAL_PAGE); ! } ! else ! { ! try ! { ! pageContext.forward(page); ! } ! catch (Exception e) ! { ! throw new JspException(e.toString()); ! } ! return (SKIP_PAGE); ! } ! } ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Returned Value ! * @exception JspException Description of Exception ! */ ! public int doStartTag() ! throws JspException ! { ! return SKIP_BODY; ! } ! ! ! /** ! * Getter for the name attribute ! * ! * @return The value of name attribute ! * @jsp:attribute name="name" required="false" rtexprvalue="true" ! */ ! public String getName() ! { ! return this.name; ! } ! ! ! /** ! * Getter for the page attribute ! * ! * @return The value of page attribute ! * @jsp:attribute name="page" required="false" rtexprvalue="true" ! */ ! public String getPage() ! { ! return this.page; ! } ! ! ! /** Description of the Method */ ! public void release() ! { ! super.release(); ! this.name = Constants.GLOBAL_TREE; ! this.page = "/refresh.do"; ! } ! ! ! /** ! * Setter for the name attribute ! * ! * @param name The new value for name attribute ! */ ! public void setName(String name) ! { ! this.name = name; ! } ! ! ! /** ! * Setter for the page attribute ! * ! * @param page The new value for page attribute ! */ ! public void setPage(String page) ! { ! this.page = page; ! } ! } --- 1,137 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.web.taglib; ! ! import javax.servlet.ServletContext; ! import javax.servlet.jsp.JspException; ! import javax.servlet.jsp.tagext.TagSupport; ! ! import org.ejtools.jndi.browser.web.Constants; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 1 mars 2002 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @jsp:tag name="connect" ! * body-content="empty" ! */ ! public class ConnectTag extends TagSupport ! { ! /** The key of the application-scope bean we look for. */ ! private String name = Constants.GLOBAL_TREE; ! /** The page to which we should forward for the user to log on. */ ! private String page = "/refresh.do"; ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Returned Value ! * @exception JspException Description of Exception ! */ ! public int doEndTag() ! throws JspException ! { ! boolean valid = false; ! ! ServletContext context = pageContext.getServletContext(); ! ! if (context.getAttribute(name) != null) ! { ! valid = true; ! } ! ! // Forward control based on the results ! if (valid) ! { ! return (EVAL_PAGE); ! } ! else ! { ! try ! { ! pageContext.forward(page); ! } ! catch (Exception e) ! { ! throw new JspException(e.toString()); ! } ! return (SKIP_PAGE); ! } ! } ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Returned Value ! * @exception JspException Description of Exception ! */ ! public int doStartTag() ! throws JspException ! { ! return SKIP_BODY; ! } ! ! ! /** ! * Getter for the name attribute ! * ! * @return The value of name attribute ! * @jsp:attribute name="name" required="false" rtexprvalue="true" ! */ ! public String getName() ! { ! return this.name; ! } ! ! ! /** ! * Getter for the page attribute ! * ! * @return The value of page attribute ! * @jsp:attribute name="page" required="false" rtexprvalue="true" ! */ ! public String getPage() ! { ! return this.page; ! } ! ! ! /** Description of the Method */ ! public void release() ! { ! super.release(); ! this.name = Constants.GLOBAL_TREE; ! this.page = "/refresh.do"; ! } ! ! ! /** ! * Setter for the name attribute ! * ! * @param name The new value for name attribute ! */ ! public void setName(String name) ! { ! this.name = name; ! } ! ! ! /** ! * Setter for the page attribute ! * ! * @param page The new value for page attribute ! */ ! public void setPage(String page) ! { ! this.page = page; ! } ! } Index: TreeRendererImpl.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/web/taglib/TreeRendererImpl.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TreeRendererImpl.java 10 Feb 2003 21:18:32 -0000 1.1 --- TreeRendererImpl.java 27 Nov 2003 01:30:30 -0000 1.2 *************** *** 1,127 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.web.taglib; ! ! import java.util.Hashtable; ! ! import org.ejtools.jndi.browser.model.JNDIEntry; ! import org.ejtools.jndi.browser.model.JNDIEnvEntry; ! import org.ejtools.jndi.browser.model.JNDILinkRef; ! import org.ejtools.jndi.browser.model.Proxy; ! import org.ejtools.servlet.http.jsp.tagext.tree.TreeRenderer; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 25 avril 2002 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public class TreeRendererImpl implements TreeRenderer ! { ! /** Description of the Field */ ! protected static Hashtable icons = new Hashtable(); ! ! ! /** ! * @param o Description of the Parameter ! * @return The displayName value ! */ ! public String getDisplayName(Object o) ! { ! if (o != null) ! { ! StringBuffer buffer = new StringBuffer(); ! ! if (o instanceof JNDILinkRef) ! { ! JNDILinkRef entry = (JNDILinkRef) o; ! buffer.append(entry.getName()); ! buffer.append(" => {"); ! buffer.append(entry.getLinkName()); ! buffer.append("}"); ! ! return buffer.toString(); ! } ! if (o instanceof JNDIEnvEntry) ! { ! JNDIEnvEntry entry = (JNDIEnvEntry) o; ! buffer.append(entry.getName()); ! buffer.append(" ("); ! buffer.append(entry.getClassName()); ! buffer.append(") = "); ! buffer.append(entry.getValue()); ! ! return buffer.toString(); ! } ! if (o instanceof Proxy) ! { ! Proxy entry = (Proxy) o; ! buffer.append(entry.getName()); ! buffer.append(" ("); ! for (int i = 0; i < entry.getInterfaces().length; i++) ! { ! if (i > 0) ! { ! buffer.append(","); ! } ! buffer.append(entry.getClassName()); ! } ! buffer.append(")"); ! ! return buffer.toString(); ! } ! if (o instanceof JNDIEntry) ! { ! JNDIEntry entry = (JNDIEntry) o; ! buffer.append(entry.getName()); ! buffer.append(" ("); ! buffer.append(entry.getClassName()); ! buffer.append(")"); ! ! return buffer.toString(); ! } ! ! return o.toString(); ! } ! return null; ! } ! ! ! /** ! * Gets the icon attribute of the TreeRendererImpl object ! * ! * @param o Description of the Parameter ! * @return The icon value ! */ ! public String getIcon(Object o) ! { ! String icon = (String) icons.get(o.getClass()); ! ! if (icon == null) ! { ! icon = "images/toolbarButtonGraphics/general/File16.gif"; ! } ! return icon; ! } ! ! /** Map of the class/icons */ ! static ! { ! icons.put(org.ejtools.jndi.browser.model.JNDIContext.class, "images/toolbarButtonGraphics/general/Folder16.gif"); ! icons.put(org.ejtools.jndi.browser.model.JNDIEnvEntry.class, "images/toolbarButtonGraphics/general/File16.gif"); ! icons.put(org.ejtools.jndi.browser.model.JNDILinkRef.class, "images/toolbarButtonGraphics/general/File16.gif"); ! icons.put(org.ejtools.jndi.browser.model.ejb.EJBHomeProxy.class, "images/toolbarButtonGraphics/development/EJB16.gif"); ! icons.put(org.ejtools.jndi.browser.model.ejb.EJBLocalHomeProxy.class, "images/toolbarButtonGraphics/development/EJB16.gif"); ! icons.put(org.ejtools.jndi.browser.model.jms.QueueProxy.class, "images/toolbarButtonGraphics/development/JMSQueue16.gif"); ! icons.put(org.ejtools.jndi.browser.model.jms.TopicProxy.class, "images/toolbarButtonGraphics/development/JMSTopic16.gif"); ! icons.put(org.ejtools.jndi.browser.model.jms.ConnectionFactoryProxy.class, "images/toolbarButtonGraphics/development/Node16.gif"); ! icons.put(org.ejtools.jndi.browser.model.mail.SessionProxy.class, "images/toolbarButtonGraphics/development/JavaMailResource16.gif"); ! icons.put(org.ejtools.jndi.browser.model.sql.DataSourceProxy.class, "images/toolbarButtonGraphics/development/JDBCDataSource16.gif"); ! } ! } --- 1,127 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.web.taglib; ! ! import java.util.Hashtable; ! ! import org.ejtools.jndi.browser.model.JNDIEntry; ! import org.ejtools.jndi.browser.model.JNDIEnvEntry; ! import org.ejtools.jndi.browser.model.JNDILinkRef; ! import org.ejtools.jndi.browser.model.Proxy; ! import org.ejtools.servlet.http.jsp.tagext.tree.TreeRenderer; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 25 avril 2002 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public class TreeRendererImpl implements TreeRenderer ! { ! /** Description of the Field */ ! protected static Hashtable icons = new Hashtable(); ! ! ! /** ! * @param o Description of the Parameter ! * @return The displayName value ! */ ! public String getDisplayName(Object o) ! { ! if (o != null) ! { ! StringBuffer buffer = new StringBuffer(); ! ! if (o instanceof JNDILinkRef) ! { ! JNDILinkRef entry = (JNDILinkRef) o; ! buffer.append(entry.getName()); ! buffer.append(" => {"); ! buffer.append(entry.getLinkName()); ! buffer.append("}"); ! ! return buffer.toString(); ! } ! if (o instanceof JNDIEnvEntry) ! { ! JNDIEnvEntry entry = (JNDIEnvEntry) o; ! buffer.append(entry.getName()); ! buffer.append(" ("); ! buffer.append(entry.getClassName()); ! buffer.append(") = "); ! buffer.append(entry.getValue()); ! ! return buffer.toString(); ! } ! if (o instanceof Proxy) ! { ! Proxy entry = (Proxy) o; ! buffer.append(entry.getName()); ! buffer.append(" ("); ! for (int i = 0; i < entry.getInterfaces().length; i++) ! { ! if (i > 0) ! { ! buffer.append(","); ! } ! buffer.append(entry.getClassName()); ! } ! buffer.append(")"); ! ! return buffer.toString(); ! } ! if (o instanceof JNDIEntry) ! { ! JNDIEntry entry = (JNDIEntry) o; ! buffer.append(entry.getName()); ! buffer.append(" ("); ! buffer.append(entry.getClassName()); ! buffer.append(")"); ! ! return buffer.toString(); ! } ! ! return o.toString(); ! } ! return null; ! } ! ! ! /** ! * Gets the icon attribute of the TreeRendererImpl object ! * ! * @param o Description of the Parameter ! * @return The icon value ! */ ! public String getIcon(Object o) ! { ! String icon = (String) icons.get(o.getClass()); ! ! if (icon == null) ! { ! icon = "images/toolbarButtonGraphics/general/File16.gif"; ! } ! return icon; ! } ! ! /** Map of the class/icons */ ! static ! { ! icons.put(org.ejtools.jndi.browser.model.JNDIContext.class, "images/toolbarButtonGraphics/general/Folder16.gif"); ! icons.put(org.ejtools.jndi.browser.model.JNDIEnvEntry.class, "images/toolbarButtonGraphics/general/File16.gif"); ! icons.put(org.ejtools.jndi.browser.model.JNDILinkRef.class, "images/toolbarButtonGraphics/general/File16.gif"); ! icons.put(org.ejtools.jndi.browser.model.ejb.EJBHomeProxy.class, "images/toolbarButtonGraphics/development/EJB16.gif"); ! icons.put(org.ejtools.jndi.browser.model.ejb.EJBLocalHomeProxy.class, "images/toolbarButtonGraphics/development/EJB16.gif"); ! icons.put(org.ejtools.jndi.browser.model.jms.QueueProxy.class, "images/toolbarButtonGraphics/development/JMSQueue16.gif"); ! icons.put(org.ejtools.jndi.browser.model.jms.TopicProxy.class, "images/toolbarButtonGraphics/development/JMSTopic16.gif"); ! icons.put(org.ejtools.jndi.browser.model.jms.ConnectionFactoryProxy.class, "images/toolbarButtonGraphics/development/Node16.gif"); ! icons.put(org.ejtools.jndi.browser.model.mail.SessionProxy.class, "images/toolbarButtonGraphics/development/JavaMailResource16.gif"); ! icons.put(org.ejtools.jndi.browser.model.sql.DataSourceProxy.class, "images/toolbarButtonGraphics/development/JDBCDataSource16.gif"); ! } ! } |
Update of /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/model In directory sc8-pr-cvs1:/tmp/cvs-serv17169/jndi.browser/src/main/org/ejtools/jndi/browser/model Modified Files: JNDIContext.java JNDIEntry.java JNDIEnvEntry.java JNDILinkRef.java Proxy.java Server.java Log Message: Address Todo #755528 Address Todo #800902 Index: JNDIContext.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/model/JNDIContext.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** JNDIContext.java 12 Feb 2003 21:24:36 -0000 1.2 --- JNDIContext.java 27 Nov 2003 01:30:29 -0000 1.3 *************** *** 1,134 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model; ! ! import java.awt.Component; ! import java.beans.Customizer; ! import java.beans.beancontext.BeanContextChildComponentProxy; ! import java.util.Iterator; ! ! import org.apache.log4j.Logger; ! import org.ejtools.adwt.GenericCustomizer; ! import org.ejtools.beans.Sort; ! import org.ejtools.beans.beancontext.CustomBeanContextServicesSupport; ! ! /** ! * Ancestor of all element in the JNDI tree. Represents a JNDI Context and can contains other context. ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @javabean:class displayName="JNDI Context" ! * shortDescription="JNDI Context" ! * @javabean:icons color16="/toolbarButtonGraphics/general/Folder16.gif" ! * @javabean:property name="name" ! * class="java.lang.String" ! * displayName="Name" ! * shortDescription="Name of the context" ! */ ! public class JNDIContext extends CustomBeanContextServicesSupport implements BeanContextChildComponentProxy ! { ! /** Customizer of the JavaBean */ ! protected transient Customizer c = null; ! /** Class name of the context */ ! protected String className = ""; ! /** Name of the context */ ! protected String name = ""; ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(JNDIContext.class); ! ! ! /** Constructor for the JndiServer object */ ! public JNDIContext() ! { ! super(); ! } ! ! ! /** ! * Gets the class name of the context ! * ! * @return The class name string ! */ ! public String getClassName() ! { ! return this.className; ! } ! ! ! /** ! * Gets the JavaBean customizer of the context ! * ! * @return The customizer ! */ ! public Component getComponent() ! { ! // Lazy creation ! if (c == null) ! { ! c = new GenericCustomizer(true, this); ! } ! return (Component) c; ! } ! ! ! /** ! * Gets the name of the context ! * ! * @return The name string ! */ ! public String getName() ! { ! return this.name; ! } ! ! ! /** ! * Return the children of this context as an iterator ! * ! * @return The sorted iterator by class and by name ! */ ! public Iterator iterator() ! { ! return Sort.sortByName(super.iterator()); ! } ! ! ! /** ! * Implementation of toString() method ! * ! * @return The name of the context ! */ ! public String toString() ! { ! return name == null ? "Undefined" : name; ! } ! ! ! /** ! * Sets the class name of this context ! * ! * @param className The class name ! */ ! protected void setClassName(String className) ! { ! this.className = className; ! } ! ! ! /** ! * Sets the name of this context ! * ! * @param name The name ! */ ! protected void setName(String name) ! { ! String old = this.name; ! this.name = name; ! this.firePropertyChange("name", old, this.name); ! } ! } --- 1,131 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model; ! ! import java.awt.Component; ! import java.beans.Customizer; ! import java.beans.beancontext.BeanContextChildComponentProxy; ! import java.util.Iterator; ! ! import org.ejtools.adwt.GenericCustomizer; ! import org.ejtools.beans.Sort; ! import org.ejtools.beans.beancontext.CustomBeanContextServicesSupport; ! ! /** ! * Ancestor of all element in the JNDI tree. Represents a JNDI Context and can contains other context. ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @javabean:class displayName="JNDI Context" ! * shortDescription="JNDI Context" ! * @javabean:icons color16="/toolbarButtonGraphics/general/Folder16.gif" ! * @javabean:property name="name" ! * class="java.lang.String" ! * displayName="Name" ! * shortDescription="Name of the context" ! */ ! public class JNDIContext extends CustomBeanContextServicesSupport implements BeanContextChildComponentProxy ! { ! /** Customizer of the JavaBean */ ! protected transient Customizer c = null; ! /** Class name of the context */ ! protected String className = ""; ! /** Name of the context */ ! protected String name = ""; ! ! ! /** Constructor for the JndiServer object */ ! public JNDIContext() ! { ! super(); ! } ! ! ! /** ! * Gets the class name of the context ! * ! * @return The class name string ! */ ! public String getClassName() ! { ! return this.className; ! } ! ! ! /** ! * Gets the JavaBean customizer of the context ! * ! * @return The customizer ! */ ! public Component getComponent() ! { ! // Lazy creation ! if (c == null) ! { ! c = new GenericCustomizer(true, this); ! } ! return (Component) c; ! } ! ! ! /** ! * Gets the name of the context ! * ! * @return The name string ! */ ! public String getName() ! { ! return this.name; ! } ! ! ! /** ! * Return the children of this context as an iterator ! * ! * @return The sorted iterator by class and by name ! */ ! public Iterator iterator() ! { ! return Sort.sortByName(super.iterator()); ! } ! ! ! /** ! * Implementation of toString() method ! * ! * @return The name of the context ! */ ! public String toString() ! { ! return name == null ? "Undefined" : name; ! } ! ! ! /** ! * Sets the class name of this context ! * ! * @param className The class name ! */ ! protected void setClassName(String className) ! { ! this.className = className; ! } ! ! ! /** ! * Sets the name of this context ! * ! * @param name The name ! */ ! protected void setName(String name) ! { ! String old = this.name; ! this.name = name; ! this.firePropertyChange("name", old, this.name); ! } ! } Index: JNDIEntry.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/model/JNDIEntry.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JNDIEntry.java 10 Feb 2003 21:17:23 -0000 1.1 --- JNDIEntry.java 27 Nov 2003 01:30:29 -0000 1.2 *************** *** 1,30 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model; ! ! ! /** ! * Describe a simple JNDI entry. ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @javabean:class displayName="JNDI Entry" ! * shortDescription="JNDI Entry" ! * @javabean:icons color16="/toolbarButtonGraphics/general/File16.gif" ! * @javabean:property name="name" ! * class="java.lang.String" ! * displayName="Name" ! * shortDescription="Name of the entry" ! * @javabean:property name="className" ! * class="java.lang.String" ! * displayName="Class" ! * shortDescription="Class of the entry" ! */ ! public class JNDIEntry extends JNDIContext ! { ! } --- 1,30 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model; ! ! ! /** ! * Describe a simple JNDI entry. ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @javabean:class displayName="JNDI Entry" ! * shortDescription="JNDI Entry" ! * @javabean:icons color16="/toolbarButtonGraphics/general/File16.gif" ! * @javabean:property name="name" ! * class="java.lang.String" ! * displayName="Name" ! * shortDescription="Name of the entry" ! * @javabean:property name="className" ! * class="java.lang.String" ! * displayName="Class" ! * shortDescription="Class of the entry" ! */ ! public class JNDIEntry extends JNDIContext ! { ! } Index: JNDIEnvEntry.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/model/JNDIEnvEntry.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JNDIEnvEntry.java 10 Feb 2003 21:17:23 -0000 1.1 --- JNDIEnvEntry.java 27 Nov 2003 01:30:29 -0000 1.2 *************** *** 1,79 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model; ! ! import javax.naming.Context; ! ! ! /** ! * Describe a environment entry. ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @javabean:class displayName="JNDI Entry" ! * shortDescription="JNDI Entry" ! * @javabean:icons color16="/toolbarButtonGraphics/general/File16.gif" ! * @javabean:property name="name" ! * class="java.lang.String" ! * displayName="Name" ! * shortDescription="Name of the entry" ! * @javabean:property name="className" ! * class="java.lang.String" ! * displayName="Class" ! * shortDescription="Class of the entry" ! * @javabean:property name="value" ! * class="java.lang.String" ! * displayName="Value" ! * shortDescription="Value of the environment entry" ! */ ! public class JNDIEnvEntry extends JNDIContext ! { ! /** Description of the Field */ ! protected Object value = null; ! ! ! /** ! * Constructor for the JNDILinkRef object ! * ! * @param context Description of the Parameter ! * @param jndiName Description of the Parameter ! * @exception Exception Description of the Exception ! */ ! public JNDIEnvEntry(Context context, String jndiName) ! throws Exception ! { ! Object o = context.lookup(jndiName); ! ! Class clazz = o.getClass(); ! if (clazz.getName().startsWith("java.lang.")) ! { ! this.value = o; ! } ! if (clazz.equals(java.net.URL.class)) ! { ! this.value = o; ! } ! if (this.value == null) ! { ! throw new Exception("This object is not a valid environment entry"); ! } ! this.setName(jndiName); ! this.setClassName(clazz.getName()); ! } ! ! ! /** ! * Gets the value attribute of the JNDIEnvEntry object ! * ! * @return The value value ! */ ! public String getValue() ! { ! return this.value.toString(); ! } ! } --- 1,79 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model; ! ! import javax.naming.Context; ! ! ! /** ! * Describe a environment entry. ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @javabean:class displayName="JNDI Entry" ! * shortDescription="JNDI Entry" ! * @javabean:icons color16="/toolbarButtonGraphics/general/File16.gif" ! * @javabean:property name="name" ! * class="java.lang.String" ! * displayName="Name" ! * shortDescription="Name of the entry" ! * @javabean:property name="className" ! * class="java.lang.String" ! * displayName="Class" ! * shortDescription="Class of the entry" ! * @javabean:property name="value" ! * class="java.lang.String" ! * displayName="Value" ! * shortDescription="Value of the environment entry" ! */ ! public class JNDIEnvEntry extends JNDIContext ! { ! /** Description of the Field */ ! protected Object value = null; ! ! ! /** ! * Constructor for the JNDILinkRef object ! * ! * @param context Description of the Parameter ! * @param jndiName Description of the Parameter ! * @exception Exception Description of the Exception ! */ ! public JNDIEnvEntry(Context context, String jndiName) ! throws Exception ! { ! Object o = context.lookup(jndiName); ! ! Class clazz = o.getClass(); ! if (clazz.getName().startsWith("java.lang.")) ! { ! this.value = o; ! } ! if (clazz.equals(java.net.URL.class)) ! { ! this.value = o; ! } ! if (this.value == null) ! { ! throw new Exception("This object is not a valid environment entry"); ! } ! this.setName(jndiName); ! this.setClassName(clazz.getName()); ! } ! ! ! /** ! * Gets the value attribute of the JNDIEnvEntry object ! * ! * @return The value value ! */ ! public String getValue() ! { ! return this.value.toString(); ! } ! } Index: JNDILinkRef.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/model/JNDILinkRef.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** JNDILinkRef.java 24 Feb 2003 22:32:12 -0000 1.2 --- JNDILinkRef.java 27 Nov 2003 01:30:29 -0000 1.3 *************** *** 1,84 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model; ! ! import javax.naming.Context; ! import javax.naming.LinkRef; ! ! ! /** ! * Describe a simple JNDI Link Reference. ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @javabean:class displayName="JNDI LinkRef" ! * shortDescription="JNDI Link Reference" ! * @javabean:icons color16="/toolbarButtonGraphics/general/File16.gif" ! * @javabean:property name="name" ! * class="java.lang.String" ! * displayName="Name" ! * shortDescription="Name of the entry" ! * @javabean:property name="className" ! * class="java.lang.String" ! * displayName="Class" ! * shortDescription="Class of the entry" ! * @javabean:property name="linkName" ! * class="java.lang.String" ! * displayName="Link Reference" ! * shortDescription="Link Reference" ! */ ! public class JNDILinkRef extends JNDIEntry ! { ! /** Class name of the context */ ! protected String linkName = ""; ! /** Description of the Field */ ! protected LinkRef ref; ! ! ! /** ! * Constructor for the JNDILinkRef object ! * ! * @param context Description of the Parameter ! * @param jndiName Description of the Parameter ! * @exception Exception Description of the Exception ! */ ! public JNDILinkRef(Context context, String jndiName) ! throws Exception ! { ! this.setName(jndiName); ! ! Object o = context.lookupLink(jndiName); ! this.setClassName(o.getClass().getName()); ! ! ref = (LinkRef) o; ! this.setLinkName(ref.getLinkName()); ! } ! ! ! /** ! * Gets the linkName attribute of the JNDILinkRef object ! * ! * @return The linkName value ! */ ! public String getLinkName() ! { ! return this.linkName; ! } ! ! ! /** ! * Sets the linkName attribute of the JNDILinkRef object ! * ! * @param linkName The new linkName value ! */ ! protected void setLinkName(String linkName) ! { ! this.linkName = linkName; ! } ! } --- 1,84 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model; ! ! import javax.naming.Context; ! import javax.naming.LinkRef; ! ! ! /** ! * Describe a simple JNDI Link Reference. ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @javabean:class displayName="JNDI LinkRef" ! * shortDescription="JNDI Link Reference" ! * @javabean:icons color16="/toolbarButtonGraphics/general/File16.gif" ! * @javabean:property name="name" ! * class="java.lang.String" ! * displayName="Name" ! * shortDescription="Name of the entry" ! * @javabean:property name="className" ! * class="java.lang.String" ! * displayName="Class" ! * shortDescription="Class of the entry" ! * @javabean:property name="linkName" ! * class="java.lang.String" ! * displayName="Link Reference" ! * shortDescription="Link Reference" ! */ ! public class JNDILinkRef extends JNDIEntry ! { ! /** Class name of the context */ ! protected String linkName = ""; ! /** Description of the Field */ ! protected LinkRef ref; ! ! ! /** ! * Constructor for the JNDILinkRef object ! * ! * @param context Description of the Parameter ! * @param jndiName Description of the Parameter ! * @exception Exception Description of the Exception ! */ ! public JNDILinkRef(Context context, String jndiName) ! throws Exception ! { ! this.setName(jndiName); ! ! Object o = context.lookupLink(jndiName); ! this.setClassName(o.getClass().getName()); ! ! ref = (LinkRef) o; ! this.setLinkName(ref.getLinkName()); ! } ! ! ! /** ! * Gets the linkName attribute of the JNDILinkRef object ! * ! * @return The linkName value ! */ ! public String getLinkName() ! { ! return this.linkName; ! } ! ! ! /** ! * Sets the linkName attribute of the JNDILinkRef object ! * ! * @param linkName The new linkName value ! */ ! protected void setLinkName(String linkName) ! { ! this.linkName = linkName; ! } ! } Index: Proxy.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/model/Proxy.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Proxy.java 24 Feb 2003 22:32:12 -0000 1.2 --- Proxy.java 27 Nov 2003 01:30:29 -0000 1.3 *************** *** 1,85 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model; ! ! import javax.naming.Context; ! ! ! /** ! * Describe a Proyx entry. ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @javabean:class displayName="Proxy Class" ! * shortDescription="Proxy Class" ! * @javabean:icons color16="/toolbarButtonGraphics/general/File16.gif" ! * @javabean:property name="name" ! * class="java.lang.String" ! * displayName="Name" ! * shortDescription="Name of the entry" ! * @javabean:property name="className" ! * class="java.lang.String" ! * displayName="Class" ! * shortDescription="Class of the entry" ! * @javabean:property name="interfaces" ! * class="java.lang.Class" ! * displayName="Interfaces" ! * shortDescription="Interfaces implemented by this proxy" ! */ ! public class Proxy extends JNDIEntry ! { ! /** Description of the Field */ ! protected Object proxy = null; ! ! ! /** ! * Constructor for the JNDILinkRef object ! * ! * @param context Description of the Parameter ! * @param jndiName Description of the Parameter ! * @exception Exception Description of the Exception ! */ ! public Proxy(Context context, String jndiName) ! throws Exception ! { ! Object o = context.lookup(jndiName); ! Class clazz = o.getClass(); ! ! if (java.lang.reflect.Proxy.isProxyClass(clazz)) ! { ! proxy = o; ! } ! else ! { ! if (clazz.getName().startsWith("$Proxy")) ! { ! proxy = o; ! } ! } ! ! if (proxy == null) ! { ! throw new Exception("This object is not a proxy"); ! } ! ! this.setName(jndiName); ! this.setClassName(clazz.getName()); ! } ! ! ! /** ! * Gets the linkName attribute of the JNDILinkRef object ! * ! * @return The linkName value ! */ ! public Class[] getInterfaces() ! { ! return proxy.getClass().getInterfaces(); ! } ! } --- 1,85 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model; ! ! import javax.naming.Context; ! ! ! /** ! * Describe a Proyx entry. ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @javabean:class displayName="Proxy Class" ! * shortDescription="Proxy Class" ! * @javabean:icons color16="/toolbarButtonGraphics/general/File16.gif" ! * @javabean:property name="name" ! * class="java.lang.String" ! * displayName="Name" ! * shortDescription="Name of the entry" ! * @javabean:property name="className" ! * class="java.lang.String" ! * displayName="Class" ! * shortDescription="Class of the entry" ! * @javabean:property name="interfaces" ! * class="java.lang.Class" ! * displayName="Interfaces" ! * shortDescription="Interfaces implemented by this proxy" ! */ ! public class Proxy extends JNDIEntry ! { ! /** Description of the Field */ ! protected Object proxy = null; ! ! ! /** ! * Constructor for the JNDILinkRef object ! * ! * @param context Description of the Parameter ! * @param jndiName Description of the Parameter ! * @exception Exception Description of the Exception ! */ ! public Proxy(Context context, String jndiName) ! throws Exception ! { ! Object o = context.lookup(jndiName); ! Class clazz = o.getClass(); ! ! if (java.lang.reflect.Proxy.isProxyClass(clazz)) ! { ! proxy = o; ! } ! else ! { ! if (clazz.getName().startsWith("$Proxy")) ! { ! proxy = o; ! } ! } ! ! if (proxy == null) ! { ! throw new Exception("This object is not a proxy"); ! } ! ! this.setName(jndiName); ! this.setClassName(clazz.getName()); ! } ! ! ! /** ! * Gets the linkName attribute of the JNDILinkRef object ! * ! * @return The linkName value ! */ ! public Class[] getInterfaces() ! { ! return proxy.getClass().getInterfaces(); ! } ! } Index: Server.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/model/Server.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Server.java 3 Mar 2003 20:34:32 -0000 1.2 --- Server.java 27 Nov 2003 01:30:29 -0000 1.3 *************** *** 1,444 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model; ! ! import java.lang.reflect.Constructor; ! import java.util.Collection; ! import java.util.Iterator; ! import java.util.Properties; ! import java.util.ResourceBundle; ! import java.util.Vector; ! ! import javax.naming.Context; ! import javax.naming.InitialContext; ! import javax.naming.LinkRef; ! import javax.naming.NameClassPair; ! import javax.naming.NamingEnumeration; ! import javax.naming.NamingException; ! ! import org.apache.log4j.Logger; ! import org.ejtools.jndi.browser.model.service.ConnectionMetaData; ! import org.ejtools.util.service.Profile; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @todo Add log4j logs ! * @javabean:class displayName="JNDI Server" ! * shortDescription="JNDI Server" ! * @javabean:icons color16="/toolbarButtonGraphics/development/Server16.gif" ! * @javabean:property name="name" ! * class="java.lang.String" ! * displayName="Connection" ! * shortDescription="Connection Name" ! * @javabean:property name="factory" ! * class="java.lang.String" ! * displayName="Factory" ! * shortDescription="JNDI context factory" ! * @javabean:property name="packages" ! * class="java.lang.String" ! * displayName="Packages" ! * shortDescription="Packages for context" ! * @javabean:property name="url" ! * class="java.lang.String" ! * displayName="URL" ! * shortDescription="JNDI Server URL" ! * @javabean:property name="context" ! * class="java.lang.String" ! * displayName="Context" ! * shortDescription="Initial JNDI context" ! * @javabean:property name="principal" ! * class="java.lang.String" ! * displayName="Principal" ! * shortDescription="Principal to connect" ! * @javabean:property name="credentials" ! * class="java.lang.String" ! * displayName="Credentials" ! * shortDescription="Credentials to connect" ! */ ! public class Server extends JNDIContext ! { ! /** Description of the Field */ ! protected Profile profile = new Profile(); ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(Server.class); ! /** Description of the Field */ ! private static Vector proxies = new Vector(); ! /** Bundle for I18N */ ! private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.jndi.browser.Resources"); ! ! ! /** ! * Constructor for the JndiServer object ! * ! * @todo I18N to complete ! */ ! public Server() ! { ! super(); ! this.setName(resources.getString("connection.text.untitled")); ! } ! ! ! /** ! * Gets the context attribute of the JNDIServer object ! * ! * @return The context value ! */ ! public String getContext() ! { ! return this.profile.getProperty(ConnectionMetaData.CONTEXT); ! } ! ! ! /** ! * Returns the credentials. ! * ! * @return String ! */ ! public String getCredentials() ! { ! return this.profile.getProperty(ConnectionMetaData.CREDENTIALS); ! } ! ! ! /** ! * Gets the provider attribute of the JndiServer object ! * ! * @return The provider value ! */ ! public String getFactory() ! { ! return this.profile.getProperty(ConnectionMetaData.FACTORY); ! } ! ! ! /** ! * Gets the packages attribute of the JndiServer object ! * ! * @return The packages value ! */ ! public String getPackages() ! { ! return this.profile.getProperty(ConnectionMetaData.PACKAGES); ! } ! ! ! ! /** ! * Returns the principal. ! * ! * @return String ! */ ! public String getPrincipal() ! { ! return this.profile.getProperty(ConnectionMetaData.PRINCIPAL); ! } ! ! ! /** ! * Gets the url attribute of the JndiServer object ! * ! * @return The url value ! */ ! public String getUrl() ! { ! return this.profile.getProperty(ConnectionMetaData.URL); ! } ! ! ! /** ! * Description of the Method ! * ! * @javabean:method name="refresh" displayName="Refresh" shortDescription="Refresh the JNDI tree" ! */ ! public void refresh() ! { ! logger.debug("Cleaning JNDI tree..."); ! Iterator iterator = iterator(); ! while (iterator.hasNext()) ! { ! remove(iterator.next()); ! } ! ! try ! { ! Context context = null; ! if (this.getFactory() != null) ! { ! Properties props = new Properties(); ! props.put(Context.INITIAL_CONTEXT_FACTORY, this.getFactory()); ! props.put(Context.URL_PKG_PREFIXES, this.getPackages()); ! props.put(Context.PROVIDER_URL, this.getUrl()); ! logger.debug("Initial context with " + props); ! context = new InitialContext(props); ! } ! else ! { ! context = new InitialContext(); ! } ! ! if (!("".equals(this.getContext()))) ! { ! logger.debug("Context =<" + this.getContext() + ">"); ! context = (Context) context.lookup(this.getContext()); ! } ! ! logger.debug("Populating JNDI tree..."); ! this.list(context, this); ! } ! catch (Exception e) ! { ! e.printStackTrace(); ! logger.error("Exception " + e.getMessage()); ! } ! } ! ! ! /** ! * Sets the context attribute of the JNDIServer object ! * ! * @param context The new context value ! */ ! public void setContext(String context) ! { ! this.profile.setProperty(ConnectionMetaData.CONTEXT, context); ! } ! ! ! ! /** ! * Sets the credentials. ! * ! * @param credentials The credentials to set ! */ ! public void setCredentials(String credentials) ! { ! this.profile.setProperty(ConnectionMetaData.CREDENTIALS, credentials); ! } ! ! ! /** ! * Sets the provider attribute of the JndiServer object ! * ! * @param factory The new factory value ! */ ! public void setFactory(String factory) ! { ! this.profile.setProperty(ConnectionMetaData.FACTORY, factory); ! } ! ! ! /** ! * Sets the name of this server ! * ! * @param name The name ! */ ! public void setName(String name) ! { ! super.setName(name); ! } ! ! ! /** ! * Sets the packages attribute of the JndiServer object ! * ! * @param packages The new packages value ! */ ! public void setPackages(String packages) ! { ! this.profile.setProperty(ConnectionMetaData.PACKAGES, packages); ! } ! ! ! ! /** ! * Sets the principal. ! * ! * @param principal The principal to set ! */ ! public void setPrincipal(String principal) ! { ! this.profile.setProperty(ConnectionMetaData.PRINCIPAL, principal); ! } ! ! ! /** ! * Sets the profile. ! * ! * @param profile The profile to set ! */ ! public void setProfile(Profile profile) ! { ! this.profile = profile; ! } ! ! ! /** ! * Sets the url attribute of the JndiServer object ! * ! * @param url The new url value ! */ ! public void setUrl(String url) ! { ! this.profile.setProperty(ConnectionMetaData.URL, url); ! } ! ! ! /** ! * Description of the Method ! * ! * @param context Description of the Parameter ! * @param jndiName Description of the Parameter ! * @return Description of the Return Value ! */ ! protected JNDIContext createNode(Context context, String jndiName) ! { ! for (int i = 0; i < proxies.size(); i++) ! { ! Class clazz = (Class) proxies.elementAt(i); ! ! try ! { ! Constructor c = clazz.getConstructor(new Class[]{javax.naming.Context.class, java.lang.String.class}); ! JNDIContext node = (JNDIContext) c.newInstance(new Object[]{context, jndiName}); ! if (node != null) ! { ! return node; ! } ! } ! catch (Exception e) ! { ! } ! } ! ! return null; ! } ! ! ! /** ! * Description of the Method ! * ! * @param ctx Description of the Parameter ! * @param node Description of the Parameter ! */ ! protected void list(Context ctx, Collection node) ! { ! ClassLoader loader = Thread.currentThread().getContextClassLoader(); ! try ! { ! NamingEnumeration ne = ctx.list(""); ! while (ne.hasMore()) ! { ! JNDIContext newNode = null; ! ! NameClassPair pair = (NameClassPair) ne.next(); ! ! String name = pair.getName(); ! String className = pair.getClassName(); ! boolean recursive = false; ! boolean isLinkRef = false; ! ! Class c = null; ! try ! { ! c = loader.loadClass(className); ! ! if (Context.class.isAssignableFrom(c)) ! { ! recursive = true; ! } ! if (LinkRef.class.isAssignableFrom(c)) ! { ! isLinkRef = true; ! } ! } ! catch (ClassNotFoundException cnfe) ! { ! logger.warn("ClassNotFoundException " + cnfe.getMessage()); ! } ! catch (Exception e) ! { ! logger.warn("Exception " + e.getMessage()); ! } ! ! if (isLinkRef) ! { ! try ! { ! newNode = new JNDILinkRef(ctx, name); ! node.add(newNode); ! } ! catch (Exception e) ! { ! } ! } ! ! if (recursive) ! { ! newNode = new JNDIContext(); ! newNode.setName(name); ! newNode.setClassName(className); ! ! try ! { ! Object value = ctx.lookup(name); ! ! if (value instanceof Context) ! { ! Context subctx = (Context) value; ! list(subctx, newNode); ! } ! } ! catch (Throwable t) ! { ! logger.warn("Throwable " + t); ! } ! } ! ! // Try to cast to a predefined object ! if (newNode == null) ! { ! newNode = createNode(ctx, name); ! } ! ! // If no match, create a JNDIEntry ! if (newNode == null) ! { ! newNode = new JNDIEntry(); ! newNode.setName(name); ! newNode.setClassName(className); ! } ! ! node.add(newNode); ! } ! ne.close(); ! } ! catch (NamingException ne) ! { ! logger.error("error while listing context " + ctx.toString() + ": " + ne.toString(true)); ! } ! } ! ! /** Proxies to load */ ! static ! { ! proxies.add(org.ejtools.jndi.browser.model.JNDIEnvEntry.class); ! proxies.add(org.ejtools.jndi.browser.model.ejb.EJBHomeProxy.class); ! proxies.add(org.ejtools.jndi.browser.model.ejb.EJBLocalHomeProxy.class); ! proxies.add(org.ejtools.jndi.browser.model.jms.QueueProxy.class); ! proxies.add(org.ejtools.jndi.browser.model.jms.TopicProxy.class); ! proxies.add(org.ejtools.jndi.browser.model.jms.ConnectionFactoryProxy.class); ! proxies.add(org.ejtools.jndi.browser.model.mail.SessionProxy.class); ! proxies.add(org.ejtools.jndi.browser.model.sql.DataSourceProxy.class); ! proxies.add(org.ejtools.jndi.browser.model.Proxy.class); ! } ! } --- 1,445 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model; ! ! import java.lang.reflect.Constructor; ! import java.util.Collection; ! import java.util.Iterator; ! import java.util.Properties; ! import java.util.ResourceBundle; ! import java.util.Vector; ! ! import javax.naming.Context; ! import javax.naming.InitialContext; ! import javax.naming.LinkRef; ! import javax.naming.NameClassPair; ! import javax.naming.NamingEnumeration; ! import javax.naming.NamingException; ! ! import org.apache.log4j.Logger; ! import org.ejtools.jndi.browser.model.service.ConnectionMetaData; ! import org.ejtools.util.service.Profile; ! import org.ejtools.util.service.ProfileHolder; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 13 d?cembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @todo Add log4j logs ! * @javabean:class displayName="JNDI Server" ! * shortDescription="JNDI Server" ! * @javabean:icons color16="/toolbarButtonGraphics/development/Server16.gif" ! * @javabean:property name="name" ! * class="java.lang.String" ! * displayName="Connection" ! * shortDescription="Connection Name" ! * @javabean:property name="factory" ! * class="java.lang.String" ! * displayName="Factory" ! * shortDescription="JNDI context factory" ! * @javabean:property name="packages" ! * class="java.lang.String" ! * displayName="Packages" ! * shortDescription="Packages for context" ! * @javabean:property name="url" ! * class="java.lang.String" ! * displayName="URL" ! * shortDescription="JNDI Server URL" ! * @javabean:property name="context" ! * class="java.lang.String" ! * displayName="Context" ! * shortDescription="Initial JNDI context" ! * @javabean:property name="principal" ! * class="java.lang.String" ! * displayName="Principal" ! * shortDescription="Principal to connect" ! * @javabean:property name="credentials" ! * class="java.lang.String" ! * displayName="Credentials" ! * shortDescription="Credentials to connect" ! */ ! public class Server extends JNDIContext implements ProfileHolder ! { ! /** Description of the Field */ ! protected Profile profile = new Profile(); ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(Server.class); ! /** Description of the Field */ ! private static Vector proxies = new Vector(); ! /** Bundle for I18N */ ! private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.jndi.browser.Resources"); ! ! ! /** ! * Constructor for the JndiServer object ! * ! * @todo I18N to complete ! */ ! public Server() ! { ! super(); ! this.setName(resources.getString("connection.text.untitled")); ! } ! ! ! /** ! * Gets the context attribute of the JNDIServer object ! * ! * @return The context value ! */ ! public String getContext() ! { ! return this.profile.getProperty(ConnectionMetaData.CONTEXT); ! } ! ! ! /** ! * Returns the credentials. ! * ! * @return String ! */ ! public String getCredentials() ! { ! return this.profile.getProperty(ConnectionMetaData.CREDENTIALS); ! } ! ! ! /** ! * Gets the provider attribute of the JndiServer object ! * ! * @return The provider value ! */ ! public String getFactory() ! { ! return this.profile.getProperty(ConnectionMetaData.FACTORY); ! } ! ! ! /** ! * Gets the packages attribute of the JndiServer object ! * ! * @return The packages value ! */ ! public String getPackages() ! { ! return this.profile.getProperty(ConnectionMetaData.PACKAGES); ! } ! ! ! ! /** ! * Returns the principal. ! * ! * @return String ! */ ! public String getPrincipal() ! { ! return this.profile.getProperty(ConnectionMetaData.PRINCIPAL); ! } ! ! ! /** ! * Gets the url attribute of the JndiServer object ! * ! * @return The url value ! */ ! public String getUrl() ! { ! return this.profile.getProperty(ConnectionMetaData.URL); ! } ! ! ! /** ! * Description of the Method ! * ! * @javabean:method name="refresh" displayName="Refresh" shortDescription="Refresh the JNDI tree" ! */ ! public void refresh() ! { ! logger.debug("Cleaning JNDI tree..."); ! Iterator iterator = iterator(); ! while (iterator.hasNext()) ! { ! remove(iterator.next()); ! } ! ! try ! { ! Context context = null; ! if (this.getFactory() != null) ! { ! Properties props = new Properties(); ! props.put(Context.INITIAL_CONTEXT_FACTORY, this.getFactory()); ! props.put(Context.URL_PKG_PREFIXES, this.getPackages()); ! props.put(Context.PROVIDER_URL, this.getUrl()); ! logger.debug("Initial context with " + props); ! context = new InitialContext(props); ! } ! else ! { ! context = new InitialContext(); ! } ! ! if (!("".equals(this.getContext()))) ! { ! logger.debug("Context =<" + this.getContext() + ">"); ! context = (Context) context.lookup(this.getContext()); ! } ! ! logger.debug("Populating JNDI tree..."); ! this.list(context, this); ! } ! catch (Exception e) ! { ! e.printStackTrace(); ! logger.error("Exception " + e.getMessage()); ! } ! } ! ! ! /** ! * Sets the context attribute of the JNDIServer object ! * ! * @param context The new context value ! */ ! public void setContext(String context) ! { ! this.profile.setProperty(ConnectionMetaData.CONTEXT, context); ! } ! ! ! ! /** ! * Sets the credentials. ! * ! * @param credentials The credentials to set ! */ ! public void setCredentials(String credentials) ! { ! this.profile.setProperty(ConnectionMetaData.CREDENTIALS, credentials); ! } ! ! ! /** ! * Sets the provider attribute of the JndiServer object ! * ! * @param factory The new factory value ! */ ! public void setFactory(String factory) ! { ! this.profile.setProperty(ConnectionMetaData.FACTORY, factory); ! } ! ! ! /** ! * Sets the name of this server ! * ! * @param name The name ! */ ! public void setName(String name) ! { ! super.setName(name); ! } ! ! ! /** ! * Sets the packages attribute of the JndiServer object ! * ! * @param packages The new packages value ! */ ! public void setPackages(String packages) ! { ! this.profile.setProperty(ConnectionMetaData.PACKAGES, packages); ! } ! ! ! ! /** ! * Sets the principal. ! * ! * @param principal The principal to set ! */ ! public void setPrincipal(String principal) ! { ! this.profile.setProperty(ConnectionMetaData.PRINCIPAL, principal); ! } ! ! ! /** ! * Sets the profile. ! * ! * @param profile The profile to set ! */ ! public void setProfile(Profile profile) ! { ! this.profile = profile; ! } ! ! ! /** ! * Sets the url attribute of the JndiServer object ! * ! * @param url The new url value ! */ ! public void setUrl(String url) ! { ! this.profile.setProperty(ConnectionMetaData.URL, url); ! } ! ! ! /** ! * Description of the Method ! * ! * @param context Description of the Parameter ! * @param jndiName Description of the Parameter ! * @return Description of the Return Value ! */ ! protected JNDIContext createNode(Context context, String jndiName) ! { ! for (int i = 0; i < proxies.size(); i++) ! { ! Class clazz = (Class) proxies.elementAt(i); ! ! try ! { ! Constructor c = clazz.getConstructor(new Class[]{javax.naming.Context.class, java.lang.String.class}); ! JNDIContext node = (JNDIContext) c.newInstance(new Object[]{context, jndiName}); ! if (node != null) ! { ! return node; ! } ! } ! catch (Exception e) ! { ! } ! } ! ! return null; ! } ! ! ! /** ! * Description of the Method ! * ! * @param ctx Description of the Parameter ! * @param node Description of the Parameter ! */ ! protected void list(Context ctx, Collection node) ! { ! ClassLoader loader = Thread.currentThread().getContextClassLoader(); ! try ! { ! NamingEnumeration ne = ctx.list(""); ! while (ne.hasMore()) ! { ! JNDIContext newNode = null; ! ! NameClassPair pair = (NameClassPair) ne.next(); ! ! String name = pair.getName(); ! String className = pair.getClassName(); ! boolean recursive = false; ! boolean isLinkRef = false; ! ! Class c = null; ! try ! { ! c = loader.loadClass(className); ! ! if (Context.class.isAssignableFrom(c)) ! { ! recursive = true; ! } ! if (LinkRef.class.isAssignableFrom(c)) ! { ! isLinkRef = true; ! } ! } ! catch (ClassNotFoundException cnfe) ! { ! logger.warn("ClassNotFoundException " + cnfe.getMessage()); ! } ! catch (Exception e) ! { ! logger.warn("Exception " + e.getMessage()); ! } ! ! if (isLinkRef) ! { ! try ! { ! newNode = new JNDILinkRef(ctx, name); ! node.add(newNode); ! } ! catch (Exception e) ! { ! } ! } ! ! if (recursive) ! { ! newNode = new JNDIContext(); ! newNode.setName(name); ! newNode.setClassName(className); ! ! try ! { ! Object value = ctx.lookup(name); ! ! if (value instanceof Context) ! { ! Context subctx = (Context) value; ! list(subctx, newNode); ! } ! } ! catch (Throwable t) ! { ! logger.warn("Throwable " + t); ! } ! } ! ! // Try to cast to a predefined object ! if (newNode == null) ! { ! newNode = createNode(ctx, name); ! } ! ! // If no match, create a JNDIEntry ! if (newNode == null) ! { ! newNode = new JNDIEntry(); ! newNode.setName(name); ! newNode.setClassName(className); ! } ! ! node.add(newNode); ! } ! ne.close(); ! } ! catch (NamingException ne) ! { ! logger.error("error while listing context " + ctx.toString() + ": " + ne.toString(true)); ! } ! } ! ! /** Proxies to load */ ! static ! { ! proxies.add(org.ejtools.jndi.browser.model.JNDIEnvEntry.class); ! proxies.add(org.ejtools.jndi.browser.model.ejb.EJBHomeProxy.class); ! proxies.add(org.ejtools.jndi.browser.model.ejb.EJBLocalHomeProxy.class); ! proxies.add(org.ejtools.jndi.browser.model.jms.QueueProxy.class); ! proxies.add(org.ejtools.jndi.browser.model.jms.TopicProxy.class); ! proxies.add(org.ejtools.jndi.browser.model.jms.ConnectionFactoryProxy.class); ! proxies.add(org.ejtools.jndi.browser.model.mail.SessionProxy.class); ! proxies.add(org.ejtools.jndi.browser.model.sql.DataSourceProxy.class); ! proxies.add(org.ejtools.jndi.browser.model.Proxy.class); ! } ! } |
From: <let...@us...> - 2003-11-27 01:30:33
|
Update of /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/model/sql In directory sc8-pr-cvs1:/tmp/cvs-serv17169/jndi.browser/src/main/org/ejtools/jndi/browser/model/sql Modified Files: DataSourceProxy.java Log Message: Address Todo #755528 Address Todo #800902 Index: DataSourceProxy.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/model/sql/DataSourceProxy.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DataSourceProxy.java 10 Feb 2003 21:17:02 -0000 1.1 --- DataSourceProxy.java 27 Nov 2003 01:30:29 -0000 1.2 *************** *** 1,81 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model.sql; ! ! import java.sql.SQLException; ! ! import javax.naming.Context; ! import javax.rmi.PortableRemoteObject; ! import javax.sql.DataSource; ! ! import org.ejtools.jndi.browser.model.JNDIContext; ! ! /** ! * Describe a mail session. ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @javabean:class displayName="Data Source" ! * shortDescription="Data Source" ! * @javabean:icons color16="/toolbarButtonGraphics/development/JDBCDataSource16.gif" ! * @javabean:property name="name" ! * class="java.lang.String" ! * displayName="Name" ! * shortDescription="Name of the entry" ! * @javabean:property name="className" ! * class="java.lang.String" ! * displayName="Class" ! * shortDescription="Class of the entry" ! * @javabean:property name="loginTimeout" ! * class="int" ! * displayName="Login Timeout" ! * shortDescription="Login Timeout of the DataSource" ! */ ! public class DataSourceProxy extends JNDIContext ! { ! /** Description of the Field */ ! protected DataSource source; ! ! ! /** ! * Constructor for the SessionProxy object ! * ! * @param context Description of the Parameter ! * @param jndiName Description of the Parameter ! * @exception Exception Description of the Exception ! */ ! public DataSourceProxy(Context context, String jndiName) ! throws Exception ! { ! // Try to narrow to an EJBHome class ! Object o = context.lookup(jndiName); ! source = (DataSource) PortableRemoteObject.narrow(o, DataSource.class); ! ! this.setName(jndiName); ! this.setClassName(source.getClass().getName()); ! } ! ! ! /** ! * Gets the loginTimeout attribute of the DataSourceProxy object ! * ! * @return The loginTimeout value ! */ ! public int getLoginTimeout() ! { ! try ! { ! return this.source.getLoginTimeout(); ! } ! catch (SQLException sqle) ! { ! } ! return -1; ! } ! } --- 1,81 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model.sql; ! ! import java.sql.SQLException; ! ! import javax.naming.Context; ! import javax.rmi.PortableRemoteObject; ! import javax.sql.DataSource; ! ! import org.ejtools.jndi.browser.model.JNDIContext; ! ! /** ! * Describe a mail session. ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @javabean:class displayName="Data Source" ! * shortDescription="Data Source" ! * @javabean:icons color16="/toolbarButtonGraphics/development/JDBCDataSource16.gif" ! * @javabean:property name="name" ! * class="java.lang.String" ! * displayName="Name" ! * shortDescription="Name of the entry" ! * @javabean:property name="className" ! * class="java.lang.String" ! * displayName="Class" ! * shortDescription="Class of the entry" ! * @javabean:property name="loginTimeout" ! * class="int" ! * displayName="Login Timeout" ! * shortDescription="Login Timeout of the DataSource" ! */ ! public class DataSourceProxy extends JNDIContext ! { ! /** Description of the Field */ ! protected DataSource source; ! ! ! /** ! * Constructor for the SessionProxy object ! * ! * @param context Description of the Parameter ! * @param jndiName Description of the Parameter ! * @exception Exception Description of the Exception ! */ ! public DataSourceProxy(Context context, String jndiName) ! throws Exception ! { ! // Try to narrow to an EJBHome class ! Object o = context.lookup(jndiName); ! source = (DataSource) PortableRemoteObject.narrow(o, DataSource.class); ! ! this.setName(jndiName); ! this.setClassName(source.getClass().getName()); ! } ! ! ! /** ! * Gets the loginTimeout attribute of the DataSourceProxy object ! * ! * @return The loginTimeout value ! */ ! public int getLoginTimeout() ! { ! try ! { ! return this.source.getLoginTimeout(); ! } ! catch (SQLException sqle) ! { ! } ! return -1; ! } ! } |
Update of /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/model/service In directory sc8-pr-cvs1:/tmp/cvs-serv17169/jndi.browser/src/main/org/ejtools/jndi/browser/model/service Modified Files: ConnectionMetaData.java JMSConnectionService.java JMSConnectionServiceProvider.java Log Message: Address Todo #755528 Address Todo #800902 Index: ConnectionMetaData.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/model/service/ConnectionMetaData.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ConnectionMetaData.java 24 Feb 2003 22:32:17 -0000 1.2 --- ConnectionMetaData.java 27 Nov 2003 01:30:29 -0000 1.3 *************** *** 1,91 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model.service; ! ! import org.ejtools.util.service.ProfileMetaData; ! ! /** ! * @author letiembl ! * @created 14 novembre 2002 ! * @version $Revision$ ! */ ! public class ConnectionMetaData implements ProfileMetaData ! { ! /** Description of the Field */ ! protected String[] keys = new String[]{ ! ConnectionMetaData.FACTORY, ! ConnectionMetaData.PACKAGES, ! ConnectionMetaData.URL, ! ConnectionMetaData.CONTEXT, ! ConnectionMetaData.PRINCIPAL, ! ConnectionMetaData.CREDENTIALS ! }; ! /** Description of the Field */ ! public final static String CONTEXT = "context"; ! /** Description of the Field */ ! public final static String CREDENTIALS = "credentials"; ! /** Description of the Field */ ! public final static String FACTORY = "factory"; ! /** Description of the Field */ ! public final static String PACKAGES = "packages"; ! /** Description of the Field */ ! public final static String PRINCIPAL = "principal"; ! /** Description of the Field */ ! public final static String URL = "url"; ! ! ! /** Constructor for ConnectionMetaData. */ ! public ConnectionMetaData() ! { ! super(); ! } ! ! ! /** ! * Gets the fileName attribute of the ConnectionMetaData object ! * ! * @return The fileName value ! */ ! public String getFileName() ! { ! return "/jndi.connection.properties"; ! } ! ! ! /** ! * Gets the key attribute of the ConnectionMetaData object ! * ! * @param index Description of the Parameter ! * @return The key value ! */ ! public String getKey(int index) ! { ! return this.keys[index]; ! } ! ! ! /** ! * Gets the keys attribute of the ConnectionMetaData object ! * ! * @return The keys value ! */ ! public String[] getKeys() ! { ! return this.keys; ! } ! ! ! /** ! * Gets the prefix attribute of the ConnectionMetaData object ! * ! * @return The prefix value ! */ ! public String getPrefix() ! { ! return "connection"; ! } ! } --- 1,91 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model.service; ! ! import org.ejtools.util.service.ProfileMetaData; ! ! /** ! * @author letiembl ! * @created 14 novembre 2002 ! * @version $Revision$ ! */ ! public class ConnectionMetaData implements ProfileMetaData ! { ! /** Description of the Field */ ! protected String[] keys = new String[]{ ! ConnectionMetaData.FACTORY, ! ConnectionMetaData.PACKAGES, ! ConnectionMetaData.URL, ! ConnectionMetaData.CONTEXT, ! ConnectionMetaData.PRINCIPAL, ! ConnectionMetaData.CREDENTIALS ! }; ! /** Description of the Field */ ! public final static String CONTEXT = "context"; ! /** Description of the Field */ ! public final static String CREDENTIALS = "credentials"; ! /** Description of the Field */ ! public final static String FACTORY = "factory"; ! /** Description of the Field */ ! public final static String PACKAGES = "packages"; ! /** Description of the Field */ ! public final static String PRINCIPAL = "principal"; ! /** Description of the Field */ ! public final static String URL = "url"; ! ! ! /** Constructor for ConnectionMetaData. */ ! public ConnectionMetaData() ! { ! super(); ! } ! ! ! /** ! * Gets the fileName attribute of the ConnectionMetaData object ! * ! * @return The fileName value ! */ ! public String getFileName() ! { ! return "/jndi.connection.properties"; ! } ! ! ! /** ! * Gets the key attribute of the ConnectionMetaData object ! * ! * @param index Description of the Parameter ! * @return The key value ! */ ! public String getKey(int index) ! { ! return this.keys[index]; ! } ! ! ! /** ! * Gets the keys attribute of the ConnectionMetaData object ! * ! * @return The keys value ! */ ! public String[] getKeys() ! { ! return this.keys; ! } ! ! ! /** ! * Gets the prefix attribute of the ConnectionMetaData object ! * ! * @return The prefix value ! */ ! public String getPrefix() ! { ! return "connection"; ! } ! } Index: JMSConnectionService.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/model/service/JMSConnectionService.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** JMSConnectionService.java 10 Feb 2003 21:18:15 -0000 1.1 --- JMSConnectionService.java 27 Nov 2003 01:30:29 -0000 1.2 *************** *** 1,51 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model.service; ! ! import javax.jms.QueueConnectionFactory; ! import javax.jms.TopicConnectionFactory; ! ! /** ! * Description of the Interface ! * ! * @author letiemble ! * @created 3 avril 2002 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public interface JMSConnectionService ! { ! /** Description of the Field */ ! public final static String QUEUE_CONNECTION_FACTORY = "QUEUE"; ! /** Description of the Field */ ! public final static String TOPIC_CONNECTION_FACTORY = "TOPIC"; ! ! ! /** ! * Getter for the defaultQueueConnectionFactory attribute ! * ! * @return The value of defaultQueueConnectionFactory attribute ! */ ! public QueueConnectionFactory getDefaultQueueConnectionFactory(); ! ! ! /** ! * Getter for the defaultConnectionFactory attribute ! * ! * @return The value of defaultConnectionFactory attribute ! */ ! public TopicConnectionFactory getDefaultTopicConnectionFactory(); ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! */ ! public void selectFactory(String type); ! } ! --- 1,51 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model.service; ! ! import javax.jms.QueueConnectionFactory; ! import javax.jms.TopicConnectionFactory; ! ! /** ! * Description of the Interface ! * ! * @author letiemble ! * @created 3 avril 2002 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public interface JMSConnectionService ! { ! /** Description of the Field */ ! public final static String QUEUE_CONNECTION_FACTORY = "QUEUE"; ! /** Description of the Field */ ! public final static String TOPIC_CONNECTION_FACTORY = "TOPIC"; ! ! ! /** ! * Getter for the defaultQueueConnectionFactory attribute ! * ! * @return The value of defaultQueueConnectionFactory attribute ! */ ! public QueueConnectionFactory getDefaultQueueConnectionFactory(); ! ! ! /** ! * Getter for the defaultConnectionFactory attribute ! * ! * @return The value of defaultConnectionFactory attribute ! */ ! public TopicConnectionFactory getDefaultTopicConnectionFactory(); ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! */ ! public void selectFactory(String type); ! } ! Index: JMSConnectionServiceProvider.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/model/service/JMSConnectionServiceProvider.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** JMSConnectionServiceProvider.java 3 Mar 2003 20:34:47 -0000 1.4 --- JMSConnectionServiceProvider.java 27 Nov 2003 01:30:29 -0000 1.5 *************** *** 1,253 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model.service; ! ! import java.beans.beancontext.BeanContextServices; ! import java.util.Iterator; ! import java.util.ResourceBundle; ! import java.util.Vector; ! ! import javax.jms.QueueConnectionFactory; ! import javax.jms.TopicConnectionFactory; ! import javax.swing.JOptionPane; ! ! import org.ejtools.beans.beancontext.CustomBeanContextServiceProvider; ! import org.ejtools.jndi.browser.model.jms.ConnectionFactoryProxy; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @todo Add log4j logs ! * @todo int argument for selectFactory ! */ ! public class JMSConnectionServiceProvider extends CustomBeanContextServiceProvider implements JMSConnectionService ! { ! /** Description of the Field */ ! protected int defaultQueueConnectionFactory = 0; ! /** Description of the Field */ ! protected int defaultTopicConnectionFactory = 0; ! /** Description of the Field */ ! protected Vector queueConnectionFactories = new Vector(); ! /** Description of the Field */ ! protected Vector topicConnectionFactories = new Vector(); ! /** Bundle for I18N */ ! private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.jndi.browser.Resources"); ! ! ! /** ! * Getter for the currentServiceSelectors attribute ! * ! * @param bcs Description of Parameter ! * @param serviceClass Description of Parameter ! * @return The value ! */ ! public Iterator getCurrentServiceSelectors(BeanContextServices bcs, java.lang.Class serviceClass) ! { ! return (new Vector()).iterator(); ! } ! ! ! /** ! * Getter for the defaultQueueConnectionFactory attribute ! * ! * @return The value of defaultQueueConnectionFactory attribute ! */ ! public QueueConnectionFactory getDefaultQueueConnectionFactory() ! { ! if (queueConnectionFactories.size() == 0) ! { ! JOptionPane.showMessageDialog(null, ! resources.getString("text.information.noDefaultFactory.queue"), ! resources.getString("title.information.defaultFactory.queue"), ! JOptionPane.INFORMATION_MESSAGE); ! } ! else ! { ! ConnectionFactoryProxy proxy = (ConnectionFactoryProxy) queueConnectionFactories.elementAt(defaultQueueConnectionFactory); ! return proxy.getQueueConnectionFactory(); ! } ! return null; ! } ! ! ! /** ! * Getter for the defaultTopicConnectionFactory attribute ! * ! * @return The value of defaultTopicConnectionFactory attribute ! */ ! public TopicConnectionFactory getDefaultTopicConnectionFactory() ! { ! if (topicConnectionFactories.size() == 0) ! { ! JOptionPane.showMessageDialog(null, ! resources.getString("text.information.noDefaultFactory.topic"), ! resources.getString("title.information.defaultFactory.topic"), ! JOptionPane.INFORMATION_MESSAGE); ! } ! else ! { ! ConnectionFactoryProxy proxy = (ConnectionFactoryProxy) topicConnectionFactories.elementAt(defaultTopicConnectionFactory); ! return proxy.getTopicConnectionFactory(); ! } ! return null; ! } ! ! ! /** ! * Getter for the service attribute ! * ! * @param bcs Description of Parameter ! * @param requestor Description of Parameter ! * @param serviceClass Description of Parameter ! * @param serviceSelector Description of Parameter ! * @return The value ! */ ! public Object getService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Class serviceClass, java.lang.Object serviceSelector) ! { ! if (requestor instanceof ConnectionFactoryProxy) ! { ! ConnectionFactoryProxy proxy = (ConnectionFactoryProxy) requestor; ! if (proxy.isQueueConnectionFactory()) ! { ! queueConnectionFactories.add(proxy); ! } ! if (proxy.isTopicConnectionFactory()) ! { ! topicConnectionFactories.add(proxy); ! } ! } ! return this; ! } ! ! ! /** ! * Description of the Method ! * ! * @param bcs Description of Parameter ! * @param requestor Description of Parameter ! * @param service Description of Parameter ! */ ! public void releaseService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Object service) ! { ! if (requestor instanceof ConnectionFactoryProxy) ! { ! ConnectionFactoryProxy proxy = (ConnectionFactoryProxy) requestor; ! if (proxy.isQueueConnectionFactory()) ! { ! queueConnectionFactories.remove(proxy); ! if ((this.defaultQueueConnectionFactory >= queueConnectionFactories.size()) ! && (this.defaultQueueConnectionFactory > 0)) ! { ! this.defaultQueueConnectionFactory = queueConnectionFactories.size() - 1; ! } ! } ! if (proxy.isTopicConnectionFactory()) ! { ! topicConnectionFactories.remove(proxy); ! if ((this.defaultTopicConnectionFactory >= topicConnectionFactories.size()) ! && (this.defaultTopicConnectionFactory > 0)) ! { ! this.defaultTopicConnectionFactory = topicConnectionFactories.size() - 1; ! } ! } ! } ! } ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! */ ! public void selectFactory(String type) ! { ! if (JMSConnectionService.QUEUE_CONNECTION_FACTORY.equals(type)) ! { ! selectQueueConnectionFactory(); ! } ! if (JMSConnectionService.TOPIC_CONNECTION_FACTORY.equals(type)) ! { ! selectTopicConnectionFactory(); ! } ! } ! ! ! /** Description of the Method */ ! public void selectQueueConnectionFactory() ! { ! if (queueConnectionFactories.size() > 0) ! { ! Object selectedValue = JOptionPane.showInputDialog(null, ! resources.getString("text.question.defaultFactory.queue"), ! resources.getString("title.question.defaultFactory.queue"), ! JOptionPane.QUESTION_MESSAGE, ! null, ! queueConnectionFactories.toArray(), ! queueConnectionFactories.elementAt(defaultQueueConnectionFactory)); ! if (selectedValue != null) ! { ! defaultQueueConnectionFactory = queueConnectionFactories.indexOf(selectedValue); ! } ! else ! { ! return; ! } ! } ! else ! { ! JOptionPane.showMessageDialog(null, ! resources.getString("text.information.noDefaultFactory.queue"), ! resources.getString("title.information.defaultFactory.queue"), ! JOptionPane.INFORMATION_MESSAGE); ! } ! } ! ! ! /** Description of the Method */ ! public void selectTopicConnectionFactory() ! { ! if (topicConnectionFactories.size() > 0) ! { ! Object selectedValue = JOptionPane.showInputDialog(null, ! resources.getString("text.question.defaultFactory.topic"), ! resources.getString("title.question.defaultFactory.topic"), ! JOptionPane.QUESTION_MESSAGE, ! null, ! topicConnectionFactories.toArray(), ! topicConnectionFactories.elementAt(defaultTopicConnectionFactory)); ! if (selectedValue != null) ! { ! defaultTopicConnectionFactory = topicConnectionFactories.indexOf(selectedValue); ! } ! else ! { ! return; ! } ! } ! else ! { ! JOptionPane.showMessageDialog(null, ! resources.getString("text.information.noDefaultFactory.topic"), ! resources.getString("title.information.defaultFactory.topic"), ! JOptionPane.INFORMATION_MESSAGE); ! } ! } ! ! ! /** ! * @return The serviceClass value ! */ ! protected Class[] getServiceClass() ! { ! return new Class[]{JMSConnectionService.class}; ! } ! } ! --- 1,253 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model.service; ! ! import java.beans.beancontext.BeanContextServices; ! import java.util.Iterator; ! import java.util.ResourceBundle; ! import java.util.Vector; ! ! import javax.jms.QueueConnectionFactory; ! import javax.jms.TopicConnectionFactory; ! import javax.swing.JOptionPane; ! ! import org.ejtools.beans.beancontext.CustomBeanContextServiceProvider; ! import org.ejtools.jndi.browser.model.jms.ConnectionFactoryProxy; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @todo Add log4j logs ! * @todo int argument for selectFactory ! */ ! public class JMSConnectionServiceProvider extends CustomBeanContextServiceProvider implements JMSConnectionService ! { ! /** Description of the Field */ ! protected int defaultQueueConnectionFactory = 0; ! /** Description of the Field */ ! protected int defaultTopicConnectionFactory = 0; ! /** Description of the Field */ ! protected Vector queueConnectionFactories = new Vector(); ! /** Description of the Field */ ! protected Vector topicConnectionFactories = new Vector(); ! /** Bundle for I18N */ ! private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.jndi.browser.Resources"); ! ! ! /** ! * Getter for the currentServiceSelectors attribute ! * ! * @param bcs Description of Parameter ! * @param serviceClass Description of Parameter ! * @return The value ! */ ! public Iterator getCurrentServiceSelectors(BeanContextServices bcs, java.lang.Class serviceClass) ! { ! return (new Vector()).iterator(); ! } ! ! ! /** ! * Getter for the defaultQueueConnectionFactory attribute ! * ! * @return The value of defaultQueueConnectionFactory attribute ! */ ! public QueueConnectionFactory getDefaultQueueConnectionFactory() ! { ! if (queueConnectionFactories.size() == 0) ! { ! JOptionPane.showMessageDialog(null, ! resources.getString("text.information.noDefaultFactory.queue"), ! resources.getString("title.information.defaultFactory.queue"), ! JOptionPane.INFORMATION_MESSAGE); ! } ! else ! { ! ConnectionFactoryProxy proxy = (ConnectionFactoryProxy) queueConnectionFactories.elementAt(defaultQueueConnectionFactory); ! return proxy.getQueueConnectionFactory(); ! } ! return null; ! } ! ! ! /** ! * Getter for the defaultTopicConnectionFactory attribute ! * ! * @return The value of defaultTopicConnectionFactory attribute ! */ ! public TopicConnectionFactory getDefaultTopicConnectionFactory() ! { ! if (topicConnectionFactories.size() == 0) ! { ! JOptionPane.showMessageDialog(null, ! resources.getString("text.information.noDefaultFactory.topic"), ! resources.getString("title.information.defaultFactory.topic"), ! JOptionPane.INFORMATION_MESSAGE); ! } ! else ! { ! ConnectionFactoryProxy proxy = (ConnectionFactoryProxy) topicConnectionFactories.elementAt(defaultTopicConnectionFactory); ! return proxy.getTopicConnectionFactory(); ! } ! return null; ! } ! ! ! /** ! * Getter for the service attribute ! * ! * @param bcs Description of Parameter ! * @param requestor Description of Parameter ! * @param serviceClass Description of Parameter ! * @param serviceSelector Description of Parameter ! * @return The value ! */ ! public Object getService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Class serviceClass, java.lang.Object serviceSelector) ! { ! if (requestor instanceof ConnectionFactoryProxy) ! { ! ConnectionFactoryProxy proxy = (ConnectionFactoryProxy) requestor; ! if (proxy.isQueueConnectionFactory()) ! { ! queueConnectionFactories.add(proxy); ! } ! if (proxy.isTopicConnectionFactory()) ! { ! topicConnectionFactories.add(proxy); ! } ! } ! return this; ! } ! ! ! /** ! * Description of the Method ! * ! * @param bcs Description of Parameter ! * @param requestor Description of Parameter ! * @param service Description of Parameter ! */ ! public void releaseService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Object service) ! { ! if (requestor instanceof ConnectionFactoryProxy) ! { ! ConnectionFactoryProxy proxy = (ConnectionFactoryProxy) requestor; ! if (proxy.isQueueConnectionFactory()) ! { ! queueConnectionFactories.remove(proxy); ! if ((this.defaultQueueConnectionFactory >= queueConnectionFactories.size()) ! && (this.defaultQueueConnectionFactory > 0)) ! { ! this.defaultQueueConnectionFactory = queueConnectionFactories.size() - 1; ! } ! } ! if (proxy.isTopicConnectionFactory()) ! { ! topicConnectionFactories.remove(proxy); ! if ((this.defaultTopicConnectionFactory >= topicConnectionFactories.size()) ! && (this.defaultTopicConnectionFactory > 0)) ! { ! this.defaultTopicConnectionFactory = topicConnectionFactories.size() - 1; ! } ! } ! } ! } ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! */ ! public void selectFactory(String type) ! { ! if (JMSConnectionService.QUEUE_CONNECTION_FACTORY.equals(type)) ! { ! selectQueueConnectionFactory(); ! } ! if (JMSConnectionService.TOPIC_CONNECTION_FACTORY.equals(type)) ! { ! selectTopicConnectionFactory(); ! } ! } ! ! ! /** Description of the Method */ ! public void selectQueueConnectionFactory() ! { ! if (queueConnectionFactories.size() > 0) ! { ! Object selectedValue = JOptionPane.showInputDialog(null, ! resources.getString("text.question.defaultFactory.queue"), ! resources.getString("title.question.defaultFactory.queue"), ! JOptionPane.QUESTION_MESSAGE, ! null, ! queueConnectionFactories.toArray(), ! queueConnectionFactories.elementAt(defaultQueueConnectionFactory)); ! if (selectedValue != null) ! { ! defaultQueueConnectionFactory = queueConnectionFactories.indexOf(selectedValue); ! } ! else ! { ! return; ! } ! } ! else ! { ! JOptionPane.showMessageDialog(null, ! resources.getString("text.information.noDefaultFactory.queue"), ! resources.getString("title.information.defaultFactory.queue"), ! JOptionPane.INFORMATION_MESSAGE); ! } ! } ! ! ! /** Description of the Method */ ! public void selectTopicConnectionFactory() ! { ! if (topicConnectionFactories.size() > 0) ! { ! Object selectedValue = JOptionPane.showInputDialog(null, ! resources.getString("text.question.defaultFactory.topic"), ! resources.getString("title.question.defaultFactory.topic"), ! JOptionPane.QUESTION_MESSAGE, ! null, ! topicConnectionFactories.toArray(), ! topicConnectionFactories.elementAt(defaultTopicConnectionFactory)); ! if (selectedValue != null) ! { ! defaultTopicConnectionFactory = topicConnectionFactories.indexOf(selectedValue); ! } ! else ! { ! return; ! } ! } ! else ! { ! JOptionPane.showMessageDialog(null, ! resources.getString("text.information.noDefaultFactory.topic"), ! resources.getString("title.information.defaultFactory.topic"), ! JOptionPane.INFORMATION_MESSAGE); ! } ! } ! ! ! /** ! * @return The serviceClass value ! */ ! protected Class[] getServiceClass() ! { ! return new Class[]{JMSConnectionService.class}; ! } ! } ! |
Update of /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/model/ejb In directory sc8-pr-cvs1:/tmp/cvs-serv17169/jndi.browser/src/main/org/ejtools/jndi/browser/model/ejb Modified Files: EJBHomeProxy.java EJBLocalHomeProxy.java EJBObjectProxy.java PropertyChanger.java Log Message: Address Todo #755528 Address Todo #800902 Index: EJBHomeProxy.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/model/ejb/EJBHomeProxy.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** EJBHomeProxy.java 24 Feb 2003 22:32:10 -0000 1.3 --- EJBHomeProxy.java 27 Nov 2003 01:30:29 -0000 1.4 *************** *** 1,177 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model.ejb; ! ! import java.awt.Component; ! import java.beans.BeanInfo; ! import java.beans.Introspector; ! import java.lang.reflect.InvocationHandler; ! import java.lang.reflect.Method; ! import java.lang.reflect.Proxy; ! import java.util.Collection; ! import java.util.Iterator; ! ! import javax.ejb.EJBHome; ! import javax.naming.Context; ! import javax.rmi.PortableRemoteObject; ! ! import org.ejtools.adwt.GenericCustomizer; ! import org.ejtools.jndi.browser.model.JNDIEntry; ! ! /** ! * Proxy that hide the remote aspect of the EJB Home interface. Allows the creation of an EJB or of a collection of EJB remotly and displays them as ! * EJBObjectProxy. ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Reference to Rickard Öberg ! * @javabean:class displayName="Enterprise Java Bean" ! * shortDescription="EJB Home interface" ! * @javabean:icons color16="/toolbarButtonGraphics/development/EnterpriseJavaBeanJar16.gif" ! * @javabean:property name="name" ! * class="java.lang.String" ! * displayName="Name" ! * shortDescription="Name of the EJB Home" ! * @javabean:property name="className" ! * class="java.lang.String" ! * displayName="Home interface" ! * shortDescription="Class of EJB Home" ! */ ! public class EJBHomeProxy extends JNDIEntry implements InvocationHandler ! { ! /** EJB Home */ ! protected EJBHome home; ! /** EJB Home class */ ! protected Class homeClass; ! /** BeanInfo of the EJB Home class */ ! protected BeanInfo info; ! /** Invocation Proxy of the EJB Home class */ ! protected Object proxy; ! ! ! /** ! * Create the proxy by encapsulating the EJB Home interface ! * ! * @param context Description of the Parameter ! * @param jndiName Description of the Parameter ! * @exception Exception Exception in case of errors ! */ ! public EJBHomeProxy(Context context, String jndiName) ! throws Exception ! { ! // Try to narrow to an EJBHome class ! Object o = context.lookup(jndiName); ! home = (EJBHome) PortableRemoteObject.narrow(o, EJBHome.class); ! ! // Search for the Home interface ! Class[] intf = home.getClass().getInterfaces(); ! for (int i = 0; i < intf.length; i++) ! { ! if (EJBHome.class.isAssignableFrom(intf[i])) ! { ! homeClass = intf[i]; ! } ! } ! ! setName(jndiName); ! setClassName(homeClass.getName()); ! ! // Create the BeanInfo of the home class ! this.info = Introspector.getBeanInfo(this.homeClass); ! // Create the invocation proxy ! this.proxy = Proxy.newProxyInstance(homeClass.getClassLoader(), new Class[]{BeanInfo.class, homeClass}, this); ! } ! ! ! /** ! * Gets the JavaBean customizer of the context ! * ! * @return The customizer ! */ ! public Component getComponent() ! { ! // Lazy creation ! if (c == null) ! { ! try ! { ! c = new GenericCustomizer(proxy); ! } ! catch (Exception e) ! { ! e.printStackTrace(); ! } ! } ! return (Component) c; ! } ! ! ! /** ! * Implementation of InvocationHandler. ! * ! * @param proxy The proxy that makes the invocation ! * @param method The method invoked ! * @param args Arguments of the method ! * @return Result of the method ! * @exception Throwable Exception in case of errors ! */ ! public Object invoke(Object proxy, Method method, Object[] args) ! throws Throwable ! { ! // Intercept BeanInfo methods ! if (method.getDeclaringClass().equals(BeanInfo.class)) ! { ! return method.invoke(info, args); ! } ! // Intercept Object methods ! else if (method.getDeclaringClass().equals(Object.class)) ! { ! return method.invoke(this, args); ! } ! else ! { ! // Clear the content ! Iterator iterator = iterator(); ! while (iterator.hasNext()) ! { ! this.remove(iterator.next()); ! } ! ! // Execute EJBHome methods ! Object result = method.invoke(home, args); ! ! // Add an EJB or a collection of EJB ! if (result instanceof Collection) ! { ! Iterator enum = ((Collection) result).iterator(); ! while (enum.hasNext()) ! { ! this.add(new EJBObjectProxy(enum.next(), homeClass.getClassLoader())); ! } ! } ! else ! { ! this.add(new EJBObjectProxy(result, homeClass.getClassLoader())); ! } ! ! return null; ! } ! } ! ! ! /** ! * Implementation of toString() method. ! * ! * @return The name of the ejb home ! */ ! public String toString() ! { ! return homeClass.getName().substring(homeClass.getName().lastIndexOf(".") + 1); ! } ! ! } --- 1,177 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model.ejb; ! ! import java.awt.Component; ! import java.beans.BeanInfo; ! import java.beans.Introspector; ! import java.lang.reflect.InvocationHandler; ! import java.lang.reflect.Method; ! import java.lang.reflect.Proxy; ! import java.util.Collection; ! import java.util.Iterator; ! ! import javax.ejb.EJBHome; ! import javax.naming.Context; ! import javax.rmi.PortableRemoteObject; ! ! import org.ejtools.adwt.GenericCustomizer; ! import org.ejtools.jndi.browser.model.JNDIEntry; ! ! /** ! * Proxy that hide the remote aspect of the EJB Home interface. Allows the creation of an EJB or of a collection of EJB remotly and displays them as ! * EJBObjectProxy. ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Reference to Rickard Öberg ! * @javabean:class displayName="Enterprise Java Bean" ! * shortDescription="EJB Home interface" ! * @javabean:icons color16="/toolbarButtonGraphics/development/EnterpriseJavaBeanJar16.gif" ! * @javabean:property name="name" ! * class="java.lang.String" ! * displayName="Name" ! * shortDescription="Name of the EJB Home" ! * @javabean:property name="className" ! * class="java.lang.String" ! * displayName="Home interface" ! * shortDescription="Class of EJB Home" ! */ ! public class EJBHomeProxy extends JNDIEntry implements InvocationHandler ! { ! /** EJB Home */ ! protected EJBHome home; ! /** EJB Home class */ ! protected Class homeClass; ! /** BeanInfo of the EJB Home class */ ! protected BeanInfo info; ! /** Invocation Proxy of the EJB Home class */ ! protected Object proxy; ! ! ! /** ! * Create the proxy by encapsulating the EJB Home interface ! * ! * @param context Description of the Parameter ! * @param jndiName Description of the Parameter ! * @exception Exception Exception in case of errors ! */ ! public EJBHomeProxy(Context context, String jndiName) ! throws Exception ! { ! // Try to narrow to an EJBHome class ! Object o = context.lookup(jndiName); ! home = (EJBHome) PortableRemoteObject.narrow(o, EJBHome.class); ! ! // Search for the Home interface ! Class[] intf = home.getClass().getInterfaces(); ! for (int i = 0; i < intf.length; i++) ! { ! if (EJBHome.class.isAssignableFrom(intf[i])) ! { ! homeClass = intf[i]; ! } ! } ! ! setName(jndiName); ! setClassName(homeClass.getName()); ! ! // Create the BeanInfo of the home class ! this.info = Introspector.getBeanInfo(this.homeClass); ! // Create the invocation proxy ! this.proxy = Proxy.newProxyInstance(homeClass.getClassLoader(), new Class[]{BeanInfo.class, homeClass}, this); ! } ! ! ! /** ! * Gets the JavaBean customizer of the context ! * ! * @return The customizer ! */ ! public Component getComponent() ! { ! // Lazy creation ! if (c == null) ! { ! try ! { ! c = new GenericCustomizer(proxy); ! } ! catch (Exception e) ! { ! e.printStackTrace(); ! } ! } ! return (Component) c; ! } ! ! ! /** ! * Implementation of InvocationHandler. ! * ! * @param proxy The proxy that makes the invocation ! * @param method The method invoked ! * @param args Arguments of the method ! * @return Result of the method ! * @exception Throwable Exception in case of errors ! */ ! public Object invoke(Object proxy, Method method, Object[] args) ! throws Throwable ! { ! // Intercept BeanInfo methods ! if (method.getDeclaringClass().equals(BeanInfo.class)) ! { ! return method.invoke(info, args); ! } ! // Intercept Object methods ! else if (method.getDeclaringClass().equals(Object.class)) ! { ! return method.invoke(this, args); ! } ! else ! { ! // Clear the content ! Iterator iterator = iterator(); ! while (iterator.hasNext()) ! { ! this.remove(iterator.next()); ! } ! ! // Execute EJBHome methods ! Object result = method.invoke(home, args); ! ! // Add an EJB or a collection of EJB ! if (result instanceof Collection) ! { ! Iterator enum = ((Collection) result).iterator(); ! while (enum.hasNext()) ! { ! this.add(new EJBObjectProxy(enum.next(), homeClass.getClassLoader())); ! } ! } ! else ! { ! this.add(new EJBObjectProxy(result, homeClass.getClassLoader())); ! } ! ! return null; ! } ! } ! ! ! /** ! * Implementation of toString() method. ! * ! * @return The name of the ejb home ! */ ! public String toString() ! { ! return homeClass.getName().substring(homeClass.getName().lastIndexOf(".") + 1); ! } ! ! } Index: EJBLocalHomeProxy.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/model/ejb/EJBLocalHomeProxy.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** EJBLocalHomeProxy.java 24 Feb 2003 22:32:10 -0000 1.2 --- EJBLocalHomeProxy.java 27 Nov 2003 01:30:29 -0000 1.3 *************** *** 1,81 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model.ejb; ! ! import javax.ejb.EJBLocalHome; ! import javax.naming.Context; ! import javax.rmi.PortableRemoteObject; ! ! import org.ejtools.jndi.browser.model.JNDIEntry; ! ! /** ! * Proxy that hide the remote aspect of the EJB Local Home interface. ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Reference to Rickard Öberg ! * @javabean:class displayName="Enterprise Java Bean" ! * shortDescription="EJB Local Home interface" ! * @javabean:icons color16="/toolbarButtonGraphics/development/EnterpriseJavaBeanJar16.gif" ! * @javabean:property name="name" ! * class="java.lang.String" ! * displayName="Name" ! * shortDescription="Name of the EJB Local Home" ! * @javabean:property name="className" ! * class="java.lang.String" ! * displayName="Home interface" ! * shortDescription="Class of EJB Local Home" ! */ ! public class EJBLocalHomeProxy extends JNDIEntry ! { ! /** EJB Home */ ! protected EJBLocalHome home; ! /** EJB Home class */ ! protected Class homeClass; ! ! ! /** ! * Create the proxy by encapsulating the EJB Home interface ! * ! * @param context Description of the Parameter ! * @param jndiName Description of the Parameter ! * @exception Exception Exception in case of errors ! */ ! public EJBLocalHomeProxy(Context context, String jndiName) ! throws Exception ! { ! // Try to narrow to an EJBHome class ! Object o = context.lookup(jndiName); ! home = (EJBLocalHome) PortableRemoteObject.narrow(o, EJBLocalHome.class); ! ! // Search for the Home interface ! Class[] intf = home.getClass().getInterfaces(); ! for (int i = 0; i < intf.length; i++) ! { ! if (EJBLocalHome.class.isAssignableFrom(intf[i])) ! { ! homeClass = intf[i]; ! } ! } ! ! this.setName(jndiName); ! this.setClassName(homeClass.getName()); ! } ! ! ! /** ! * Implementation of toString() method. ! * ! * @return The name of the ejb home ! */ ! public String toString() ! { ! return homeClass.getName().substring(homeClass.getName().lastIndexOf(".") + 1); ! } ! ! } --- 1,81 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model.ejb; ! ! import javax.ejb.EJBLocalHome; ! import javax.naming.Context; ! import javax.rmi.PortableRemoteObject; ! ! import org.ejtools.jndi.browser.model.JNDIEntry; ! ! /** ! * Proxy that hide the remote aspect of the EJB Local Home interface. ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Reference to Rickard Öberg ! * @javabean:class displayName="Enterprise Java Bean" ! * shortDescription="EJB Local Home interface" ! * @javabean:icons color16="/toolbarButtonGraphics/development/EnterpriseJavaBeanJar16.gif" ! * @javabean:property name="name" ! * class="java.lang.String" ! * displayName="Name" ! * shortDescription="Name of the EJB Local Home" ! * @javabean:property name="className" ! * class="java.lang.String" ! * displayName="Home interface" ! * shortDescription="Class of EJB Local Home" ! */ ! public class EJBLocalHomeProxy extends JNDIEntry ! { ! /** EJB Home */ ! protected EJBLocalHome home; ! /** EJB Home class */ ! protected Class homeClass; ! ! ! /** ! * Create the proxy by encapsulating the EJB Home interface ! * ! * @param context Description of the Parameter ! * @param jndiName Description of the Parameter ! * @exception Exception Exception in case of errors ! */ ! public EJBLocalHomeProxy(Context context, String jndiName) ! throws Exception ! { ! // Try to narrow to an EJBHome class ! Object o = context.lookup(jndiName); ! home = (EJBLocalHome) PortableRemoteObject.narrow(o, EJBLocalHome.class); ! ! // Search for the Home interface ! Class[] intf = home.getClass().getInterfaces(); ! for (int i = 0; i < intf.length; i++) ! { ! if (EJBLocalHome.class.isAssignableFrom(intf[i])) ! { ! homeClass = intf[i]; ! } ! } ! ! this.setName(jndiName); ! this.setClassName(homeClass.getName()); ! } ! ! ! /** ! * Implementation of toString() method. ! * ! * @return The name of the ejb home ! */ ! public String toString() ! { ! return homeClass.getName().substring(homeClass.getName().lastIndexOf(".") + 1); ! } ! ! } Index: EJBObjectProxy.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/model/ejb/EJBObjectProxy.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** EJBObjectProxy.java 24 Feb 2003 22:32:10 -0000 1.3 --- EJBObjectProxy.java 27 Nov 2003 01:30:29 -0000 1.4 *************** *** 1,170 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model.ejb; ! ! import java.awt.Component; ! import java.beans.BeanInfo; ! import java.beans.Customizer; ! import java.beans.Introspector; ! import java.beans.PropertyChangeListener; ! import java.beans.PropertyChangeSupport; ! import java.lang.reflect.InvocationHandler; ! import java.lang.reflect.Method; ! import java.lang.reflect.Proxy; ! ! import javax.ejb.EJBObject; ! ! import org.ejtools.adwt.GenericCustomizer; ! import org.ejtools.jndi.browser.model.JNDIEntry; ! ! /** ! * Proxy that hide the remote aspect of the EJB remote interface. Allows the execution of remote methods on the specified EJB. ! * ! * @author letiemble ! * @created 2 janvier 2002 ! * @version $Revision$ ! * @todo Reference to Rickard Öberg ! * @javabean:class displayName="Enterprise Java Bean" ! * shortDescription="EJB Remote interface" ! * @javabean:icons color16="/toolbarButtonGraphics/development/EnterpriseJavaBean16.gif" ! */ ! public class EJBObjectProxy extends JNDIEntry implements InvocationHandler ! { ! /** Description of the Field */ ! protected transient Customizer c; ! /** Description of the Field */ ! protected String desc; ! /** Description of the Field */ ! protected BeanInfo info; ! /** Description of the Field */ ! protected Object obj; ! /** Description of the Field */ ! protected Object proxy; ! /** Description of the Field */ ! protected PropertyChangeSupport ps; ! /** Description of the Field */ ! protected Class remote; ! ! ! /** ! * Constructor for the EJBObjectProxy object ! * ! * @param obj Description of Parameter ! * @param cl Description of Parameter ! * @exception Exception Description of Exception ! */ ! public EJBObjectProxy(Object obj, ClassLoader cl) ! throws Exception ! { ! this.obj = obj; ! ! Class[] intf = obj.getClass().getInterfaces(); ! for (int i = 0; i < intf.length; i++) ! { ! if (EJBObject.class.isAssignableFrom(intf[i])) ! { ! remote = intf[i]; ! } ! } ! ! this.info = Introspector.getBeanInfo(this.remote); ! this.proxy = Proxy.newProxyInstance(cl, new Class[]{BeanInfo.class, remote, PropertyChanger.class}, this); ! this.ps = new PropertyChangeSupport(proxy); ! } ! ! ! /** ! * Gets the component attribute of the EJBObjectProxy object ! * ! * @return The component value ! */ ! public Component getComponent() ! { ! if (c == null) ! { ! c = new GenericCustomizer(proxy); ! } ! return (Component) c; ! } ! ! ! /** ! * Description of the Method ! * ! * @param proxy Description of Parameter ! * @param method Description of Parameter ! * @param args Description of Parameter ! * @return Description of the Returned Value ! * @exception Throwable Description of Exception ! */ ! public Object invoke(Object proxy, Method method, Object[] args) ! throws Throwable ! { ! if (method.getDeclaringClass().equals(BeanInfo.class)) ! { ! return method.invoke(info, args); ! } ! else if (method.getDeclaringClass().equals(Object.class)) ! { ! return method.invoke(this, args); ! } ! else if (method.getDeclaringClass().equals(PropertyChanger.class)) ! { ! if (method.getName().startsWith("add")) ! { ! ps.addPropertyChangeListener((PropertyChangeListener) args[0]); ! } ! else ! { ! ps.removePropertyChangeListener((PropertyChangeListener) args[0]); ! } ! return null; ! } ! else ! { ! try ! { ! return method.invoke(obj, args); ! } ! finally ! { ! if (!(method.getName().startsWith("get") || method.getName().startsWith("is"))) ! { ! ps.firePropertyChange(null, null, null); ! } ! } ! } ! } ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Returned Value ! */ ! public String toString() ! { ! if (desc == null) ! { ! try ! { ! Method m = EJBObject.class.getMethod("getPrimaryKey", new Class[0]); ! desc = m.invoke(obj, new Object[0]).toString(); ! } ! catch (Exception e) ! { ! ! desc = remote.getName().substring(remote.getName().lastIndexOf(".") + 1); ! //desc = remote.toString(); ! ! } ! ! } ! return desc; ! } ! } ! --- 1,170 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model.ejb; ! ! import java.awt.Component; ! import java.beans.BeanInfo; ! import java.beans.Customizer; ! import java.beans.Introspector; ! import java.beans.PropertyChangeListener; ! import java.beans.PropertyChangeSupport; ! import java.lang.reflect.InvocationHandler; ! import java.lang.reflect.Method; ! import java.lang.reflect.Proxy; ! ! import javax.ejb.EJBObject; ! ! import org.ejtools.adwt.GenericCustomizer; ! import org.ejtools.jndi.browser.model.JNDIEntry; ! ! /** ! * Proxy that hide the remote aspect of the EJB remote interface. Allows the execution of remote methods on the specified EJB. ! * ! * @author letiemble ! * @created 2 janvier 2002 ! * @version $Revision$ ! * @todo Reference to Rickard Öberg ! * @javabean:class displayName="Enterprise Java Bean" ! * shortDescription="EJB Remote interface" ! * @javabean:icons color16="/toolbarButtonGraphics/development/EnterpriseJavaBean16.gif" ! */ ! public class EJBObjectProxy extends JNDIEntry implements InvocationHandler ! { ! /** Description of the Field */ ! protected transient Customizer c; ! /** Description of the Field */ ! protected String desc; ! /** Description of the Field */ ! protected BeanInfo info; ! /** Description of the Field */ ! protected Object obj; ! /** Description of the Field */ ! protected Object proxy; ! /** Description of the Field */ ! protected PropertyChangeSupport ps; ! /** Description of the Field */ ! protected Class remote; ! ! ! /** ! * Constructor for the EJBObjectProxy object ! * ! * @param obj Description of Parameter ! * @param cl Description of Parameter ! * @exception Exception Description of Exception ! */ ! public EJBObjectProxy(Object obj, ClassLoader cl) ! throws Exception ! { ! this.obj = obj; ! ! Class[] intf = obj.getClass().getInterfaces(); ! for (int i = 0; i < intf.length; i++) ! { ! if (EJBObject.class.isAssignableFrom(intf[i])) ! { ! remote = intf[i]; ! } ! } ! ! this.info = Introspector.getBeanInfo(this.remote); ! this.proxy = Proxy.newProxyInstance(cl, new Class[]{BeanInfo.class, remote, PropertyChanger.class}, this); ! this.ps = new PropertyChangeSupport(proxy); ! } ! ! ! /** ! * Gets the component attribute of the EJBObjectProxy object ! * ! * @return The component value ! */ ! public Component getComponent() ! { ! if (c == null) ! { ! c = new GenericCustomizer(proxy); ! } ! return (Component) c; ! } ! ! ! /** ! * Description of the Method ! * ! * @param proxy Description of Parameter ! * @param method Description of Parameter ! * @param args Description of Parameter ! * @return Description of the Returned Value ! * @exception Throwable Description of Exception ! */ ! public Object invoke(Object proxy, Method method, Object[] args) ! throws Throwable ! { ! if (method.getDeclaringClass().equals(BeanInfo.class)) ! { ! return method.invoke(info, args); ! } ! else if (method.getDeclaringClass().equals(Object.class)) ! { ! return method.invoke(this, args); ! } ! else if (method.getDeclaringClass().equals(PropertyChanger.class)) ! { ! if (method.getName().startsWith("add")) ! { ! ps.addPropertyChangeListener((PropertyChangeListener) args[0]); ! } ! else ! { ! ps.removePropertyChangeListener((PropertyChangeListener) args[0]); ! } ! return null; ! } ! else ! { ! try ! { ! return method.invoke(obj, args); ! } ! finally ! { ! if (!(method.getName().startsWith("get") || method.getName().startsWith("is"))) ! { ! ps.firePropertyChange(null, null, null); ! } ! } ! } ! } ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Returned Value ! */ ! public String toString() ! { ! if (desc == null) ! { ! try ! { ! Method m = EJBObject.class.getMethod("getPrimaryKey", new Class[0]); ! desc = m.invoke(obj, new Object[0]).toString(); ! } ! catch (Exception e) ! { ! ! desc = remote.getName().substring(remote.getName().lastIndexOf(".") + 1); ! //desc = remote.toString(); ! ! } ! ! } ! return desc; ! } ! } ! Index: PropertyChanger.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/model/ejb/PropertyChanger.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PropertyChanger.java 10 Feb 2003 21:17:50 -0000 1.1 --- PropertyChanger.java 27 Nov 2003 01:30:29 -0000 1.2 *************** *** 1,35 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model.ejb; ! ! import java.beans.PropertyChangeListener; ! ! /** ! * Interface that provides property change management. ! * ! * @author letiemble ! * @created 2 janvier 2002 ! * @version $Revision$ ! * @todo Reference to Rickard Öberg ! */ ! public interface PropertyChanger ! { ! /** ! * Adds a PropertyChangeListener to the underlying collection ! * ! * @param pcl The PropertyChangeListener to add ! */ ! public void addPropertyChangeListener(PropertyChangeListener pcl); ! ! ! /** ! * Removes a PropertyChangeListener to the underlying collection ! * ! * @param pcl The PropertyChangeListener to remove ! */ ! public void removePropertyChangeListener(PropertyChangeListener pcl); ! } --- 1,35 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model.ejb; ! ! import java.beans.PropertyChangeListener; ! ! /** ! * Interface that provides property change management. ! * ! * @author letiemble ! * @created 2 janvier 2002 ! * @version $Revision$ ! * @todo Reference to Rickard Öberg ! */ ! public interface PropertyChanger ! { ! /** ! * Adds a PropertyChangeListener to the underlying collection ! * ! * @param pcl The PropertyChangeListener to add ! */ ! public void addPropertyChangeListener(PropertyChangeListener pcl); ! ! ! /** ! * Removes a PropertyChangeListener to the underlying collection ! * ! * @param pcl The PropertyChangeListener to remove ! */ ! public void removePropertyChangeListener(PropertyChangeListener pcl); ! } |
From: <let...@us...> - 2003-11-27 01:30:32
|
Update of /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/model/mail In directory sc8-pr-cvs1:/tmp/cvs-serv17169/jndi.browser/src/main/org/ejtools/jndi/browser/model/mail Modified Files: SessionProxy.java Log Message: Address Todo #755528 Address Todo #800902 Index: SessionProxy.java =================================================================== RCS file: /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/model/mail/SessionProxy.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SessionProxy.java 24 Feb 2003 22:32:28 -0000 1.2 --- SessionProxy.java 27 Nov 2003 01:30:29 -0000 1.3 *************** *** 1,90 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model.mail; ! ! import java.util.Properties; ! ! import javax.mail.Provider; ! import javax.mail.Session; ! import javax.naming.Context; ! import javax.rmi.PortableRemoteObject; ! ! import org.ejtools.jndi.browser.model.JNDIContext; ! ! /** ! * Describe a mail session. ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @javabean:class displayName="Mail Session" ! * shortDescription="Mail Session" ! * @javabean:icons color16="/toolbarButtonGraphics/development/JavaMailResource16.gif" ! * @javabean:property name="name" ! * class="java.lang.String" ! * displayName="Name" ! * shortDescription="Name of the entry" ! * @javabean:property name="className" ! * class="java.lang.String" ! * displayName="Class" ! * shortDescription="Class of the entry" ! * @javabean:property name="properties" ! * class="java.util.Properties" ! * displayName="Properties" ! * shortDescription="Properties of the session" ! * @javabean:property name="providers" ! * class="javax.mail.Provider" ! * displayName="Providers" ! * shortDescription="Providers of the session" ! */ ! public class SessionProxy extends JNDIContext ! { ! /** Description of the Field */ ! protected Session session; ! ! ! /** ! * Constructor for the SessionProxy object ! * ! * @param context Description of the Parameter ! * @param jndiName Description of the Parameter ! * @exception Exception Description of the Exception ! */ ! public SessionProxy(Context context, String jndiName) ! throws Exception ! { ! // Try to narrow to an EJBHome class ! Object o = context.lookup(jndiName); ! session = (Session) PortableRemoteObject.narrow(o, Session.class); ! ! this.setName(jndiName); ! this.setClassName(session.getClass().getName()); ! } ! ! ! /** ! * Gets the properties attribute of the SessionProxy object ! * ! * @return The properties value ! */ ! public Properties getProperties() ! { ! return session.getProperties(); ! } ! ! ! /** ! * Gets the providers attribute of the SessionProxy object ! * ! * @return The providers value ! */ ! public Provider[] getProviders() ! { ! return session.getProviders(); ! } ! } --- 1,90 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jndi.browser.model.mail; ! ! import java.util.Properties; ! ! import javax.mail.Provider; ! import javax.mail.Session; ! import javax.naming.Context; ! import javax.rmi.PortableRemoteObject; ! ! import org.ejtools.jndi.browser.model.JNDIContext; ! ! /** ! * Describe a mail session. ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @javabean:class displayName="Mail Session" ! * shortDescription="Mail Session" ! * @javabean:icons color16="/toolbarButtonGraphics/development/JavaMailResource16.gif" ! * @javabean:property name="name" ! * class="java.lang.String" ! * displayName="Name" ! * shortDescription="Name of the entry" ! * @javabean:property name="className" ! * class="java.lang.String" ! * displayName="Class" ! * shortDescription="Class of the entry" ! * @javabean:property name="properties" ! * class="java.util.Properties" ! * displayName="Properties" ! * shortDescription="Properties of the session" ! * @javabean:property name="providers" ! * class="javax.mail.Provider" ! * displayName="Providers" ! * shortDescription="Providers of the session" ! */ ! public class SessionProxy extends JNDIContext ! { ! /** Description of the Field */ ! protected Session session; ! ! ! /** ! * Constructor for the SessionProxy object ! * ! * @param context Description of the Parameter ! * @param jndiName Description of the Parameter ! * @exception Exception Description of the Exception ! */ ! public SessionProxy(Context context, String jndiName) ! throws Exception ! { ! // Try to narrow to an EJBHome class ! Object o = context.lookup(jndiName); ! session = (Session) PortableRemoteObject.narrow(o, Session.class); ! ! this.setName(jndiName); ! this.setClassName(session.getClass().getName()); ! } ! ! ! /** ! * Gets the properties attribute of the SessionProxy object ! * ! * @return The properties value ! */ ! public Properties getProperties() ! { ! return session.getProperties(); ! } ! ! ! /** ! * Gets the providers attribute of the SessionProxy object ! * ! * @return The providers value ! */ ! public Provider[] getProviders() ! { ! return session.getProviders(); ! } ! } |
From: <let...@us...> - 2003-11-27 01:26:05
|
Update of /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/state/rules In directory sc8-pr-cvs1:/tmp/cvs-serv16880/jndi.browser/src/main/org/ejtools/jndi/browser/state/rules Log Message: Directory /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/state/rules added to the repository |
From: <let...@us...> - 2003-11-27 01:25:51
|
Update of /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/state In directory sc8-pr-cvs1:/tmp/cvs-serv16821/jndi.browser/src/main/org/ejtools/jndi/browser/state Log Message: Directory /cvsroot/ejtools/applications/jndi.browser/src/main/org/ejtools/jndi/browser/state added to the repository |
From: <let...@us...> - 2003-11-27 01:13:42
|
Update of /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/model/service In directory sc8-pr-cvs1:/tmp/cvs-serv13614/jmx.browser/src/main/org/ejtools/jmx/browser/model/service Modified Files: CacheService.java CacheServiceProvider.java ConnectionMetaData.java ConnectionServiceProvider.java CustomizationService.java CustomizationServiceProvider.java NotificationService.java NotificationServiceProvider.java Log Message: Address Bug #775745 Address Todo #800902 Address Todo #755528 Remove @created tags Add support for MXJ4 2.0.0 (still beta) Add support for JXM Remoting through RMI Index: CacheService.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/model/service/CacheService.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CacheService.java 10 Feb 2003 20:49:31 -0000 1.1 --- CacheService.java 27 Nov 2003 01:13:07 -0000 1.2 *************** *** 1,68 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.model.service; ! ! import java.io.Serializable; ! import java.util.Enumeration; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public interface CacheService extends Serializable ! { ! /** Description of the Field */ ! public final int DOMAIN_TYPE = 0; ! /** Description of the Field */ ! public final int RESOURCE_TYPE = 1; ! ! ! /** ! * Adds a feature to the Entity attribute of the CacheService object ! * ! * @param type Description of the Parameter ! * @param key Description of the Parameter ! * @param value Description of the Parameter ! */ ! public void add(int type, Object key, Object value); ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! * @param key Description of the Parameter ! */ ! public void remove(int type, Object key); ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! * @return Description of the Return Value ! */ ! public Enumeration keys(int type); ! ! ! /** Description of the Method */ ! public void clear(); ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! * @param key Description of the Parameter ! * @return Description of the Return Value ! */ ! public Object get(int type, Object key); ! } --- 1,68 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.model.service; ! ! import java.io.Serializable; ! import java.util.Enumeration; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public interface CacheService extends Serializable ! { ! /** Description of the Field */ ! public final int DOMAIN_TYPE = 0; ! /** Description of the Field */ ! public final int RESOURCE_TYPE = 1; ! ! ! /** ! * Adds a feature to the Entity attribute of the CacheService object ! * ! * @param type Description of the Parameter ! * @param key Description of the Parameter ! * @param value Description of the Parameter ! */ ! public void add(int type, Object key, Object value); ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! * @param key Description of the Parameter ! */ ! public void remove(int type, Object key); ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! * @return Description of the Return Value ! */ ! public Enumeration keys(int type); ! ! ! /** Description of the Method */ ! public void clear(); ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! * @param key Description of the Parameter ! * @return Description of the Return Value ! */ ! public Object get(int type, Object key); ! } Index: CacheServiceProvider.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/model/service/CacheServiceProvider.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CacheServiceProvider.java 24 Feb 2003 22:02:36 -0000 1.2 --- CacheServiceProvider.java 27 Nov 2003 01:13:07 -0000 1.3 *************** *** 1,168 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.model.service; ! ! import java.beans.beancontext.BeanContextServices; ! import java.util.Enumeration; ! import java.util.Hashtable; ! import java.util.Iterator; ! import java.util.Vector; ! ! import org.apache.log4j.Logger; ! import org.ejtools.beans.beancontext.CustomBeanContextServiceProvider; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @todo Service release to complete ! */ ! public class CacheServiceProvider extends CustomBeanContextServiceProvider implements CacheService ! { ! /** Description of the Field */ ! protected Hashtable domains = new Hashtable(); ! /** Description of the Field */ ! protected Hashtable resources = new Hashtable(); ! /** Description of the Field */ ! protected CacheService service = null; ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(CacheServiceProvider.class); ! ! ! /** Constructor for the ConnectionServiceProvider object */ ! public CacheServiceProvider() ! { ! service = this; ! } ! ! ! /** ! * Adds a feature to the Entity attribute of the CacheServiceProvider object ! * ! * @param type Description of the Parameter ! * @param key Description of the Parameter ! * @param value Description of the Parameter ! */ ! public void add(int type, Object key, Object value) ! { ! this.getTable(type).put(key, value); ! // logger.debug("Entity added " + type + ", " + key); ! } ! ! ! /** Description of the Method */ ! public void clear() ! { ! super.clear(); ! this.getTable(CacheService.DOMAIN_TYPE).clear(); ! this.getTable(CacheService.RESOURCE_TYPE).clear(); ! } ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! * @param key Description of the Parameter ! * @return Description of the Return Value ! */ ! public Object get(int type, Object key) ! { ! return this.getTable(type).get(key); ! } ! ! ! /** ! * Getter for the currentServiceSelectors attribute ! * ! * @param bcs Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @return The value ! */ ! public Iterator getCurrentServiceSelectors(BeanContextServices bcs, java.lang.Class serviceClass) ! { ! return (new Vector()).iterator(); ! } ! ! ! /** ! * Getter for the service attribute ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @param serviceSelector Description of the Parameter ! * @return The value ! */ ! public Object getService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Class serviceClass, java.lang.Object serviceSelector) ! { ! return this.service; ! } ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! * @return Description of the Return Value ! */ ! public Enumeration keys(int type) ! { ! return this.getTable(type).keys(); ! } ! ! ! /** ! * Description of the Method ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param service Description of the Parameter ! */ ! public void releaseService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Object service) { } ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! * @param key Description of the Parameter ! */ ! public void remove(int type, Object key) ! { ! this.getTable(type).remove(key); ! // logger.debug("Entity removed " + type + ", " + key); ! } ! ! ! /** ! * @return The serviceClass value ! */ ! protected Class[] getServiceClass() ! { ! return new Class[]{CacheService.class}; ! } ! ! ! /** ! * Gets the table attribute of the CacheServiceProvider object ! * ! * @param type Description of the Parameter ! * @return The table value ! */ ! protected Hashtable getTable(int type) ! { ! if (type == CacheService.DOMAIN_TYPE) ! { ! return this.domains; ! } ! return this.resources; ! } ! } --- 1,165 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.model.service; ! ! import java.beans.beancontext.BeanContextServices; ! import java.util.Enumeration; ! import java.util.Hashtable; ! import java.util.Iterator; ! import java.util.Vector; ! ! import org.ejtools.beans.beancontext.CustomBeanContextServiceProvider; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @todo Service release to complete ! */ ! public class CacheServiceProvider extends CustomBeanContextServiceProvider implements CacheService ! { ! /** Description of the Field */ ! protected Hashtable domains = new Hashtable(); ! /** Description of the Field */ ! protected Hashtable resources = new Hashtable(); ! /** Description of the Field */ ! protected CacheService service = null; ! ! ! /** Constructor for the ConnectionServiceProvider object */ ! public CacheServiceProvider() ! { ! service = this; ! } ! ! ! /** ! * Adds a feature to the Entity attribute of the CacheServiceProvider object ! * ! * @param type Description of the Parameter ! * @param key Description of the Parameter ! * @param value Description of the Parameter ! */ ! public void add(int type, Object key, Object value) ! { ! this.getTable(type).put(key, value); ! // logger.debug("Entity added " + type + ", " + key); ! } ! ! ! /** Description of the Method */ ! public void clear() ! { ! super.clear(); ! this.getTable(CacheService.DOMAIN_TYPE).clear(); ! this.getTable(CacheService.RESOURCE_TYPE).clear(); ! } ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! * @param key Description of the Parameter ! * @return Description of the Return Value ! */ ! public Object get(int type, Object key) ! { ! return this.getTable(type).get(key); ! } ! ! ! /** ! * Getter for the currentServiceSelectors attribute ! * ! * @param bcs Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @return The value ! */ ! public Iterator getCurrentServiceSelectors(BeanContextServices bcs, java.lang.Class serviceClass) ! { ! return (new Vector()).iterator(); ! } ! ! ! /** ! * Getter for the service attribute ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @param serviceSelector Description of the Parameter ! * @return The value ! */ ! public Object getService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Class serviceClass, java.lang.Object serviceSelector) ! { ! return this.service; ! } ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! * @return Description of the Return Value ! */ ! public Enumeration keys(int type) ! { ! return this.getTable(type).keys(); ! } ! ! ! /** ! * Description of the Method ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param service Description of the Parameter ! */ ! public void releaseService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Object service) { } ! ! ! /** ! * Description of the Method ! * ! * @param type Description of the Parameter ! * @param key Description of the Parameter ! */ ! public void remove(int type, Object key) ! { ! this.getTable(type).remove(key); ! // logger.debug("Entity removed " + type + ", " + key); ! } ! ! ! /** ! * @return The serviceClass value ! */ ! protected Class[] getServiceClass() ! { ! return new Class[]{CacheService.class}; ! } ! ! ! /** ! * Gets the table attribute of the CacheServiceProvider object ! * ! * @param type Description of the Parameter ! * @return The table value ! */ ! protected Hashtable getTable(int type) ! { ! if (type == CacheService.DOMAIN_TYPE) ! { ! return this.domains; ! } ! return this.resources; ! } ! } Index: ConnectionMetaData.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/model/service/ConnectionMetaData.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ConnectionMetaData.java 24 Feb 2003 22:02:37 -0000 1.2 --- ConnectionMetaData.java 27 Nov 2003 01:13:07 -0000 1.3 *************** *** 22,29 **** --- 22,31 ---- ConnectionMetaData.PACKAGES, ConnectionMetaData.URL, + ConnectionMetaData.SERVICE, ConnectionMetaData.CONTEXT, ConnectionMetaData.PRINCIPAL, ConnectionMetaData.CREDENTIALS }; + /** Description of the Field */ public final static String CLASS_NAME = "classname"; *************** *** 40,43 **** --- 42,47 ---- /** Description of the Field */ public final static String URL = "url"; + /** Description of the Field */ + public final static String SERVICE = "service"; Index: ConnectionServiceProvider.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/model/service/ConnectionServiceProvider.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ConnectionServiceProvider.java 24 Feb 2003 22:02:35 -0000 1.3 --- ConnectionServiceProvider.java 27 Nov 2003 01:13:07 -0000 1.4 *************** *** 43,65 **** * * @param metadata Description of the Parameter */ public ConnectionServiceProvider(Profile metadata) { ! try ! { ! ConnectionService service = (ConnectionService) Thread.currentThread().getContextClassLoader().loadClass(metadata.getProperty(ConnectionMetaData.CLASS_NAME)).newInstance(); ! this.setup(service); ! } ! catch (ClassNotFoundException cnfe) ! { ! logger.error(cnfe.getMessage(), cnfe); ! } ! catch (IllegalAccessException iae) { ! logger.error(iae.getMessage(), iae); } ! catch (Exception e) { ! logger.error(e.getMessage(), e); } } --- 43,75 ---- * * @param metadata Description of the Parameter + * @param loader Description of the Parameter */ public ConnectionServiceProvider(Profile metadata) { ! // Create the connection service from metadatas ! String clazz = metadata.getProperty(ConnectionMetaData.CLASS_NAME); ! if (clazz != null) { ! try ! { ! ConnectionService service = (ConnectionService) Thread.currentThread().getContextClassLoader().loadClass(clazz).newInstance(); ! this.setup(service); ! } ! catch (ClassNotFoundException cnfe) ! { ! logger.error(cnfe.getMessage(), cnfe); ! } ! catch (IllegalAccessException iae) ! { ! logger.error(iae.getMessage(), iae); ! } ! catch (Exception e) ! { ! logger.error(e.getMessage(), e); ! } } ! else { ! logger.error("Class provided is null"); } } Index: CustomizationService.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/model/service/CustomizationService.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CustomizationService.java 10 Feb 2003 20:49:30 -0000 1.1 --- CustomizationService.java 27 Nov 2003 01:13:07 -0000 1.2 *************** *** 1,42 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.model.service; ! ! import java.io.Serializable; ! import java.util.Collection; ! ! import org.ejtools.jmx.browser.mbean.View; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public interface CustomizationService extends Serializable ! { ! /** ! * Gets the views attribute of the CustomizationService object ! * ! * @return The views value ! */ ! public Collection getViews(); ! ! ! /** ! * Gets the view attribute of the CustomizationService object ! * ! * @param index Description of the Parameter ! * @return The view value ! * @paramindex Description of the Parameter ! * @paramindex Description of the Parameter ! * @paramindex Description of the Parameter ! */ ! public View getView(int index); ! } --- 1,42 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.model.service; ! ! import java.io.Serializable; ! import java.util.Collection; ! ! import org.ejtools.jmx.browser.mbean.View; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public interface CustomizationService extends Serializable ! { ! /** ! * Gets the views attribute of the CustomizationService object ! * ! * @return The views value ! */ ! public Collection getViews(); ! ! ! /** ! * Gets the view attribute of the CustomizationService object ! * ! * @param index Description of the Parameter ! * @return The view value ! * @paramindex Description of the Parameter ! * @paramindex Description of the Parameter ! * @paramindex Description of the Parameter ! */ ! public View getView(int index); ! } Index: CustomizationServiceProvider.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/model/service/CustomizationServiceProvider.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CustomizationServiceProvider.java 12 Feb 2003 21:22:42 -0000 1.2 --- CustomizationServiceProvider.java 27 Nov 2003 01:13:07 -0000 1.3 *************** *** 1,192 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.model.service; ! ! import java.beans.beancontext.BeanContextServices; ! import java.util.Arrays; ! import java.util.Collection; ! import java.util.Iterator; ! import java.util.Vector; ! ! import org.apache.log4j.Logger; ! import org.ejtools.beans.beancontext.CustomBeanContextServiceProvider; ! import org.ejtools.jmx.browser.mbean.CustomViewDeployer; ! import org.ejtools.jmx.browser.mbean.View; ! import org.ejtools.jmx.browser.model.Resource; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @todo Service release to complete ! */ ! public class CustomizationServiceProvider extends CustomBeanContextServiceProvider implements CustomizationService ! { ! /** Description of the Field */ ! protected CustomizationService service = null; ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(CustomizationServiceProvider.class); ! ! ! /** Constructor for the CustomizationServiceProvider object */ ! public CustomizationServiceProvider() ! { ! this.service = this; ! } ! ! ! /** ! * Getter for the currentServiceSelectors attribute ! * ! * @param bcs Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @return The value ! */ ! public Iterator getCurrentServiceSelectors(BeanContextServices bcs, java.lang.Class serviceClass) ! { ! return (new Vector()).iterator(); ! } ! ! ! /** ! * Getter for the service attribute ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @param serviceSelector Description of the Parameter ! * @return The value ! * @parambcs Description of the Parameter ! * @paramrequestor Description of the Parameter ! * @paramserviceClass Description of the Parameter ! * @paramserviceSelector Description of the Parameter ! * @parambcs Description of the Parameter ! * @paramrequestor Description of the Parameter ! * @paramserviceClass Description of the Parameter ! * @paramserviceSelector Description of the Parameter ! * @parambcs Description of Parameter ! * @paramrequestor Description of Parameter ! * @paramserviceClass Description of Parameter ! * @paramserviceSelector Description of Parameter ! */ ! public Object getService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Class serviceClass, java.lang.Object serviceSelector) ! { ! return service; ! } ! ! ! /** ! * Gets the view attribute of the CustomizationServiceProvider object ! * ! * @param index Description of the Parameter ! * @return The view value ! * @paramindex Description of the Parameter ! * @paramindex Description of the Parameter ! * @paramindex Description of the Parameter ! */ ! public View getView(int index) ! { ! logger.debug("Getting view by index=" + index); ! ! BeanContextServices context = (BeanContextServices) getBeanContext(); ! ! View result = null; ! ! if (context.hasService(ConnectionService.class) && context.hasService(CacheService.class)) ! { ! logger.debug("Using service ConnectionService and CacheService..."); ! try ! { ! ConnectionService service = (ConnectionService) context.getService(this, this, ConnectionService.class, this, this); ! CacheService cache = (CacheService) context.getService(this, this, CacheService.class, this, this); ! ! Resource resource = (Resource) cache.get(CacheService.RESOURCE_TYPE, CustomViewDeployer.OBJECT_NAME); ! if (resource != null) ! { ! result = (View) resource.invoke("getView", new Object[]{new Integer(index)}, new String[]{"int"}); ! } ! ! context.releaseService(this, this, CacheService.class); ! context.releaseService(this, this, ConnectionService.class); ! } ! catch (Exception e) ! { ! e.printStackTrace(); ! logger.error("Error during utilisation of service ConnectionService or CacheService (" + e.getMessage() + ")"); ! } ! } ! ! return result; ! } ! ! ! /** ! * Gets the views attribute of the CustomizationServiceProvider object ! * ! * @return The views value ! */ ! public Collection getViews() ! { ! logger.debug("Getting views"); ! ! BeanContextServices context = (BeanContextServices) getBeanContext(); ! ! Collection result = new Vector(); ! ! if (context.hasService(ConnectionService.class) && context.hasService(CacheService.class)) ! { ! logger.debug("Using service ConnectionService and CacheService..."); ! try ! { ! ConnectionService service = (ConnectionService) context.getService(this, this, ConnectionService.class, this, this); ! CacheService cache = (CacheService) context.getService(this, this, CacheService.class, this, this); ! ! Resource resource = (Resource) cache.get(CacheService.RESOURCE_TYPE, CustomViewDeployer.OBJECT_NAME); ! if (resource != null) ! { ! View[] views = (View[]) resource.getAttribute("Views"); ! if (views != null) ! { ! result.addAll(Arrays.asList(views)); ! } ! } ! ! context.releaseService(this, this, CacheService.class); ! context.releaseService(this, this, ConnectionService.class); ! } ! catch (Exception e) ! { ! e.printStackTrace(); ! logger.error("Error during utilisation of service ConnectionService or CacheService (" + e.getMessage() + ")"); ! } ! } ! ! return result; ! } ! ! ! /** ! * Description of the Method ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param service Description of the Parameter ! */ ! public void releaseService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Object service) { } ! ! ! /** ! * @return The serviceClass value ! */ ! protected Class[] getServiceClass() ! { ! return new Class[]{CustomizationService.class}; ! } ! } --- 1,177 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.model.service; ! ! import java.beans.beancontext.BeanContextServices; ! import java.util.Arrays; ! import java.util.Collection; ! import java.util.Iterator; ! import java.util.Vector; ! ! import org.apache.log4j.Logger; ! import org.ejtools.beans.beancontext.CustomBeanContextServiceProvider; ! import org.ejtools.jmx.browser.mbean.CustomViewDeployer; ! import org.ejtools.jmx.browser.mbean.View; ! import org.ejtools.jmx.browser.model.Resource; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 13 d?cembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @todo Service release to complete ! */ ! public class CustomizationServiceProvider extends CustomBeanContextServiceProvider implements CustomizationService ! { ! /** Description of the Field */ ! protected CustomizationService service = null; ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(CustomizationServiceProvider.class); ! ! ! /** Constructor for the CustomizationServiceProvider object */ ! public CustomizationServiceProvider() ! { ! this.service = this; ! } ! ! ! /** ! * Getter for the currentServiceSelectors attribute ! * ! * @param bcs Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @return The value ! */ ! public Iterator getCurrentServiceSelectors(BeanContextServices bcs, java.lang.Class serviceClass) ! { ! return (new Vector()).iterator(); ! } ! ! ! /** ! * Getter for the service attribute ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @param serviceSelector Description of the Parameter ! * @return The value ! */ ! public Object getService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Class serviceClass, java.lang.Object serviceSelector) ! { ! return service; ! } ! ! ! /** ! * Gets the view attribute of the CustomizationServiceProvider object ! * ! * @param index Description of the Parameter ! * @return The view value ! */ ! public View getView(int index) ! { ! logger.debug("Getting view by index=" + index); ! ! BeanContextServices context = (BeanContextServices) getBeanContext(); ! ! View result = null; ! ! if (context.hasService(ConnectionService.class) && context.hasService(CacheService.class)) ! { ! logger.debug("Using service ConnectionService and CacheService..."); ! try ! { ! ConnectionService service = (ConnectionService) context.getService(this, this, ConnectionService.class, this, this); ! CacheService cache = (CacheService) context.getService(this, this, CacheService.class, this, this); ! ! Resource resource = (Resource) cache.get(CacheService.RESOURCE_TYPE, CustomViewDeployer.OBJECT_NAME); ! if (resource != null) ! { ! result = (View) resource.invoke("getView", new Object[]{new Integer(index)}, new String[]{"int"}); ! } ! ! context.releaseService(this, this, CacheService.class); ! context.releaseService(this, this, ConnectionService.class); ! } ! catch (Exception e) ! { ! e.printStackTrace(); ! logger.error("Error during utilisation of service ConnectionService or CacheService (" + e.getMessage() + ")"); ! } ! } ! ! return result; ! } ! ! ! /** ! * Gets the views attribute of the CustomizationServiceProvider object ! * ! * @return The views value ! */ ! public Collection getViews() ! { ! logger.debug("Getting views"); ! ! BeanContextServices context = (BeanContextServices) getBeanContext(); ! ! Collection result = new Vector(); ! ! if (context.hasService(ConnectionService.class) && context.hasService(CacheService.class)) ! { ! logger.debug("Using service ConnectionService and CacheService..."); ! try ! { ! ConnectionService service = (ConnectionService) context.getService(this, this, ConnectionService.class, this, this); ! CacheService cache = (CacheService) context.getService(this, this, CacheService.class, this, this); ! ! Resource resource = (Resource) cache.get(CacheService.RESOURCE_TYPE, CustomViewDeployer.OBJECT_NAME); ! if (resource != null) ! { ! View[] views = (View[]) resource.getAttribute("Views"); ! if (views != null) ! { ! result.addAll(Arrays.asList(views)); ! } ! } ! ! context.releaseService(this, this, CacheService.class); ! context.releaseService(this, this, ConnectionService.class); ! } ! catch (Exception e) ! { ! e.printStackTrace(); ! logger.error("Error during utilisation of service ConnectionService or CacheService (" + e.getMessage() + ")"); ! } ! } ! ! return result; ! } ! ! ! /** ! * Description of the Method ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param service Description of the Parameter ! */ ! public void releaseService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Object service) { } ! ! ! /** ! * @return The serviceClass value ! */ ! protected Class[] getServiceClass() ! { ! return new Class[]{CustomizationService.class}; ! } ! } Index: NotificationService.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/model/service/NotificationService.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NotificationService.java 10 Feb 2003 20:49:29 -0000 1.1 --- NotificationService.java 27 Nov 2003 01:13:07 -0000 1.2 *************** *** 1,66 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.model.service; ! ! import java.io.Serializable; ! import java.util.Collection; ! ! import javax.management.ObjectName; ! ! /** ! * @author letiembl ! * @created 13 juin 2002 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public interface NotificationService extends Serializable ! { ! /** ! * Adds a feature to the ObjectName attribute of the NotificationService object ! * ! * @param object The feature to be added to the ObjectName attribute ! * @paramobject The feature to be added to the ObjectName attribute ! * @paramobject The feature to be added to the ObjectName attribute ! * @paramobject The feature to be added to the ObjectName attribute ! */ ! public void addObjectName(ObjectName object); ! ! ! /** ! * Description of the Method ! * ! * @param object Description of the Parameter ! * @paramobject Description of the Parameter ! * @paramobject Description of the Parameter ! * @paramobject Description of the Parameter ! */ ! public void removeObjectName(ObjectName object); ! ! ! /** ! * Description of the Method ! * ! * @param object Description of the Parameter ! * @return Description of the Return Value ! * @paramobject Description of the Parameter ! * @paramobject Description of the Parameter ! * @paramobject Description of the Parameter ! */ ! public boolean hasObjectName(ObjectName object); ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Return Value ! */ ! public Collection listAll(); ! ! ! /** Description of the Method */ ! public void clearAll(); ! } --- 1,66 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.model.service; ! ! import java.io.Serializable; ! import java.util.Collection; ! ! import javax.management.ObjectName; ! ! /** ! * @author letiembl ! * @created 13 juin 2002 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public interface NotificationService extends Serializable ! { ! /** ! * Adds a feature to the ObjectName attribute of the NotificationService object ! * ! * @param object The feature to be added to the ObjectName attribute ! * @paramobject The feature to be added to the ObjectName attribute ! * @paramobject The feature to be added to the ObjectName attribute ! * @paramobject The feature to be added to the ObjectName attribute ! */ ! public void addObjectName(ObjectName object); ! ! ! /** ! * Description of the Method ! * ! * @param object Description of the Parameter ! * @paramobject Description of the Parameter ! * @paramobject Description of the Parameter ! * @paramobject Description of the Parameter ! */ ! public void removeObjectName(ObjectName object); ! ! ! /** ! * Description of the Method ! * ! * @param object Description of the Parameter ! * @return Description of the Return Value ! * @paramobject Description of the Parameter ! * @paramobject Description of the Parameter ! * @paramobject Description of the Parameter ! */ ! public boolean hasObjectName(ObjectName object); ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Return Value ! */ ! public Collection listAll(); ! ! ! /** Description of the Method */ ! public void clearAll(); ! } Index: NotificationServiceProvider.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/model/service/NotificationServiceProvider.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** NotificationServiceProvider.java 1 Apr 2003 21:53:10 -0000 1.3 --- NotificationServiceProvider.java 27 Nov 2003 01:13:07 -0000 1.4 *************** *** 1,396 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.model.service; ! ! import java.awt.Component; ! import java.beans.beancontext.BeanContextChildComponentProxy; ! import java.beans.beancontext.BeanContextServices; ! import java.util.Collection; ! import java.util.Iterator; ! import java.util.ResourceBundle; ! import java.util.Vector; ! ! import javax.management.Notification; ! import javax.management.NotificationListener; ! import javax.management.ObjectName; ! import javax.swing.JTable; ! import javax.swing.table.AbstractTableModel; ! ! import org.apache.log4j.Logger; ! import org.ejtools.beans.beancontext.CustomBeanContextServiceProvider; ! import org.ejtools.swing.table.TableModelSorter; ! import org.ejtools.util.LimitedStack; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public class NotificationServiceProvider extends CustomBeanContextServiceProvider implements BeanContextChildComponentProxy, NotificationService, NotificationListener ! { ! /** Description of the Field */ ! protected NotificationTableModel model = null; ! /** Description of the Field */ ! protected LimitedStack notifications = new LimitedStack(500); ! /** Description of the Field */ ! protected Vector objectNames = new Vector(); ! /** Description of the Field */ ! protected NotificationService service = null; ! /** Description of the Field */ ! protected JTable table = null; ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(NotificationServiceProvider.class); ! /** Description of the Field */ ! private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.jmx.browser.Resources"); ! ! ! /** Constructor for the ConnectionServiceProvider object */ ! public NotificationServiceProvider() ! { ! this.service = this; ! } ! ! ! /** ! * Adds a feature to the ObjectName attribute of the NotificationService object ! * ! * @param object The feature to be added to the ObjectName attribute ! */ ! public void addObjectName(ObjectName object) ! { ! BeanContextServices context = (BeanContextServices) getBeanContext(); ! ! if (this.hasObjectName(object)) ! { ! return; ! } ! ! if (context.hasService(ConnectionService.class)) ! { ! logger.debug("Using service ConnectionService..."); ! try ! { ! ConnectionService service = (ConnectionService) context.getService(this, this, ConnectionService.class, this, this); ! service.getMBeanServer().addNotificationListener(object, this, null, "EJTOOLS JMX BROWSER"); ! this.objectNames.add(object.getCanonicalName()); ! } ! catch (Exception e) ! { ! logger.error("Error during utilisation of service ConnectionService", e); ! } ! finally ! { ! context.releaseService(this, this, ConnectionService.class); ! } ! } ! } ! ! ! /** Description of the Method */ ! public void clearAll() ! { ! this.notifications.clear(); ! } ! ! ! /** ! * @return The component value ! */ ! public Component getComponent() ! { ! if (this.table == null) ! { ! this.model = new NotificationServiceProvider.NotificationTableModel(); ! TableModelSorter sorter = new TableModelSorter(this.model); ! this.table = new JTable(sorter); ! sorter.addMouseListenerToHeaderInTable(this.table); ! } ! return this.table; ! } ! ! ! /** ! * Getter for the currentServiceSelectors attribute ! * ! * @param bcs Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @return The currentServiceSelectors value ! */ ! public Iterator getCurrentServiceSelectors(BeanContextServices bcs, java.lang.Class serviceClass) ! { ! return (new Vector()).iterator(); ! } ! ! ! /** ! * Getter for the service attribute ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @param serviceSelector Description of the Parameter ! * @return The service value ! */ ! public Object getService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Class serviceClass, java.lang.Object serviceSelector) ! { ! return this.service; ! } ! ! ! /** ! * Description of the Method ! * ! * @param notification Description of the Parameter ! * @param handback Description of the Parameter ! */ ! public void handleNotification(Notification notification, java.lang.Object handback) ! { ! logger.debug("Notification received (" + handback + ")"); ! this.notifications.push(notification); ! if (this.model != null) ! { ! this.model.fireTableRowsInserted(this.notifications.size(), this.notifications.size()); ! } ! } ! ! ! /** ! * Description of the Method ! * ! * @param object Description of the Parameter ! * @return Description of the Return Value ! */ ! public boolean hasObjectName(ObjectName object) ! { ! return this.objectNames.contains(object.getCanonicalName()); ! } ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Return Value ! */ ! public Collection listAll() ! { ! return this.reverse(notifications); ! } ! ! ! /** ! * Description of the Method ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param service Description of the Parameter ! */ ! public void releaseService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Object service) { } ! ! ! /** ! * Description of the Method ! * ! * @param object Description of the Parameter ! */ ! public void removeObjectName(ObjectName object) ! { ! BeanContextServices context = (BeanContextServices) getBeanContext(); ! ! if (!this.hasObjectName(object)) ! { ! return; ! } ! ! if (context.hasService(ConnectionService.class)) ! { ! logger.debug("Using service ConnectionService..."); ! try ! { ! ConnectionService service = (ConnectionService) context.getService(this, this, ConnectionService.class, this, this); ! service.getMBeanServer().removeNotificationListener(object, this); ! } ! catch (Exception e) ! { ! logger.error("Error during utilisation of service ConnectionService", e); ! } ! finally ! { ! this.objectNames.remove(object.getCanonicalName()); ! context.releaseService(this, this, ConnectionService.class); ! } ! } ! } ! ! ! /** A unit test for JUnit */ ! public void test() ! { ! for (int i = 0; i < 50; i++) ! { ! Notification n = new Notification("aze", "qsd", 1000); ! this.notifications.add(n); ! } ! } ! ! ! /** ! * @return The serviceClass value ! */ ! protected Class[] getServiceClass() ! { ! return new Class[]{NotificationService.class}; ! } ! ! ! /** ! * Description of the Method ! * ! * @param collection Description of the Parameter ! * @return Description of the Return Value ! * @todo Move elsewhere ! */ ! protected Collection reverse(Collection collection) ! { ! Vector result = new Vector(); ! ! Iterator it = collection.iterator(); ! while (it.hasNext()) ! { ! result.insertElementAt(it.next(), 0); ! } ! ! return result; ! } ! ! ! /** ! * Description of the Class ! * ! * @author letiembl ! * @created 18 septembre 2002 ! * @version $Revision$ ! * @todo I18N ! */ ! private class NotificationTableModel extends AbstractTableModel ! { ! /** Description of the Field */ ! private String COLUMN_MESSAGE = resources.getString("notification.table.column.message"); ! /** Description of the Field */ ! private String COLUMN_SEQUENCE = resources.getString("notification.table.column.sequence"); ! /** Description of the Field */ ! private String COLUMN_SOURCE = resources.getString("notification.table.column.source"); ! /** Description of the Field */ ! private String COLUMN_TIMESTAMP = resources.getString("notification.table.column.timestamp"); ! /** Description of the Field */ ! private String COLUMN_TYPE = resources.getString("notification.table.column.type"); ! ! ! /** ! * @param columnIndex Description of the Parameter ! * @return The columnClass value ! */ ! public Class getColumnClass(int columnIndex) ! { ! switch (columnIndex) ! { ! case 0: ! return Object.class; ! case 1: ! return String.class; ! case 2: ! return String.class; ! case 3: ! return String.class; ! case 4: ! return String.class; ! } ! return Object.class; ! } ! ! ! /** ! * @return The columnCount value ! */ ! public int getColumnCount() ! { ! return 5; ! } ! ! ! /** ! * @param columnIndex Description of the Parameter ! * @return The columnName value ! */ ! public String getColumnName(int columnIndex) ! { ! switch (columnIndex) ! { ! case 0: ! return COLUMN_SOURCE; ! case 1: ! return COLUMN_TIMESTAMP; ! case 2: ! return COLUMN_SEQUENCE; ! case 3: ! return COLUMN_TYPE; ! case 4: ! return COLUMN_MESSAGE; ! } ! return super.getColumnName(columnIndex); ! } ! ! ! /** ! * @return The rowCount value ! */ ! public int getRowCount() ! { ! return NotificationServiceProvider.this.notifications.size(); ! } ! ! ! /** ! * @param rowIndex Description of the Parameter ! * @param columnIndex Description of the Parameter ! * @return The valueAt value ! */ ! public Object getValueAt(int rowIndex, int columnIndex) ! { ! Object o = null; ! if (rowIndex < NotificationServiceProvider.this.notifications.size()) ! { ! Notification notif = (Notification) NotificationServiceProvider.this.notifications.elementAt(rowIndex); ! switch (columnIndex) ! { ! case 0: ! o = notif.getSource(); ! break; ! case 1: ! o = new String("" + notif.getTimeStamp()); ! break; ! case 2: ! o = new String("" + notif.getSequenceNumber()); ! break; ! case 3: ! o = notif.getType(); ! break; ! case 4: ! o = notif.getMessage(); ! break; ! } ! } ! if (o == null) ! { ! o = new String(); ! } ! return o; ! } ! } ! } --- 1,396 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.model.service; ! ! import java.awt.Component; ! import java.beans.beancontext.BeanContextChildComponentProxy; ! import java.beans.beancontext.BeanContextServices; ! import java.util.Collection; ! import java.util.Iterator; ! import java.util.ResourceBundle; ! import java.util.Vector; ! ! import javax.management.Notification; ! import javax.management.NotificationListener; ! import javax.management.ObjectName; ! import javax.swing.JTable; ! import javax.swing.table.AbstractTableModel; ! ! import org.apache.log4j.Logger; ! import org.ejtools.beans.beancontext.CustomBeanContextServiceProvider; ! import org.ejtools.swing.table.TableModelSorter; ! import org.ejtools.util.LimitedStack; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public class NotificationServiceProvider extends CustomBeanContextServiceProvider implements BeanContextChildComponentProxy, NotificationService, NotificationListener ! { ! /** Description of the Field */ ! protected NotificationTableModel model = null; ! /** Description of the Field */ ! protected LimitedStack notifications = new LimitedStack(500); ! /** Description of the Field */ ! protected Vector objectNames = new Vector(); ! /** Description of the Field */ ! protected NotificationService service = null; ! /** Description of the Field */ ! protected JTable table = null; ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(NotificationServiceProvider.class); ! /** Description of the Field */ ! private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.jmx.browser.Resources"); ! ! ! /** Constructor for the ConnectionServiceProvider object */ ! public NotificationServiceProvider() ! { ! this.service = this; ! } ! ! ! /** ! * Adds a feature to the ObjectName attribute of the NotificationService object ! * ! * @param object The feature to be added to the ObjectName attribute ! */ ! public void addObjectName(ObjectName object) ! { ! BeanContextServices context = (BeanContextServices) getBeanContext(); ! ! if (this.hasObjectName(object)) ! { ! return; ! } ! ! if (context.hasService(ConnectionService.class)) ! { ! logger.debug("Using service ConnectionService..."); ! try ! { ! ConnectionService service = (ConnectionService) context.getService(this, this, ConnectionService.class, this, this); ! service.getMBeanServer().addNotificationListener(object, this, null, "EJTOOLS JMX BROWSER"); ! this.objectNames.add(object.getCanonicalName()); ! } ! catch (Exception e) ! { ! logger.error("Error during utilisation of service ConnectionService", e); ! } ! finally ! { ! context.releaseService(this, this, ConnectionService.class); ! } ! } ! } ! ! ! /** Description of the Method */ ! public void clearAll() ! { ! this.notifications.clear(); ! } ! ! ! /** ! * @return The component value ! */ ! public Component getComponent() ! { ! if (this.table == null) ! { ! this.model = new NotificationServiceProvider.NotificationTableModel(); ! TableModelSorter sorter = new TableModelSorter(this.model); ! this.table = new JTable(sorter); ! sorter.addMouseListenerToHeaderInTable(this.table); ! } ! return this.table; ! } ! ! ! /** ! * Getter for the currentServiceSelectors attribute ! * ! * @param bcs Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @return The currentServiceSelectors value ! */ ! public Iterator getCurrentServiceSelectors(BeanContextServices bcs, java.lang.Class serviceClass) ! { ! return (new Vector()).iterator(); ! } ! ! ! /** ! * Getter for the service attribute ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param serviceClass Description of the Parameter ! * @param serviceSelector Description of the Parameter ! * @return The service value ! */ ! public Object getService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Class serviceClass, java.lang.Object serviceSelector) ! { ! return this.service; ! } ! ! ! /** ! * Description of the Method ! * ! * @param notification Description of the Parameter ! * @param handback Description of the Parameter ! */ ! public void handleNotification(Notification notification, java.lang.Object handback) ! { ! logger.debug("Notification received (" + handback + ")"); ! this.notifications.push(notification); ! if (this.model != null) ! { ! this.model.fireTableRowsInserted(this.notifications.size(), this.notifications.size()); ! } ! } ! ! ! /** ! * Description of the Method ! * ! * @param object Description of the Parameter ! * @return Description of the Return Value ! */ ! public boolean hasObjectName(ObjectName object) ! { ! return this.objectNames.contains(object.getCanonicalName()); ! } ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Return Value ! */ ! public Collection listAll() ! { ! return this.reverse(notifications); ! } ! ! ! /** ! * Description of the Method ! * ! * @param bcs Description of the Parameter ! * @param requestor Description of the Parameter ! * @param service Description of the Parameter ! */ ! public void releaseService(BeanContextServices bcs, java.lang.Object requestor, java.lang.Object service) { } ! ! ! /** ! * Description of the Method ! * ! * @param object Description of the Parameter ! */ ! public void removeObjectName(ObjectName object) ! { ! BeanContextServices context = (BeanContextServices) getBeanContext(); ! ! if (!this.hasObjectName(object)) ! { ! return; ! } ! ! if (context.hasService(ConnectionService.class)) ! { ! logger.debug("Using service ConnectionService..."); ! try ! { ! ConnectionService service = (ConnectionService) context.getService(this, this, ConnectionService.class, this, this); ! service.getMBeanServer().removeNotificationListener(object, this); ! } ! catch (Exception e) ! { ! logger.error("Error during utilisation of service ConnectionService", e); ! } ! finally ! { ! this.objectNames.remove(object.getCanonicalName()); ! context.releaseService(this, this, ConnectionService.class); ! } ! } ! } ! ! ! /** A unit test for JUnit */ ! public void test() ! { ! for (int i = 0; i < 50; i++) ! { ! Notification n = new Notification("aze", "qsd", 1000); ! this.notifications.add(n); ! } ! } ! ! ! /** ! * @return The serviceClass value ! */ ! protected Class[] getServiceClass() ! { ! return new Class[]{NotificationService.class}; ! } ! ! ! /** ! * Description of the Method ! * ! * @param collection Description of the Parameter ! * @return Description of the Return Value ! * @todo Move elsewhere ! */ ! protected Collection reverse(Collection collection) ! { ! Vector result = new Vector(); ! ! Iterator it = collection.iterator(); ! while (it.hasNext()) ! { ! result.insertElementAt(it.next(), 0); ! } ! ! return result; ! } ! ! ! /** ! * Description of the Class ! * ! * @author letiembl ! * @created 18 septembre 2002 ! * @version $Revision$ ! * @todo I18N ! */ ! private class NotificationTableModel extends AbstractTableModel ! { ! /** Description of the Field */ ! private String COLUMN_MESSAGE = resources.getString("notification.table.column.message"); ! /** Description of the Field */ ! private String COLUMN_SEQUENCE = resources.getString("notification.table.column.sequence"); ! /** Description of the Field */ ! private String COLUMN_SOURCE = resources.getString("notification.table.column.source"); ! /** Description of the Field */ ! private String COLUMN_TIMESTAMP = resources.getString("notification.table.column.timestamp"); ! /** Description of the Field */ ! private String COLUMN_TYPE = resources.getString("notification.table.column.type"); ! ! ! /** ! * @param columnIndex Description of the Parameter ! * @return The columnClass value ! */ ! public Class getColumnClass(int columnIndex) ! { ! switch (columnIndex) ! { ! case 0: ! return Object.class; ! case 1: ! return String.class; ! case 2: ! return String.class; ! case 3: ! return String.class; ! case 4: ! return String.class; ! } ! return Object.class; ! } ! ! ! /** ! * @return The columnCount value ! */ ! public int getColumnCount() ! { ! return 5; ! } ! ! ! /** ! * @param columnIndex Description of the Parameter ! * @return The columnName value ! */ ! public String getColumnName(int columnIndex) ! { ! switch (columnIndex) ! { ! case 0: ! return COLUMN_SOURCE; ! case 1: ! return COLUMN_TIMESTAMP; ! case 2: ! return COLUMN_SEQUENCE; ! case 3: ! return COLUMN_TYPE; ! ... [truncated message content] |
Update of /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/frame In directory sc8-pr-cvs1:/tmp/cvs-serv13614/jmx.browser/src/main/org/ejtools/jmx/browser/frame Modified Files: NotificationsInternalFrame.java ResourceIndexer.java ServerInternalFrame.java Log Message: Address Bug #775745 Address Todo #800902 Address Todo #755528 Remove @created tags Add support for MXJ4 2.0.0 (still beta) Add support for JXM Remoting through RMI Index: NotificationsInternalFrame.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/frame/NotificationsInternalFrame.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NotificationsInternalFrame.java 24 Feb 2003 22:02:44 -0000 1.2 --- NotificationsInternalFrame.java 27 Nov 2003 01:13:06 -0000 1.3 *************** *** 1,60 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.frame; ! ! import java.awt.BorderLayout; ! import java.beans.PropertyChangeEvent; ! import java.util.ResourceBundle; ! ! import javax.swing.JScrollPane; ! ! import org.ejtools.adwt.service.BeanContextInternalFrame; ! import org.ejtools.jmx.browser.model.service.NotificationServiceProvider; ! ! /** ! * Description of the Class ! * ! * @author <a href="mailto:let...@us...">Laurent Etiemble</a> ! * @created 5 septembre 2002 ! * @version $Revision$ ! */ ! public class NotificationsInternalFrame extends BeanContextInternalFrame ! { ! /** Description of the Field */ ! protected NotificationServiceProvider provider = null; ! /** Description of the Field */ ! private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.jmx.browser.Resources"); ! ! ! /** ! * Constructor for GraphInternalFrame. ! * ! * @param provider Description of the Parameter ! */ ! public NotificationsInternalFrame(NotificationServiceProvider provider) ! { ! super(); ! ! this.provider = provider; ! ! JScrollPane pane = new JScrollPane(this.provider.getComponent()); ! this.frame.getContentPane().add(BorderLayout.CENTER, pane); ! } ! ! ! /** ! * @param event Description of the Parameter ! */ ! public void propertyChange(PropertyChangeEvent event) ! { ! if (event.getPropertyName().equals("name")) ! { ! String newName = (String) event.getNewValue(); ! this.setTitle(resources.getString("notification.text.prefix") + " : " + newName); ! } ! } ! } --- 1,60 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.frame; ! ! import java.awt.BorderLayout; ! import java.beans.PropertyChangeEvent; ! import java.util.ResourceBundle; ! ! import javax.swing.JScrollPane; ! ! import org.ejtools.adwt.service.BeanContextInternalFrame; ! import org.ejtools.jmx.browser.model.service.NotificationServiceProvider; ! ! /** ! * Description of the Class ! * ! * @author <a href="mailto:let...@us...">Laurent Etiemble</a> ! * @created 5 septembre 2002 ! * @version $Revision$ ! */ ! public class NotificationsInternalFrame extends BeanContextInternalFrame ! { ! /** Description of the Field */ ! protected NotificationServiceProvider provider = null; ! /** Description of the Field */ ! private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.jmx.browser.Resources"); ! ! ! /** ! * Constructor for GraphInternalFrame. ! * ! * @param provider Description of the Parameter ! */ ! public NotificationsInternalFrame(NotificationServiceProvider provider) ! { ! super(); ! ! this.provider = provider; ! ! JScrollPane pane = new JScrollPane(this.provider.getComponent()); ! this.frame.getContentPane().add(BorderLayout.CENTER, pane); ! } ! ! ! /** ! * @param event Description of the Parameter ! */ ! public void propertyChange(PropertyChangeEvent event) ! { ! if (event.getPropertyName().equals("name")) ! { ! String newName = (String) event.getNewValue(); ! this.setTitle(resources.getString("notification.text.prefix") + " : " + newName); ! } ! } ! } Index: ResourceIndexer.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/frame/ResourceIndexer.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ResourceIndexer.java 12 Feb 2003 21:22:46 -0000 1.2 --- ResourceIndexer.java 27 Nov 2003 01:13:06 -0000 1.3 *************** *** 1,50 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.frame; ! ! import org.ejtools.adwt.util.DefaultObjectIndexer; ! import org.ejtools.jmx.browser.model.Resource; ! ! /** ! * @author letiemble ! * @created 21 janvier 2003 ! * @version $Revision$ ! */ ! public class ResourceIndexer extends DefaultObjectIndexer ! { ! /** ! * Description of the Method ! * ! * @param key Description of the Parameter ! * @param value Description of the Parameter ! * @return Description of the Return Value ! */ ! public Object put(Object key, Object value) ! { ! if (key instanceof Resource) ! { ! return super.put(((Resource) key).getCanonicalName(), value); ! } ! return super.put(key, value); ! } ! ! ! /** ! * Description of the Method ! * ! * @param key Description of the Parameter ! * @return Description of the Return Value ! */ ! public Object remove(Object key) ! { ! if (key instanceof Resource) ! { ! return super.remove(((Resource) key).getCanonicalName()); ! } ! return super.remove(key); ! } ! } --- 1,50 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.frame; ! ! import org.ejtools.adwt.util.DefaultObjectIndexer; ! import org.ejtools.jmx.browser.model.Resource; ! ! /** ! * @author letiemble ! * @created 21 janvier 2003 ! * @version $Revision$ ! */ ! public class ResourceIndexer extends DefaultObjectIndexer ! { ! /** ! * Description of the Method ! * ! * @param key Description of the Parameter ! * @param value Description of the Parameter ! * @return Description of the Return Value ! */ ! public Object put(Object key, Object value) ! { ! if (key instanceof Resource) ! { ! return super.put(((Resource) key).getCanonicalName(), value); ! } ! return super.put(key, value); ! } ! ! ! /** ! * Description of the Method ! * ! * @param key Description of the Parameter ! * @return Description of the Return Value ! */ ! public Object remove(Object key) ! { ! if (key instanceof Resource) ! { ! return super.remove(((Resource) key).getCanonicalName()); ! } ! return super.remove(key); ! } ! } Index: ServerInternalFrame.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/frame/ServerInternalFrame.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ServerInternalFrame.java 10 Mar 2003 22:13:12 -0000 1.3 --- ServerInternalFrame.java 27 Nov 2003 01:13:06 -0000 1.4 *************** *** 1,284 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.frame; ! ! import java.awt.BorderLayout; ! import java.beans.PropertyChangeEvent; ! import java.beans.PropertyEditor; ! import java.util.Arrays; ! import java.util.Enumeration; ! import java.util.ResourceBundle; ! import java.util.StringTokenizer; ! import java.util.Vector; ! ! import javax.management.ObjectName; ! import javax.swing.JMenuBar; ! ! import org.apache.log4j.Logger; ! import org.ejtools.adwt.BeanContextTreePanel; ! import org.ejtools.adwt.action.Command; ! import org.ejtools.adwt.action.action.RefreshAction; ! import org.ejtools.adwt.service.BeanContextInternalFrame; ! import org.ejtools.adwt.service.MenuBarServiceProvider; ! import org.ejtools.adwt.service.ToolBarServiceProvider; ! import org.ejtools.beans.CustomPropertyEditorManager; ! import org.ejtools.jmx.browser.action.CreateMBeanAction; ! import org.ejtools.jmx.browser.action.ShowNotificationsAction; ! import org.ejtools.jmx.browser.dialog.CreateMBeanDialog; ! import org.ejtools.jmx.browser.model.Resource; ! import org.ejtools.jmx.browser.model.Server; ! import org.ejtools.jmx.browser.model.service.CacheService; ! import org.ejtools.jmx.browser.model.service.CacheServiceProvider; ! import org.ejtools.jmx.browser.model.service.ConnectionServiceProvider; ! import org.ejtools.jmx.browser.model.service.CustomizationServiceProvider; ! import org.ejtools.jmx.browser.model.service.NotificationServiceProvider; ! import org.ejtools.util.service.Profile; ! ! /** ! * Description of the Class ! * ! * @author <a href="mailto:let...@us...">Laurent Etiemble</a> ! * @created 5 septembre 2002 ! * @version $Revision$ ! */ ! public class ServerInternalFrame extends BeanContextInternalFrame ! { ! /** Description of the Field */ ! protected CacheServiceProvider cacheProvider; ! /** Description of the Field */ ! protected ConnectionServiceProvider connectionProvider; ! /** Description of the Field */ ! protected CustomizationServiceProvider customizationProvider; ! /** Description of the Field */ ! protected MenuBarServiceProvider menubarProvider; ! /** Description of the Field */ ! protected NotificationsInternalFrame notificationFrame; ! /** Description of the Field */ ! protected NotificationServiceProvider notificationProvider; ! /** Description of the Field */ ! protected Profile profile = null; ! /** Description of the Field */ ! protected Server server = null; ! /** Description of the Field */ ! protected ToolBarServiceProvider toolbarProvider; ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(ServerInternalFrame.class); ! /** Description of the Field */ ! private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.jmx.browser.Resources"); ! ! ! /** ! * Constructor for ServerInternalFrame. ! * ! * @param profile Description of the Parameter ! */ ! public ServerInternalFrame(Profile profile) ! { ! super(); ! ! this.profile = profile; ! ! this.connectionProvider = new ConnectionServiceProvider(profile); ! this.cacheProvider = new CacheServiceProvider(); ! this.customizationProvider = new CustomizationServiceProvider(); ! this.notificationProvider = new NotificationServiceProvider(); ! this.menubarProvider = new MenuBarServiceProvider(); ! this.toolbarProvider = new ToolBarServiceProvider(); ! ! this.server = new Server(); ! this.server.setProfile(profile); ! ! this.add(this.connectionProvider); ! this.add(this.cacheProvider); ! this.add(this.notificationProvider); ! this.add(this.customizationProvider); ! this.add(this.menubarProvider); ! this.add(this.toolbarProvider); ! ! this.add(this.server); ! this.notificationFrame = new NotificationsInternalFrame(this.notificationProvider); ! ! this.server.addPropertyChangeListener("name", this); ! this.server.addPropertyChangeListener("name", this.notificationFrame); ! ! this.add(new RefreshAction( ! new Command() ! { ! public void execute() ! { ! ServerInternalFrame.this.server.refresh(); ! } ! })); ! ! this.add(new CreateMBeanAction( ! new Command() ! { ! public void execute() ! { ! ServerInternalFrame.this.createMBean(); ! } ! })); ! ! this.add(new ShowNotificationsAction( ! new Command() ! { ! public void execute() ! { ! ServerInternalFrame.this.showNotificationFrame(); ! } ! })); ! ! BeanContextTreePanel panel = new BeanContextTreePanel(this.server); ! panel.getTree().setIndexer(new ResourceIndexer()); ! panel.selectRoot(); ! ! this.frame.setJMenuBar((JMenuBar) this.menubarProvider.getContainer()); ! this.frame.getContentPane().add(BorderLayout.NORTH, this.toolbarProvider.getContainer()); ! this.frame.getContentPane().add(BorderLayout.CENTER, panel); ! } ! ! ! /** ! * @param event Description of the Parameter ! */ ! public void propertyChange(PropertyChangeEvent event) ! { ! if (event.getPropertyName().equals("name")) ! { ! String newName = (String) event.getNewValue(); ! this.setTitle(resources.getString("connection.text.prefix") + " : " + newName); ! } ! } ! ! ! /** Description of the Method */ ! protected void createMBean() ! { ! Vector domains = new Vector(); ! for (Enumeration enum = cacheProvider.keys(CacheService.DOMAIN_TYPE); enum.hasMoreElements(); ) ! { ! domains.add(enum.nextElement() + ":"); ! } ! Object[] domainValues = domains.toArray(); ! Arrays.sort(domainValues); ! ! Vector classes = new Vector(); ! for (Enumeration enum = cacheProvider.keys(CacheService.RESOURCE_TYPE); enum.hasMoreElements(); ) ! { ! Resource resource = (Resource) cacheProvider.get(CacheService.RESOURCE_TYPE, enum.nextElement()); ! if (!classes.contains(resource.getClassName())) ! { ! classes.add(resource.getClassName()); ! } ! } ! Object[] classValues = classes.toArray(); ! Arrays.sort(classValues); ! ! CreateMBeanDialog dialog = new CreateMBeanDialog(null, domainValues, classValues); ! dialog.show(); ! ! Object object = dialog.getObjectName(); ! if (object == null) ! { ! return; ! } ! try ! { ! String className = null; ! ObjectName name = null; ! ObjectName loaderName = null; ! String sParameters = null; ! String sSignature = null; ! ! Object[] parameters = null; ! String[] signature = null; ! ! StringTokenizer st = null; ! Vector result = null; ! ! name = new ObjectName(object.toString()); ! className = dialog.getObjectClass(); ! ! if ("".equals(dialog.getClassLoader())) ! { ! loaderName = null; ! } ! else ! { ! loaderName = new ObjectName(dialog.getClassLoader()); ! } ! ! sParameters = dialog.getParameters(); ! sSignature = dialog.getSignature(); ! if ((!"".equals(sParameters)) && (!"".equals(sSignature))) ! { ! StringTokenizer stParameters = new StringTokenizer(sParameters, ","); ! StringTokenizer stSignature = new StringTokenizer(sSignature, ","); ! if (stParameters.countTokens() == stSignature.countTokens()) ! { ! try ! { ! parameters = new String[stParameters.countTokens()]; ! signature = new String[stSignature.countTokens()]; ! ! for (int i = 0; stParameters.hasMoreTokens(); i++) ! { ! signature[i] = stSignature.nextToken(); ! Class cl = Thread.currentThread().getContextClassLoader().loadClass(signature[i]); ! PropertyEditor pe = CustomPropertyEditorManager.findEditor(cl); ! pe.setAsText(stParameters.nextToken()); ! parameters[i] = pe.getValue(); ! } ! } ! catch (Exception e) ! { ! logger.error("Exception while parsing parameters", e); ! } ! } ! } ! ! this.server.createMBean(className, name, loaderName, parameters, signature); ! } ! catch (Exception e) ! { ! logger.error("Exception while creating MBean", e); ! } ! } ! ! ! /** Description of the Method */ ! protected void initializeBeanContextResources() ! { ! super.initializeBeanContextResources(); ! ! // Hack to update the window title ! String name = this.server.getName(); ! this.server.setName(""); ! this.server.setName(resources.getString("connection.text.untitled")); ! } ! ! ! /** Description of the Method */ ! protected void releaseBeanContextResources() ! { ! this.notificationFrame.close(); ! this.server.clear(); ! super.releaseBeanContextResources(); ! } ! ! ! /** Description of the Method */ ! protected void showNotificationFrame() ! { ! NotificationsInternalFrame frame = ServerInternalFrame.this.notificationFrame; ! if (!this.getBeanContext().contains(frame)) ! { ! this.getBeanContext().add(frame); ! } ! frame.activate(); ! } ! } --- 1,322 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.frame; ! ! import java.awt.BorderLayout; ! import java.beans.PropertyChangeEvent; ! import java.beans.PropertyEditor; ! import java.util.Arrays; ! import java.util.Enumeration; ! import java.util.ResourceBundle; ! import java.util.StringTokenizer; ! import java.util.Vector; ! ! import javax.management.ObjectName; ! import javax.swing.JMenuBar; ! ! import org.apache.log4j.Logger; ! import org.ejtools.adwt.BeanContextTreePanel; ! import org.ejtools.adwt.action.Command; ! import org.ejtools.adwt.action.action.RefreshAction; ! import org.ejtools.adwt.service.BeanContextInternalFrame; ! import org.ejtools.adwt.service.MenuBarServiceProvider; ! import org.ejtools.adwt.service.ToolBarServiceProvider; ! import org.ejtools.beans.CustomPropertyEditorManager; ! import org.ejtools.jmx.browser.action.CreateMBeanAction; ! import org.ejtools.jmx.browser.action.ShowNotificationsAction; ! import org.ejtools.jmx.browser.dialog.CreateMBeanDialog; ! import org.ejtools.jmx.browser.model.Resource; ! import org.ejtools.jmx.browser.model.Server; ! import org.ejtools.jmx.browser.model.service.CacheService; ! import org.ejtools.jmx.browser.model.service.CacheServiceProvider; ! import org.ejtools.jmx.browser.model.service.ConnectionServiceProvider; ! import org.ejtools.jmx.browser.model.service.CustomizationServiceProvider; ! import org.ejtools.jmx.browser.model.service.NotificationServiceProvider; ! import org.ejtools.util.service.Profile; ! import org.ejtools.util.service.ProfileHolder; ! ! /** ! * Description of the Class ! * ! * @author <a href="mailto:let...@us...">Laurent Etiemble</a> ! * @version $Revision$ ! * @created 5 septembre 2002 ! */ ! public class ServerInternalFrame extends BeanContextInternalFrame implements ProfileHolder ! { ! /** Description of the Field */ ! protected CacheServiceProvider cacheProvider; ! /** Description of the Field */ ! protected ConnectionServiceProvider connectionProvider; ! /** Description of the Field */ ! protected CustomizationServiceProvider customizationProvider; ! /** Description of the Field */ ! protected MenuBarServiceProvider menubarProvider; ! /** Description of the Field */ ! protected NotificationsInternalFrame notificationFrame; ! /** Description of the Field */ ! protected NotificationServiceProvider notificationProvider; ! /** Description of the Field */ ! protected Profile profile = null; ! /** Description of the Field */ ! protected Server server = null; ! /** Description of the Field */ ! protected ToolBarServiceProvider toolbarProvider; ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(ServerInternalFrame.class); ! /** Description of the Field */ ! private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.jmx.browser.Resources"); ! ! ! /**Constructor for the ServerInternalFrame object */ ! public ServerInternalFrame() { } ! ! ! /** ! * Gets the profile attribute of the ServerInternalFrame object ! * ! * @return The profile value ! */ ! public Profile getProfile() ! { ! return this.profile; ! } ! ! ! /** ! * @param event Description of the Parameter ! */ ! public void propertyChange(PropertyChangeEvent event) ! { ! if (event.getPropertyName().equals("name")) ! { ! String newName = (String) event.getNewValue(); ! this.setTitle(resources.getString("connection.text.prefix") + " : " + newName); ! } ! } ! ! ! /** ! * Description of the Method ! * ! * @param objectName Description of the Parameter ! * @return Description of the Return Value ! */ ! public Resource queryMBean(String objectName) ! { ! Resource resource = (Resource) this.cacheProvider.get(CacheService.RESOURCE_TYPE, objectName); ! try ! { ! if ((resource != null) && (resource.isRegistered())) ! { ! return resource; ! } ! } ! catch (Exception e) ! { ! logger.warn("Cannot find ObjectName " + objectName, e); ! } ! return null; ! } ! ! ! public void setProfile(Profile profile) ! { ! this.profile = profile; ! } ! ! ! /** ! * Sets the server attribute of the ServerInternalFrame object ! * ! * @param server The new server value ! */ ! public void setServer(Server server) ! { ! this.connectionProvider = new ConnectionServiceProvider(this.profile); ! this.cacheProvider = new CacheServiceProvider(); ! this.customizationProvider = new CustomizationServiceProvider(); ! this.notificationProvider = new NotificationServiceProvider(); ! this.menubarProvider = new MenuBarServiceProvider(); ! this.toolbarProvider = new ToolBarServiceProvider(); ! ! this.server = server; ! this.server.setProfile(this.profile); ! ! this.add(this.connectionProvider); ! this.add(this.cacheProvider); ! this.add(this.notificationProvider); ! this.add(this.customizationProvider); ! this.add(this.menubarProvider); ! this.add(this.toolbarProvider); ! ! this.add(this.server); ! this.notificationFrame = new NotificationsInternalFrame(this.notificationProvider); ! ! this.server.addPropertyChangeListener("name", this); ! this.server.addPropertyChangeListener("name", this.notificationFrame); ! ! this.add(new RefreshAction( ! new Command() ! { ! public void execute() ! { ! ServerInternalFrame.this.server.refresh(); ! } ! })); ! ! this.add(new CreateMBeanAction( ! new Command() ! { ! public void execute() ! { ! ServerInternalFrame.this.createMBean(); ! } ! })); ! ! this.add(new ShowNotificationsAction( ! new Command() ! { ! public void execute() ! { ! ServerInternalFrame.this.showNotificationFrame(); ! } ! })); ! ! BeanContextTreePanel panel = new BeanContextTreePanel(this.server); ! panel.setIndexer(new ResourceIndexer()); ! panel.selectRoot(); ! ! this.frame.setJMenuBar((JMenuBar) this.menubarProvider.getContainer()); ! this.frame.getContentPane().add(this.toolbarProvider.getContainer(), BorderLayout.NORTH); ! this.frame.getContentPane().add(panel, BorderLayout.CENTER); ! } ! ! ! /** Description of the Method */ ! protected void createMBean() ! { ! Vector domains = new Vector(); ! for (Enumeration enum = cacheProvider.keys(CacheService.DOMAIN_TYPE); enum.hasMoreElements(); ) ! { ! domains.add(enum.nextElement() + ":"); ! } ! Object[] domainValues = domains.toArray(); ! Arrays.sort(domainValues); ! ! Vector classes = new Vector(); ! for (Enumeration enum = cacheProvider.keys(CacheService.RESOURCE_TYPE); enum.hasMoreElements(); ) ! { ! Resource resource = (Resource) cacheProvider.get(CacheService.RESOURCE_TYPE, enum.nextElement()); ! if (!classes.contains(resource.getClassName())) ! { ! classes.add(resource.getClassName()); ! } ! } ! Object[] classValues = classes.toArray(); ! Arrays.sort(classValues); ! ! CreateMBeanDialog dialog = new CreateMBeanDialog(null, domainValues, classValues); ! dialog.show(); ! ! Object object = dialog.getObjectName(); ! if (object == null) ! { ! return; ! } ! try ! { ! String className = null; ! ObjectName name = null; ! ObjectName loaderName = null; ! String sParameters = null; ! String sSignature = null; ! ! Object[] parameters = null; ! String[] signature = null; ! ! name = new ObjectName(object.toString()); ! className = dialog.getObjectClass(); ! ! if ("".equals(dialog.getClassLoader())) ! { ! loaderName = null; ! } ! else ! { ! loaderName = new ObjectName(dialog.getClassLoader()); ! } ! ! sParameters = dialog.getParameters(); ! sSignature = dialog.getSignature(); ! if ((!"".equals(sParameters)) && (!"".equals(sSignature))) ! { ! StringTokenizer stParameters = new StringTokenizer(sParameters, ","); ! StringTokenizer stSignature = new StringTokenizer(sSignature, ","); ! if (stParameters.countTokens() == stSignature.countTokens()) ! { ! try ! { ! parameters = new String[stParameters.countTokens()]; ! signature = new String[stSignature.countTokens()]; ! ! for (int i = 0; stParameters.hasMoreTokens(); i++) ! { ! signature[i] = stSignature.nextToken(); ! Class cl = Thread.currentThread().getContextClassLoader().loadClass(signature[i]); ! PropertyEditor pe = CustomPropertyEditorManager.findEditor(cl); ! pe.setAsText(stParameters.nextToken()); ! parameters[i] = pe.getValue(); ! } ! } ! catch (Exception e) ! { ! logger.error("Exception while parsing parameters", e); ! } ! } ! } ! ! this.server.createMBean(className, name, loaderName, parameters, signature); ! } ! catch (Exception e) ! { ! logger.error("Exception while creating MBean", e); ! } ! } ! ! ! /** Description of the Method */ ! protected void initializeBeanContextResources() ! { ! super.initializeBeanContextResources(); ! ! // Hack to update the window title ! this.server.setName(""); ! this.server.setName(resources.getString("connection.text.untitled")); ! } ! ! ! /** Description of the Method */ ! protected void releaseBeanContextResources() ! { ! this.notificationFrame.close(); ! this.server.clear(); ! super.releaseBeanContextResources(); ! } ! ! ! /** Description of the Method */ ! protected void showNotificationFrame() ! { ! NotificationsInternalFrame frame = ServerInternalFrame.this.notificationFrame; ! if (!this.getBeanContext().contains(frame)) ! { ! this.getBeanContext().add(frame); ! } ! frame.activate(); ! } ! } |
Update of /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/model/connector In directory sc8-pr-cvs1:/tmp/cvs-serv13614/jmx.browser/src/main/org/ejtools/jmx/browser/model/connector Modified Files: AbstractConnectionService.java JBoss30EJBConnectionService.java JBoss30RMIConnectionService.java LocalConnectionService.java MX4J111IIOPConnectionService.java MX4J111JRMPConnectionService.java Pramati30ConnectionService.java TMX4J21ConnectionService.java WebLogic70ConnectionService.java Added Files: MX4J200IIOPConnectionService.java MX4J200JRMPConnectionService.java RemotingConnectionService.java Log Message: Address Bug #775745 Address Todo #800902 Address Todo #755528 Remove @created tags Add support for MXJ4 2.0.0 (still beta) Add support for JXM Remoting through RMI --- NEW FILE: MX4J200IIOPConnectionService.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package org.ejtools.jmx.browser.model.connector; import java.util.Hashtable; import javax.management.MBeanServer; import javax.naming.Context; import mx4j.tools.connector.RemoteMBeanServer; import mx4j.tools.connector.rmi.iiop.IIOPConnector; import org.ejtools.jmx.MBeanServerProxy; import org.ejtools.jmx.browser.model.service.ConnectionMetaData; /** * @author Laurent Etiemble * @version $Revision: 1.1 $ */ public class MX4J200IIOPConnectionService extends AbstractConnectionService { /** Description of the Field */ protected IIOPConnector connector = null; /** */ public void disconnect() { super.disconnect(); try { this.connector.close(); } catch (Exception e) { // Do nothing } this.setConnected(false); } /** * @exception Exception Description of the Exception */ protected void createMBeanServer() throws Exception { System.setProperty("jmx.serial.form", "1.2"); Hashtable props = new Hashtable(); props.put(Context.INITIAL_CONTEXT_FACTORY, this.profile.getProperty(ConnectionMetaData.FACTORY)); props.put(Context.URL_PKG_PREFIXES, this.profile.getProperty(ConnectionMetaData.PACKAGES)); props.put(Context.PROVIDER_URL, this.profile.getProperty(ConnectionMetaData.URL)); props.put(Context.SECURITY_PRINCIPAL, this.profile.getProperty(ConnectionMetaData.PRINCIPAL)); props.put(Context.SECURITY_CREDENTIALS, this.profile.getProperty(ConnectionMetaData.CREDENTIALS)); this.connector = new IIOPConnector(); this.connector.connect(this.profile.getProperty(ConnectionMetaData.CONTEXT), props); RemoteMBeanServer remoteServer = this.connector.getRemoteMBeanServer(); MBeanServer mbeanServer = MBeanServerProxy.createMBeanProxy(remoteServer, RemoteMBeanServer.class); this.setMBeanServer(mbeanServer); } } --- NEW FILE: MX4J200JRMPConnectionService.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package org.ejtools.jmx.browser.model.connector; import java.util.Hashtable; import javax.management.MBeanServer; import javax.naming.Context; import mx4j.tools.connector.RemoteMBeanServer; import mx4j.tools.connector.rmi.jrmp.JRMPConnector; import org.ejtools.jmx.MBeanServerProxy; import org.ejtools.jmx.browser.model.service.ConnectionMetaData; /** * @author Laurent Etiemble * @created 4 septembre 2002 */ public class MX4J200JRMPConnectionService extends AbstractConnectionService { /** Description of the Field */ protected JRMPConnector connector = null; /** */ public void disconnect() { super.disconnect(); try { this.connector.close(); } catch (Exception e) { // Do nothing } this.setConnected(false); } /** * @exception Exception Description of the Exception */ protected void createMBeanServer() throws Exception { System.setProperty("jmx.serial.form", "1.2"); Hashtable props = new Hashtable(); props.put(Context.INITIAL_CONTEXT_FACTORY, this.profile.getProperty(ConnectionMetaData.FACTORY)); props.put(Context.URL_PKG_PREFIXES, this.profile.getProperty(ConnectionMetaData.PACKAGES)); props.put(Context.PROVIDER_URL, this.profile.getProperty(ConnectionMetaData.URL)); props.put(Context.SECURITY_PRINCIPAL, this.profile.getProperty(ConnectionMetaData.PRINCIPAL)); props.put(Context.SECURITY_CREDENTIALS, this.profile.getProperty(ConnectionMetaData.CREDENTIALS)); this.connector = new JRMPConnector(); this.connector.connect(this.profile.getProperty(ConnectionMetaData.CONTEXT), props); RemoteMBeanServer remoteServer = this.connector.getRemoteMBeanServer(); MBeanServer mbeanServer = MBeanServerProxy.createMBeanProxy(remoteServer, RemoteMBeanServer.class); this.setMBeanServer(mbeanServer); } } --- NEW FILE: RemotingConnectionService.java --- /* * EJTools, the Enterprise Java Tools * * Distributable under LGPL license. * See terms of license at www.gnu.org. */ package org.ejtools.jmx.browser.model.connector; import java.util.Hashtable; import javax.management.MBeanServer; import javax.management.MBeanServerConnection; import javax.management.remote.JMXConnector; import javax.management.remote.JMXConnectorFactory; import javax.management.remote.JMXServiceURL; import javax.naming.Context; import org.ejtools.jmx.MBeanServerProxy; import org.ejtools.jmx.browser.model.service.ConnectionMetaData; /** * @author letiembl * @created 4 septembre 2002 * @version $Revision: 1.1 $ */ public class RemotingConnectionService extends AbstractConnectionService { /** Description of the Field */ protected JMXConnector connector = null; /** */ public void disconnect() { super.disconnect(); try { this.connector.close(); } catch (Exception e) { // Do nothing } this.setConnected(false); } /** * @exception Exception Description of the Exception */ protected void createMBeanServer() throws Exception { System.setProperty("jmx.serial.form", "1.2"); Hashtable props = new Hashtable(); props.put(Context.INITIAL_CONTEXT_FACTORY, this.profile.getProperty(ConnectionMetaData.FACTORY)); props.put(Context.URL_PKG_PREFIXES, this.profile.getProperty(ConnectionMetaData.PACKAGES)); props.put(Context.PROVIDER_URL, this.profile.getProperty(ConnectionMetaData.URL)); props.put(Context.SECURITY_PRINCIPAL, this.profile.getProperty(ConnectionMetaData.PRINCIPAL)); props.put(Context.SECURITY_CREDENTIALS, this.profile.getProperty(ConnectionMetaData.CREDENTIALS)); JMXServiceURL url = new JMXServiceURL(this.profile.getProperty(ConnectionMetaData.SERVICE)); this.connector = JMXConnectorFactory.connect(url, props); MBeanServerConnection connection = connector.getMBeanServerConnection(); MBeanServer mbeanServer = MBeanServerProxy.createMBeanProxy(connection); this.setMBeanServer(mbeanServer); } } Index: AbstractConnectionService.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/model/connector/AbstractConnectionService.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AbstractConnectionService.java 24 Feb 2003 22:02:39 -0000 1.3 --- AbstractConnectionService.java 27 Nov 2003 01:13:07 -0000 1.4 *************** *** 29,32 **** --- 29,36 ---- + /**Constructor for the AbstractConnectionService object */ + protected AbstractConnectionService() { } + + /** * Connect to the MBean server with this profile Index: JBoss30EJBConnectionService.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/model/connector/JBoss30EJBConnectionService.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** JBoss30EJBConnectionService.java 24 Feb 2003 22:02:40 -0000 1.3 --- JBoss30EJBConnectionService.java 27 Nov 2003 01:13:07 -0000 1.4 *************** *** 7,10 **** --- 7,11 ---- package org.ejtools.jmx.browser.model.connector; + import java.lang.reflect.Method; import java.util.Hashtable; *************** *** 16,21 **** import org.ejtools.jmx.MBeanServerProxy; import org.ejtools.jmx.browser.model.service.ConnectionMetaData; - import org.jboss.jmx.adaptor.interfaces.Adaptor; - import org.jboss.jmx.adaptor.interfaces.AdaptorHome; --- 17,20 ---- *************** *** 31,35 **** { /** Instace of the RMI adaptor */ ! protected Adaptor adaptor = null; --- 30,34 ---- { /** Instace of the RMI adaptor */ ! protected Object adaptor = null; *************** *** 40,44 **** try { ! this.adaptor.remove(); } catch (Exception e) --- 39,45 ---- try { ! // Search for the stop method of the EJB Adaptor ! Method m = this.adaptor.getClass().getMethod("remove", new Class[0]); ! m.invoke(this.adaptor, new Object[0]); } catch (Exception e) *************** *** 70,75 **** Object ref = context.lookup(this.profile.getProperty(ConnectionMetaData.CONTEXT)); ! AdaptorHome home = (AdaptorHome) PortableRemoteObject.narrow(ref, AdaptorHome.class); ! this.adaptor = home.create(); MBeanServer server = MBeanServerProxy.createMBeanProxy(this.adaptor); --- 71,78 ---- Object ref = context.lookup(this.profile.getProperty(ConnectionMetaData.CONTEXT)); ! Class clazzAdaptorHome = Thread.currentThread().getContextClassLoader().loadClass("org.jboss.jmx.adaptor.interfaces.AdaptorHome"); ! Object home = PortableRemoteObject.narrow(ref, clazzAdaptorHome); ! Method createMethod = clazzAdaptorHome.getMethod("create", new Class[0]); ! this.adaptor = createMethod.invoke(home, new Object[0]); MBeanServer server = MBeanServerProxy.createMBeanProxy(this.adaptor); Index: JBoss30RMIConnectionService.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/model/connector/JBoss30RMIConnectionService.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** JBoss30RMIConnectionService.java 12 Feb 2003 21:22:43 -0000 1.2 --- JBoss30RMIConnectionService.java 27 Nov 2003 01:13:07 -0000 1.3 *************** *** 7,10 **** --- 7,12 ---- package org.ejtools.jmx.browser.model.connector; + import java.lang.reflect.Constructor; + import java.lang.reflect.Method; import java.util.Hashtable; *************** *** 15,20 **** import org.ejtools.jmx.MBeanServerProxy; import org.ejtools.jmx.browser.model.service.ConnectionMetaData; - import org.jboss.jmx.adaptor.rmi.RMIAdaptor; - import org.jboss.jmx.connector.rmi.RMIConnectorImpl; --- 17,20 ---- *************** *** 27,31 **** { /** Description of the Field */ ! protected RMIConnectorImpl connector = null; --- 27,37 ---- { /** Description of the Field */ ! protected Object connector = null; ! ! ! /**Constructor for the JBoss30RMIConnectionService object */ ! public JBoss30RMIConnectionService() ! { ! } *************** *** 36,40 **** try { ! this.connector.stop(); } catch (Exception e) --- 42,48 ---- try { ! // Search for the stop method of the RMIConnector ! Method m = this.connector.getClass().getMethod("stop", new Class[0]); ! m.invoke(this.connector, new Object[0]); } catch (Exception e) *************** *** 65,72 **** Object ref = context.lookup(this.profile.getProperty(ConnectionMetaData.CONTEXT)); ! RMIAdaptor adaptor = (RMIAdaptor) PortableRemoteObject.narrow(ref, RMIAdaptor.class); ! this.connector = new RMIConnectorImpl(adaptor); ! this.setMBeanServer(MBeanServerProxy.createMBeanProxy(connector)); } } --- 73,83 ---- Object ref = context.lookup(this.profile.getProperty(ConnectionMetaData.CONTEXT)); ! Class clazzAdaptor = Thread.currentThread().getContextClassLoader().loadClass("org.jboss.jmx.adaptor.rmi.RMIAdaptor"); ! Object adaptor = PortableRemoteObject.narrow(ref, clazzAdaptor); ! Class clazzConnector = Thread.currentThread().getContextClassLoader().loadClass("org.jboss.jmx.connector.rmi.RMIConnectorImpl"); ! Constructor constructor = clazzConnector.getConstructor(new Class[]{clazzAdaptor}); ! this.connector = constructor.newInstance(new Object[]{adaptor}); ! this.setMBeanServer(MBeanServerProxy.createMBeanProxy(this.connector)); } } Index: LocalConnectionService.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/model/connector/LocalConnectionService.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** LocalConnectionService.java 10 Feb 2003 20:49:01 -0000 1.1 --- LocalConnectionService.java 27 Nov 2003 01:13:07 -0000 1.2 *************** *** 1,44 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.model.connector; ! ! import java.util.ArrayList; ! ! import javax.management.MBeanServer; ! import javax.management.MBeanServerFactory; ! ! ! /** ! * Local connection to a MBean server. ! * The reference to the MBean server is get by a call to the MBeanServerFactory class. ! * If several servers are registered, the first is taken. ! * ! * @author letiemble ! * @created 4 septembre 2002 ! * @version $Revision$ ! */ ! public class LocalConnectionService extends AbstractConnectionService ! { ! /** ! * Description of the Method ! * ! * @exception Exception Description of the Exception ! */ ! public void createMBeanServer() ! throws Exception ! { ! MBeanServer server = null; ! ! ArrayList servers = MBeanServerFactory.findMBeanServer(null); ! if ((servers == null) || (servers.size() == 0)) ! { ! throw new Exception("No MBeanServer found !!!"); ! } ! server = (MBeanServer) servers.get(0); ! this.setMBeanServer(server); ! } ! } --- 1,44 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.model.connector; ! ! import java.util.ArrayList; ! ! import javax.management.MBeanServer; ! import javax.management.MBeanServerFactory; ! ! ! /** ! * Local connection to a MBean server. ! * The reference to the MBean server is get by a call to the MBeanServerFactory class. ! * If several servers are registered, the first is taken. ! * ! * @author letiemble ! * @created 4 septembre 2002 ! * @version $Revision$ ! */ ! public class LocalConnectionService extends AbstractConnectionService ! { ! /** ! * Description of the Method ! * ! * @exception Exception Description of the Exception ! */ ! public void createMBeanServer() ! throws Exception ! { ! MBeanServer server = null; ! ! ArrayList servers = MBeanServerFactory.findMBeanServer(null); ! if ((servers == null) || (servers.size() == 0)) ! { ! throw new Exception("No MBeanServer found !!!"); ! } ! server = (MBeanServer) servers.get(0); ! this.setMBeanServer(server); ! } ! } Index: MX4J111IIOPConnectionService.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/model/connector/MX4J111IIOPConnectionService.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MX4J111IIOPConnectionService.java 12 Feb 2003 21:22:43 -0000 1.2 --- MX4J111IIOPConnectionService.java 27 Nov 2003 01:13:07 -0000 1.3 *************** *** 1,71 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.model.connector; ! ! import java.util.Hashtable; ! ! import javax.management.MBeanServer; ! import javax.naming.Context; ! ! import mx4j.connector.RemoteMBeanServer; ! import mx4j.connector.rmi.iiop.IIOPConnector; ! ! import org.ejtools.jmx.MBeanServerProxy; ! import org.ejtools.jmx.browser.model.service.ConnectionMetaData; ! ! ! /** ! * @author letiembl ! * @created 4 septembre 2002 ! * @version $Revision$ ! * @todo Make an common ancestor with JRMP ! */ ! public class MX4J111IIOPConnectionService extends AbstractConnectionService ! { ! /** Description of the Field */ ! protected IIOPConnector connector = null; ! ! ! /** */ ! public void disconnect() ! { ! super.disconnect(); ! try ! { ! this.connector.close(); ! } ! catch (Exception e) ! { ! // Do nothing ! } ! this.setConnected(false); ! } ! ! ! /** ! * @exception Exception Description of the Exception ! */ ! protected void createMBeanServer() ! throws Exception ! { ! System.setProperty("jmx.serial.form", "1.1"); ! ! Hashtable props = new Hashtable(); ! props.put(Context.INITIAL_CONTEXT_FACTORY, this.profile.getProperty(ConnectionMetaData.FACTORY)); ! props.put(Context.URL_PKG_PREFIXES, this.profile.getProperty(ConnectionMetaData.PACKAGES)); ! props.put(Context.PROVIDER_URL, this.profile.getProperty(ConnectionMetaData.URL)); ! props.put(Context.SECURITY_PRINCIPAL, this.profile.getProperty(ConnectionMetaData.PRINCIPAL)); ! props.put(Context.SECURITY_CREDENTIALS, this.profile.getProperty(ConnectionMetaData.CREDENTIALS)); ! ! this.connector = new IIOPConnector(); ! this.connector.connect(this.profile.getProperty(ConnectionMetaData.CONTEXT), props); ! ! RemoteMBeanServer remoteServer = connector.getRemoteMBeanServer(); ! MBeanServer mbeanServer = MBeanServerProxy.createMBeanProxy(remoteServer, RemoteMBeanServer.class); ! this.setMBeanServer(mbeanServer); ! } ! } --- 1,69 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.model.connector; ! ! import java.util.Hashtable; ! ! import javax.management.MBeanServer; ! import javax.naming.Context; ! ! import mx4j.connector.RemoteMBeanServer; ! import mx4j.connector.rmi.iiop.IIOPConnector; ! ! import org.ejtools.jmx.MBeanServerProxy; ! import org.ejtools.jmx.browser.model.service.ConnectionMetaData; ! ! ! /** ! * @author Laurent Etiemble ! * @version $Revision$ ! */ ! public class MX4J111IIOPConnectionService extends AbstractConnectionService ! { ! /** Description of the Field */ ! protected IIOPConnector connector = null; ! ! ! /** */ ! public void disconnect() ! { ! super.disconnect(); ! try ! { ! this.connector.close(); ! } ! catch (Exception e) ! { ! // Do nothing ! } ! this.setConnected(false); ! } ! ! ! /** ! * @exception Exception Description of the Exception ! */ ! protected void createMBeanServer() ! throws Exception ! { ! System.setProperty("jmx.serial.form", "1.1"); ! ! Hashtable props = new Hashtable(); ! props.put(Context.INITIAL_CONTEXT_FACTORY, this.profile.getProperty(ConnectionMetaData.FACTORY)); ! props.put(Context.URL_PKG_PREFIXES, this.profile.getProperty(ConnectionMetaData.PACKAGES)); ! props.put(Context.PROVIDER_URL, this.profile.getProperty(ConnectionMetaData.URL)); ! props.put(Context.SECURITY_PRINCIPAL, this.profile.getProperty(ConnectionMetaData.PRINCIPAL)); ! props.put(Context.SECURITY_CREDENTIALS, this.profile.getProperty(ConnectionMetaData.CREDENTIALS)); ! ! this.connector = new IIOPConnector(); ! this.connector.connect(this.profile.getProperty(ConnectionMetaData.CONTEXT), props); ! ! RemoteMBeanServer remoteServer = this.connector.getRemoteMBeanServer(); ! MBeanServer mbeanServer = MBeanServerProxy.createMBeanProxy(remoteServer, RemoteMBeanServer.class); ! this.setMBeanServer(mbeanServer); ! } ! } Index: MX4J111JRMPConnectionService.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/model/connector/MX4J111JRMPConnectionService.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MX4J111JRMPConnectionService.java 12 Feb 2003 21:22:43 -0000 1.2 --- MX4J111JRMPConnectionService.java 27 Nov 2003 01:13:07 -0000 1.3 *************** *** 1,71 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.model.connector; ! ! import java.util.Hashtable; ! ! import javax.management.MBeanServer; ! import javax.naming.Context; ! ! import mx4j.connector.RemoteMBeanServer; ! import mx4j.connector.rmi.jrmp.JRMPConnector; ! ! import org.ejtools.jmx.MBeanServerProxy; ! import org.ejtools.jmx.browser.model.service.ConnectionMetaData; ! ! ! /** ! * @author letiembl ! * @created 4 septembre 2002 ! * @version $Revision$ ! * @todo Make an common ancestor with IIOP ! */ ! public class MX4J111JRMPConnectionService extends AbstractConnectionService ! { ! /** Description of the Field */ ! protected JRMPConnector connector = null; ! ! ! /** */ ! public void disconnect() ! { ! super.disconnect(); ! try ! { ! this.connector.close(); ! } ! catch (Exception e) ! { ! // Do nothing ! } ! this.setConnected(false); ! } ! ! ! /** ! * @exception Exception Description of the Exception ! */ ! protected void createMBeanServer() ! throws Exception ! { ! System.setProperty("jmx.serial.form", "1.1"); ! ! Hashtable props = new Hashtable(); ! props.put(Context.INITIAL_CONTEXT_FACTORY, this.profile.getProperty(ConnectionMetaData.FACTORY)); ! props.put(Context.URL_PKG_PREFIXES, this.profile.getProperty(ConnectionMetaData.PACKAGES)); ! props.put(Context.PROVIDER_URL, this.profile.getProperty(ConnectionMetaData.URL)); ! props.put(Context.SECURITY_PRINCIPAL, this.profile.getProperty(ConnectionMetaData.PRINCIPAL)); ! props.put(Context.SECURITY_CREDENTIALS, this.profile.getProperty(ConnectionMetaData.CREDENTIALS)); ! ! this.connector = new JRMPConnector(); ! this.connector.connect(this.profile.getProperty(ConnectionMetaData.CONTEXT), props); ! ! RemoteMBeanServer remoteServer = connector.getRemoteMBeanServer(); ! MBeanServer mbeanServer = MBeanServerProxy.createMBeanProxy(remoteServer, RemoteMBeanServer.class); ! this.setMBeanServer(mbeanServer); ! } ! } --- 1,69 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.model.connector; ! ! import java.util.Hashtable; ! ! import javax.management.MBeanServer; ! import javax.naming.Context; ! ! import mx4j.connector.RemoteMBeanServer; ! import mx4j.connector.rmi.jrmp.JRMPConnector; ! ! import org.ejtools.jmx.MBeanServerProxy; ! import org.ejtools.jmx.browser.model.service.ConnectionMetaData; ! ! ! /** ! * @author Laurent Etiemble ! * @created 4 septembre 2002 ! */ ! public class MX4J111JRMPConnectionService extends AbstractConnectionService ! { ! /** Description of the Field */ ! protected JRMPConnector connector = null; ! ! ! /** */ ! public void disconnect() ! { ! super.disconnect(); ! try ! { ! this.connector.close(); ! } ! catch (Exception e) ! { ! // Do nothing ! } ! this.setConnected(false); ! } ! ! ! /** ! * @exception Exception Description of the Exception ! */ ! protected void createMBeanServer() ! throws Exception ! { ! System.setProperty("jmx.serial.form", "1.1"); ! ! Hashtable props = new Hashtable(); ! props.put(Context.INITIAL_CONTEXT_FACTORY, this.profile.getProperty(ConnectionMetaData.FACTORY)); ! props.put(Context.URL_PKG_PREFIXES, this.profile.getProperty(ConnectionMetaData.PACKAGES)); ! props.put(Context.PROVIDER_URL, this.profile.getProperty(ConnectionMetaData.URL)); ! props.put(Context.SECURITY_PRINCIPAL, this.profile.getProperty(ConnectionMetaData.PRINCIPAL)); ! props.put(Context.SECURITY_CREDENTIALS, this.profile.getProperty(ConnectionMetaData.CREDENTIALS)); ! ! this.connector = new JRMPConnector(); ! this.connector.connect(this.profile.getProperty(ConnectionMetaData.CONTEXT), props); ! ! RemoteMBeanServer remoteServer = this.connector.getRemoteMBeanServer(); ! MBeanServer mbeanServer = MBeanServerProxy.createMBeanProxy(remoteServer, RemoteMBeanServer.class); ! this.setMBeanServer(mbeanServer); ! } ! } Index: Pramati30ConnectionService.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/model/connector/Pramati30ConnectionService.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Pramati30ConnectionService.java 24 Feb 2003 22:02:40 -0000 1.2 --- Pramati30ConnectionService.java 27 Nov 2003 01:13:07 -0000 1.3 *************** *** 1,48 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.model.connector; ! ! import java.util.Hashtable; ! ! import javax.naming.Context; ! ! import org.ejtools.jmx.browser.model.service.ConnectionMetaData; ! ! ! /** ! * As described <a href="http://www.pramati.com/docstore/1230006/help/mbeanbrowser/working.htm">here</a> ! * ! * @author letiembl ! * @created 4 septembre 2002 ! * @version $Revision$ ! */ ! public class Pramati30ConnectionService extends AbstractConnectionService ! { ! /** ! * @exception Exception Description of the Exception ! */ ! protected void createMBeanServer() ! throws Exception ! { ! System.setProperty("jmx.serial.form", "1.0"); ! ! Hashtable props = new Hashtable(); ! props.put(Context.INITIAL_CONTEXT_FACTORY, this.profile.getProperty(ConnectionMetaData.FACTORY)); ! props.put(Context.URL_PKG_PREFIXES, this.profile.getProperty(ConnectionMetaData.PACKAGES)); ! props.put(Context.PROVIDER_URL, this.profile.getProperty(ConnectionMetaData.URL)); ! props.put(Context.SECURITY_PRINCIPAL, this.profile.getProperty(ConnectionMetaData.PRINCIPAL)); ! props.put(Context.SECURITY_CREDENTIALS, this.profile.getProperty(ConnectionMetaData.CREDENTIALS)); ! ! // Stand by ! // ! // InitialContext context = new InitialContext(props); ! // ClientConnector connector = (ClientConnector) context.lookup(this.profile.getProperty(ConnectionMetaData.CONTEXT)); ! // ! // MBeanServer mbeanServer = MBeanServerProxy.createMBeanProxy(connector); ! // this.setMBeanServer(mbeanServer); ! } ! } --- 1,48 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.model.connector; ! ! import java.util.Hashtable; ! ! import javax.naming.Context; ! ! import org.ejtools.jmx.browser.model.service.ConnectionMetaData; ! ! ! /** ! * As described <a href="http://www.pramati.com/docstore/1230006/help/mbeanbrowser/working.htm">here</a> ! * ! * @author letiembl ! * @created 4 septembre 2002 ! * @version $Revision$ ! */ ! public class Pramati30ConnectionService extends AbstractConnectionService ! { ! /** ! * @exception Exception Description of the Exception ! */ ! protected void createMBeanServer() ! throws Exception ! { ! System.setProperty("jmx.serial.form", "1.0"); ! ! Hashtable props = new Hashtable(); ! props.put(Context.INITIAL_CONTEXT_FACTORY, this.profile.getProperty(ConnectionMetaData.FACTORY)); ! props.put(Context.URL_PKG_PREFIXES, this.profile.getProperty(ConnectionMetaData.PACKAGES)); ! props.put(Context.PROVIDER_URL, this.profile.getProperty(ConnectionMetaData.URL)); ! props.put(Context.SECURITY_PRINCIPAL, this.profile.getProperty(ConnectionMetaData.PRINCIPAL)); ! props.put(Context.SECURITY_CREDENTIALS, this.profile.getProperty(ConnectionMetaData.CREDENTIALS)); ! ! // Stand by ! // ! // InitialContext context = new InitialContext(props); ! // ClientConnector connector = (ClientConnector) context.lookup(this.profile.getProperty(ConnectionMetaData.CONTEXT)); ! // ! // MBeanServer mbeanServer = MBeanServerProxy.createMBeanProxy(connector); ! // this.setMBeanServer(mbeanServer); ! } ! } Index: TMX4J21ConnectionService.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/model/connector/TMX4J21ConnectionService.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TMX4J21ConnectionService.java 10 Feb 2003 20:49:01 -0000 1.1 --- TMX4J21ConnectionService.java 27 Nov 2003 01:13:07 -0000 1.2 *************** *** 1,46 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.model.connector; ! ! import java.util.Hashtable; ! ! import javax.naming.Context; ! ! import org.ejtools.jmx.browser.model.service.ConnectionMetaData; ! ! ! /** ! * @author letiembl ! * @created 4 septembre 2002 ! * @version $Revision$ ! */ ! public class TMX4J21ConnectionService extends AbstractConnectionService ! { ! /** ! * @exception Exception Description of the Exception ! */ ! protected void createMBeanServer() ! throws Exception ! { ! System.setProperty("jmx.serial.form", "1.0"); ! ! Hashtable props = new Hashtable(); ! props.put(Context.INITIAL_CONTEXT_FACTORY, this.profile.getProperty(ConnectionMetaData.FACTORY)); ! props.put(Context.URL_PKG_PREFIXES, this.profile.getProperty(ConnectionMetaData.PACKAGES)); ! props.put(Context.PROVIDER_URL, this.profile.getProperty(ConnectionMetaData.URL)); ! props.put(Context.SECURITY_PRINCIPAL, this.profile.getProperty(ConnectionMetaData.PRINCIPAL)); ! props.put(Context.SECURITY_CREDENTIALS, this.profile.getProperty(ConnectionMetaData.CREDENTIALS)); ! ! // Stand by ! // ! // InitialContext context = new InitialContext(props); ! // MBeanServerConnection connector = (MBeanServerConnection) context.lookup(this.profile.getProperty(ConnectionMetaData.CONTEXT)); ! // ! // MBeanServer mbeanServer = MBeanServerProxy.createMBeanProxy(connector); ! // this.setMBeanServer(mbeanServer); ! } ! } --- 1,46 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.model.connector; ! ! import java.util.Hashtable; ! ! import javax.naming.Context; ! ! import org.ejtools.jmx.browser.model.service.ConnectionMetaData; ! ! ! /** ! * @author letiembl ! * @created 4 septembre 2002 ! * @version $Revision$ ! */ ! public class TMX4J21ConnectionService extends AbstractConnectionService ! { ! /** ! * @exception Exception Description of the Exception ! */ ! protected void createMBeanServer() ! throws Exception ! { ! System.setProperty("jmx.serial.form", "1.0"); ! ! Hashtable props = new Hashtable(); ! props.put(Context.INITIAL_CONTEXT_FACTORY, this.profile.getProperty(ConnectionMetaData.FACTORY)); ! props.put(Context.URL_PKG_PREFIXES, this.profile.getProperty(ConnectionMetaData.PACKAGES)); ! props.put(Context.PROVIDER_URL, this.profile.getProperty(ConnectionMetaData.URL)); ! props.put(Context.SECURITY_PRINCIPAL, this.profile.getProperty(ConnectionMetaData.PRINCIPAL)); ! props.put(Context.SECURITY_CREDENTIALS, this.profile.getProperty(ConnectionMetaData.CREDENTIALS)); ! ! // Stand by ! // ! // InitialContext context = new InitialContext(props); ! // MBeanServerConnection connector = (MBeanServerConnection) context.lookup(this.profile.getProperty(ConnectionMetaData.CONTEXT)); ! // ! // MBeanServer mbeanServer = MBeanServerProxy.createMBeanProxy(connector); ! // this.setMBeanServer(mbeanServer); ! } ! } Index: WebLogic70ConnectionService.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/model/connector/WebLogic70ConnectionService.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** WebLogic70ConnectionService.java 24 Feb 2003 22:02:40 -0000 1.3 --- WebLogic70ConnectionService.java 27 Nov 2003 01:13:07 -0000 1.4 *************** *** 1,52 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.model.connector; ! ! import java.lang.reflect.Method; ! import java.util.Hashtable; ! ! import javax.management.MBeanServer; ! import javax.naming.Context; ! import javax.naming.InitialContext; ! ! import org.ejtools.jmx.MBeanServerProxy; ! import org.ejtools.jmx.browser.model.service.ConnectionMetaData; ! ! ! /** ! * As described <a href="http://edocs.bea.com/wls/docs70/jmx/">here</a> ! * ! * @author letiembl ! * @created 4 septembre 2002 ! * @version $Revision$ ! */ ! public class WebLogic70ConnectionService extends AbstractConnectionService ! { ! /** ! * @exception Exception Description of the Exception ! */ ! protected void createMBeanServer() ! throws Exception ! { ! System.setProperty("jmx.serial.form", "1.0"); ! ! Hashtable props = new Hashtable(); ! props.put(Context.INITIAL_CONTEXT_FACTORY, this.profile.getProperty(ConnectionMetaData.FACTORY)); ! props.put(Context.URL_PKG_PREFIXES, this.profile.getProperty(ConnectionMetaData.PACKAGES)); ! props.put(Context.PROVIDER_URL, this.profile.getProperty(ConnectionMetaData.URL)); ! props.put(Context.SECURITY_PRINCIPAL, this.profile.getProperty(ConnectionMetaData.PRINCIPAL)); ! props.put(Context.SECURITY_CREDENTIALS, this.profile.getProperty(ConnectionMetaData.CREDENTIALS)); ! ! InitialContext context = new InitialContext(props); ! Object mbeanHome = context.lookup(this.profile.getProperty(ConnectionMetaData.CONTEXT)); ! Method m = mbeanHome.getClass().getMethod("getMBeanServer", new Class[]{}); ! Object remoteServer = m.invoke(mbeanHome, new Object[0]); ! ! MBeanServer mbeanServer = MBeanServerProxy.createMBeanProxy(remoteServer); ! this.setMBeanServer(mbeanServer); ! } ! } --- 1,52 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.model.connector; ! ! import java.lang.reflect.Method; ! import java.util.Hashtable; ! ! import javax.management.MBeanServer; ! import javax.naming.Context; ! import javax.naming.InitialContext; ! ! import org.ejtools.jmx.MBeanServerProxy; ! import org.ejtools.jmx.browser.model.service.ConnectionMetaData; ! ! ! /** ! * As described <a href="http://edocs.bea.com/wls/docs70/jmx/">here</a> ! * ! * @author letiembl ! * @created 4 septembre 2002 ! * @version $Revision$ ! */ ! public class WebLogic70ConnectionService extends AbstractConnectionService ! { ! /** ! * @exception Exception Description of the Exception ! */ ! protected void createMBeanServer() ! throws Exception ! { ! System.setProperty("jmx.serial.form", "1.0"); ! ! Hashtable props = new Hashtable(); ! props.put(Context.INITIAL_CONTEXT_FACTORY, this.profile.getProperty(ConnectionMetaData.FACTORY)); ! props.put(Context.URL_PKG_PREFIXES, this.profile.getProperty(ConnectionMetaData.PACKAGES)); ! props.put(Context.PROVIDER_URL, this.profile.getProperty(ConnectionMetaData.URL)); ! props.put(Context.SECURITY_PRINCIPAL, this.profile.getProperty(ConnectionMetaData.PRINCIPAL)); ! props.put(Context.SECURITY_CREDENTIALS, this.profile.getProperty(ConnectionMetaData.CREDENTIALS)); ! ! InitialContext context = new InitialContext(props); ! Object mbeanHome = context.lookup(this.profile.getProperty(ConnectionMetaData.CONTEXT)); ! Method m = mbeanHome.getClass().getMethod("getMBeanServer", new Class[]{}); ! Object remoteServer = m.invoke(mbeanHome, new Object[0]); ! ! MBeanServer mbeanServer = MBeanServerProxy.createMBeanProxy(remoteServer); ! this.setMBeanServer(mbeanServer); ! } ! } |
Update of /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/mbean In directory sc8-pr-cvs1:/tmp/cvs-serv13614/jmx.browser/src/main/org/ejtools/jmx/browser/mbean Modified Files: CustomViewDeployer.java CustomViewDeployerMBean.java ResultLine.java View.java ViewLine.java Log Message: Address Bug #775745 Address Todo #800902 Address Todo #755528 Remove @created tags Add support for MXJ4 2.0.0 (still beta) Add support for JXM Remoting through RMI Index: CustomViewDeployer.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/mbean/CustomViewDeployer.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CustomViewDeployer.java 24 Feb 2003 22:02:40 -0000 1.2 --- CustomViewDeployer.java 27 Nov 2003 01:13:06 -0000 1.3 *************** *** 1,301 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.mbean; ! ! import java.io.File; ! import java.io.InputStream; ! import java.util.Calendar; ! import java.util.Iterator; ! import java.util.TreeMap; ! ! import javax.management.MBeanNotificationInfo; ! import javax.management.Notification; ! import javax.xml.parsers.DocumentBuilder; ! import javax.xml.parsers.DocumentBuilderFactory; ! import org.w3c.dom.Element; ! import org.w3c.dom.NodeList; ! ! import org.jboss.deployment.DeploymentException; ! import org.jboss.deployment.DeploymentInfo; ! import org.jboss.deployment.SubDeployerSupport; ! import org.xml.sax.InputSource; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @jmx.mbean name="user:service=CustomViewDeployer" ! * extends="org.jboss.deployment.SubDeployerMBean" ! */ ! public class CustomViewDeployer extends SubDeployerSupport implements CustomViewDeployerMBean ! { ! /** Description of the Field */ ! protected TreeMap views = new TreeMap(); ! /** Description of the Field */ ! private MBeanNotificationInfo[] info = null; ! /** Description of the Field */ ! private long sequence = 0; ! /** Description of the Field */ ! public final static String EXTENSION = ".jmxml"; ! /** Description of the Field */ ! public final static String OBJECT_NAME = "user:service=CustomViewDeployer"; ! ! ! /** ! * Description of the Method ! * ! * @jmx:managed-constructor description="default constructor" ! */ ! public CustomViewDeployer() { } ! ! ! /** ! * Description of the Method ! * ! * @param di Description of the Parameter ! * @return Description of the Return Value ! * @jmx.managed-operation ! */ ! public boolean accepts(DeploymentInfo di) ! { ! String urlStr = di.url.toString(); ! return urlStr.endsWith(EXTENSION); ! } ! ! ! /** ! * Description of the Method ! * ! * @param di Description of the Parameter ! * @exception DeploymentException Description of the Exception ! * @jmx.managed-operation ! */ ! public void create(DeploymentInfo di) ! throws DeploymentException ! { ! try ! { ! NodeList nl = null; ! log.debug("Deploying Custom View, create step: url " + di.url); ! ! String url = di.url.toString(); ! Element top = (Element) (di.document.getElementsByTagName("customview")).item(0); ! ! View custview = new View(); ! custview.setName(url); ! custview.setDisplayName(top.getAttribute("displayName")); ! log.debug("Create view " + custview.getName()); ! ! Element attributes = (Element) (di.document.getElementsByTagName("attributes")).item(0); ! Element operations = (Element) (di.document.getElementsByTagName("operations")).item(0); ! ! nl = attributes.getElementsByTagName("query"); ! log.debug("About to create " + nl.getLength() + " attribute queries"); ! ! for (int i = 0; i < nl.getLength(); i++) ! { ! Element node = (Element) nl.item(i); ! ! String exp = node.getAttribute("exp"); ! String name = node.getAttribute("name"); ! ! custview.addAttributeLine(exp, name); ! log.debug("Query expression " + exp + " which has name " + name); ! } ! ! nl = operations.getElementsByTagName("query"); ! log.debug("About to create " + nl.getLength() + " operation queries"); ! ! for (int i = 0; i < nl.getLength(); i++) ! { ! Element node = (Element) nl.item(i); ! ! String exp = node.getAttribute("exp"); ! String name = node.getAttribute("name"); ! ! custview.addOperationLine(exp, name); ! log.debug("Query expression " + exp + " which has operation " + name); ! } ! ! views.put(url, custview); ! log.debug("View added"); ! ! Notification notification = new Notification("VIEW_ADDED", this, sequence++, Calendar.getInstance().getTime().getTime(), "Custom view " + url); ! this.sendNotification(notification); ! } ! catch (Exception e) ! { ! destroy(di); ! throw new DeploymentException("create operation failed for package " + di.url, e); ! } ! } ! ! ! /** ! * Description of the Method ! * ! * @param di Description of the Parameter ! * @jmx.managed-operation ! */ ! public void destroy(DeploymentInfo di) ! { ! log.debug("Deploying Custom View, destroy step: url " + di.url); ! ! try ! { ! String url = di.url.toString(); ! log.debug("Destroy view " + url); ! ! views.remove(url); ! log.debug("View removed"); ! ! Notification notification = new Notification("VIEW_REMOVED", this, sequence++, Calendar.getInstance().getTime().getTime(), "Custom view " + url); ! this.sendNotification(notification); ! } ! catch (Exception e) ! { ! } ! } ! ! ! /** ! * Gets the notificationInfo attribute of the CustomViewDeployer object ! * ! * @return The notificationInfo value ! */ ! public MBeanNotificationInfo[] getNotificationInfo() ! { ! if (info == null) ! { ! info = new MBeanNotificationInfo[]{ ! new MBeanNotificationInfo(new String[]{"VIEW_ADDED"}, "javax.management.Notification", "Notification that a view has been added"), ! new MBeanNotificationInfo(new String[]{"VIEW_REMOVED"}, "javax.management.Notification", "Notification that a view has been removed") ! }; ! } ! return info; ! } ! ! ! /** ! * Gets the customView attribute of the CustomViewDeployer object ! * ! * @param index Description of the Parameter ! * @return The view value ! * @jmx.managed-operation ! */ ! public View getView(int index) ! { ! Iterator iterator = views.values().iterator(); ! View view = null; ! int i = 0; ! ! while (iterator.hasNext()) ! { ! view = (View) iterator.next(); ! if (index == i) ! { ! break; ! } ! i++; ! } ! ! return view; ! } ! ! ! /** ! * Description of the Method ! * ! * @return The customViews value ! * @jmx.managed-operation ! */ ! public View[] getViews() ! { ! return (View[]) views.values().toArray(new View[0]); ! } ! ! ! /** ! * Description of the Method ! * ! * @param di Description of the Parameter ! * @exception DeploymentException Description of the Exception ! * @jmx.managed-operation ! */ ! public void init(DeploymentInfo di) ! throws DeploymentException ! { ! boolean debug = log.isDebugEnabled(); ! ! try ! { ! // resolve the watch ! if (di.url.getProtocol().equals("file")) ! { ! File file = new File(di.url.getFile()); ! ! // If not directory we watch the package ! if (!file.isDirectory()) ! { ! di.watch = di.url; ! } ! } ! else ! { ! // We watch the top only, no directory support ! di.watch = di.url; ! } ! ! // Get the document ! parseDocument(di); ! } ! catch (Exception e) ! { ! throw new DeploymentException(e); ! } ! ! // invoke super-class initialization ! processNestedDeployments(di); ! } ! ! ! /** ! * Description of the Method ! * ! * @param di Description of the Parameter ! * @exception Exception Description of the Exception ! */ ! protected void parseDocument(DeploymentInfo di) ! throws Exception ! { ! DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder(); ! InputStream stream = null; ! ! // If we are in a xml only get the URL ! if (di.isXML) ! { ! stream = di.localUrl.openStream(); ! } ! // Else load from the jar or directory ! else ! { ! throw new DeploymentException("Can only handle *" + EXTENSION); ! } ! ! // Validate that the stream is not null ! if (stream == null) ! { ! throw new DeploymentException("Failed to find valid *" + EXTENSION); ! } ! ! InputSource is = new InputSource(stream); ! di.document = parser.parse(is); ! } ! } --- 1,299 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.mbean; ! ! import java.io.File; ! import java.io.InputStream; ! import java.util.Calendar; ! import java.util.Iterator; ! import java.util.TreeMap; ! ! import javax.management.MBeanNotificationInfo; ! import javax.management.Notification; ! import javax.xml.parsers.DocumentBuilder; ! import javax.xml.parsers.DocumentBuilderFactory; ! import org.w3c.dom.Element; ! import org.w3c.dom.NodeList; ! ! import org.jboss.deployment.DeploymentException; ! import org.jboss.deployment.DeploymentInfo; ! import org.jboss.deployment.SubDeployerSupport; ! import org.xml.sax.InputSource; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 13 d?cembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! * @jmx.mbean name="user:service=CustomViewDeployer" ! * extends="org.jboss.deployment.SubDeployerMBean" ! */ ! public class CustomViewDeployer extends SubDeployerSupport implements CustomViewDeployerMBean ! { ! /** Description of the Field */ ! protected TreeMap views = new TreeMap(); ! /** Description of the Field */ ! private MBeanNotificationInfo[] info = null; ! /** Description of the Field */ ! private long sequence = 0; ! /** Description of the Field */ ! public final static String EXTENSION = ".jmxml"; ! /** Description of the Field */ ! public final static String OBJECT_NAME = "user:service=CustomViewDeployer"; ! ! ! /** ! * Description of the Method ! * ! * @jmx:managed-constructor description="default constructor" ! */ ! public CustomViewDeployer() { } ! ! ! /** ! * Description of the Method ! * ! * @param di Description of the Parameter ! * @return Description of the Return Value ! * @jmx.managed-operation ! */ ! public boolean accepts(DeploymentInfo di) ! { ! String urlStr = di.url.toString(); ! return urlStr.endsWith(EXTENSION); ! } ! ! ! /** ! * Description of the Method ! * ! * @param di Description of the Parameter ! * @exception DeploymentException Description of the Exception ! * @jmx.managed-operation ! */ ! public void create(DeploymentInfo di) ! throws DeploymentException ! { ! try ! { ! NodeList nl = null; ! log.debug("Deploying Custom View, create step: url " + di.url); ! ! String url = di.url.toString(); ! Element top = (Element) (di.document.getElementsByTagName("customview")).item(0); ! ! View custview = new View(); ! custview.setName(url); ! custview.setDisplayName(top.getAttribute("displayName")); ! log.debug("Create view " + custview.getName()); ! ! Element attributes = (Element) (di.document.getElementsByTagName("attributes")).item(0); ! Element operations = (Element) (di.document.getElementsByTagName("operations")).item(0); ! ! nl = attributes.getElementsByTagName("query"); ! log.debug("About to create " + nl.getLength() + " attribute queries"); ! ! for (int i = 0; i < nl.getLength(); i++) ! { ! Element node = (Element) nl.item(i); ! ! String exp = node.getAttribute("exp"); ! String name = node.getAttribute("name"); ! ! custview.addAttributeLine(exp, name); ! log.debug("Query expression " + exp + " which has name " + name); ! } ! ! nl = operations.getElementsByTagName("query"); ! log.debug("About to create " + nl.getLength() + " operation queries"); ! ! for (int i = 0; i < nl.getLength(); i++) ! { ! Element node = (Element) nl.item(i); ! ! String exp = node.getAttribute("exp"); ! String name = node.getAttribute("name"); ! ! custview.addOperationLine(exp, name); ! log.debug("Query expression " + exp + " which has operation " + name); ! } ! ! views.put(url, custview); ! log.debug("View added"); ! ! Notification notification = new Notification("VIEW_ADDED", this, sequence++, Calendar.getInstance().getTime().getTime(), "Custom view " + url); ! this.sendNotification(notification); ! } ! catch (Exception e) ! { ! destroy(di); ! throw new DeploymentException("create operation failed for package " + di.url, e); ! } ! } ! ! ! /** ! * Description of the Method ! * ! * @param di Description of the Parameter ! * @jmx.managed-operation ! */ ! public void destroy(DeploymentInfo di) ! { ! log.debug("Deploying Custom View, destroy step: url " + di.url); ! ! try ! { ! String url = di.url.toString(); ! log.debug("Destroy view " + url); ! ! views.remove(url); ! log.debug("View removed"); ! ! Notification notification = new Notification("VIEW_REMOVED", this, sequence++, Calendar.getInstance().getTime().getTime(), "Custom view " + url); ! this.sendNotification(notification); ! } ! catch (Exception e) ! { ! } ! } ! ! ! /** ! * Gets the notificationInfo attribute of the CustomViewDeployer object ! * ! * @return The notificationInfo value ! */ ! public MBeanNotificationInfo[] getNotificationInfo() ! { ! if (info == null) ! { ! info = new MBeanNotificationInfo[]{ ! new MBeanNotificationInfo(new String[]{"VIEW_ADDED"}, "javax.management.Notification", "Notification that a view has been added"), ! new MBeanNotificationInfo(new String[]{"VIEW_REMOVED"}, "javax.management.Notification", "Notification that a view has been removed") ! }; ! } ! return info; ! } ! ! ! /** ! * Gets the customView attribute of the CustomViewDeployer object ! * ! * @param index Description of the Parameter ! * @return The view value ! * @jmx.managed-operation ! */ ! public View getView(int index) ! { ! Iterator iterator = views.values().iterator(); ! View view = null; ! int i = 0; ! ! while (iterator.hasNext()) ! { ! view = (View) iterator.next(); ! if (index == i) ! { ! break; ! } ! i++; ! } ! ! return view; ! } ! ! ! /** ! * Description of the Method ! * ! * @return The customViews value ! * @jmx.managed-operation ! */ ! public View[] getViews() ! { ! return (View[]) views.values().toArray(new View[0]); ! } ! ! ! /** ! * Description of the Method ! * ! * @param di Description of the Parameter ! * @exception DeploymentException Description of the Exception ! * @jmx.managed-operation ! */ ! public void init(DeploymentInfo di) ! throws DeploymentException ! { ! try ! { ! // resolve the watch ! if (di.url.getProtocol().equals("file")) ! { ! File file = new File(di.url.getFile()); ! ! // If not directory we watch the package ! if (!file.isDirectory()) ! { ! di.watch = di.url; ! } ! } ! else ! { ! // We watch the top only, no directory support ! di.watch = di.url; ! } ! ! // Get the document ! parseDocument(di); ! } ! catch (Exception e) ! { ! throw new DeploymentException(e); ! } ! ! // invoke super-class initialization ! processNestedDeployments(di); ! } ! ! ! /** ! * Description of the Method ! * ! * @param di Description of the Parameter ! * @exception Exception Description of the Exception ! */ ! protected void parseDocument(DeploymentInfo di) ! throws Exception ! { ! DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder(); ! InputStream stream = null; ! ! // If we are in a xml only get the URL ! if (di.isXML) ! { ! stream = di.localUrl.openStream(); ! } ! // Else load from the jar or directory ! else ! { ! throw new DeploymentException("Can only handle *" + EXTENSION); ! } ! ! // Validate that the stream is not null ! if (stream == null) ! { ! throw new DeploymentException("Failed to find valid *" + EXTENSION); ! } ! ! InputSource is = new InputSource(stream); ! di.document = parser.parse(is); ! } ! } Index: CustomViewDeployerMBean.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/mbean/CustomViewDeployerMBean.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CustomViewDeployerMBean.java 24 Feb 2003 22:02:44 -0000 1.2 --- CustomViewDeployerMBean.java 27 Nov 2003 01:13:06 -0000 1.3 *************** *** 1,74 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.mbean; ! ! ! /** ! * MBean interface. ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public interface CustomViewDeployerMBean extends org.jboss.deployment.SubDeployerMBean ! { ! ! /** ! * Description of the Method ! * ! * @param di Description of the Parameter ! * @return Description of the Return Value ! */ ! boolean accepts(org.jboss.deployment.DeploymentInfo di); ! ! ! /** ! * Description of the Method ! * ! * @param di Description of the Parameter ! * @exception org.jboss.deployment.DeploymentException Description of the Exception ! */ ! void create(org.jboss.deployment.DeploymentInfo di) ! throws org.jboss.deployment.DeploymentException; ! ! ! /** ! * Description of the Method ! * ! * @param di Description of the Parameter ! */ ! void destroy(org.jboss.deployment.DeploymentInfo di); ! ! ! /** ! * Gets the customView attribute of the CustomViewDeployer object ! * ! * @param index Description of the Parameter ! * @return The view value ! */ ! org.ejtools.jmx.browser.mbean.View getView(int index); ! ! ! /** ! * Description of the Method ! * ! * @return The customViews value ! */ ! org.ejtools.jmx.browser.mbean.View[] getViews(); ! ! ! /** ! * Description of the Method ! * ! * @param di Description of the Parameter ! * @exception org.jboss.deployment.DeploymentException Description of the Exception ! */ ! void init(org.jboss.deployment.DeploymentInfo di) ! throws org.jboss.deployment.DeploymentException; ! ! } --- 1,74 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.mbean; ! ! ! /** ! * MBean interface. ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public interface CustomViewDeployerMBean extends org.jboss.deployment.SubDeployerMBean ! { ! ! /** ! * Description of the Method ! * ! * @param di Description of the Parameter ! * @return Description of the Return Value ! */ ! boolean accepts(org.jboss.deployment.DeploymentInfo di); ! ! ! /** ! * Description of the Method ! * ! * @param di Description of the Parameter ! * @exception org.jboss.deployment.DeploymentException Description of the Exception ! */ ! void create(org.jboss.deployment.DeploymentInfo di) ! throws org.jboss.deployment.DeploymentException; ! ! ! /** ! * Description of the Method ! * ! * @param di Description of the Parameter ! */ ! void destroy(org.jboss.deployment.DeploymentInfo di); ! ! ! /** ! * Gets the customView attribute of the CustomViewDeployer object ! * ! * @param index Description of the Parameter ! * @return The view value ! */ ! org.ejtools.jmx.browser.mbean.View getView(int index); ! ! ! /** ! * Description of the Method ! * ! * @return The customViews value ! */ ! org.ejtools.jmx.browser.mbean.View[] getViews(); ! ! ! /** ! * Description of the Method ! * ! * @param di Description of the Parameter ! * @exception org.jboss.deployment.DeploymentException Description of the Exception ! */ ! void init(org.jboss.deployment.DeploymentInfo di) ! throws org.jboss.deployment.DeploymentException; ! ! } Index: ResultLine.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/mbean/ResultLine.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ResultLine.java 24 Feb 2003 22:02:43 -0000 1.2 --- ResultLine.java 27 Nov 2003 01:13:06 -0000 1.3 *************** *** 1,133 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.mbean; ! ! import java.beans.beancontext.BeanContextSupport; ! ! import javax.management.MBeanFeatureInfo; ! ! import org.ejtools.jmx.MBeanAccessor; ! ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public class ResultLine extends BeanContextSupport ! { ! /** Description of the Field */ ! protected MBeanAccessor accessor = null; ! /** Description of the Field */ ! protected MBeanFeatureInfo info = null; ! /** Description of the Field */ ! protected int type = -1; ! ! ! /** Constructor */ ! public ResultLine() { } ! ! ! /** ! * Gets the objectName attribute of the ViewLine object ! * ! * @return The objectName value ! */ ! public MBeanAccessor getAccessor() ! { ! return this.accessor; ! } ! ! ! /** ! * Gets the name attribute of the ViewLine object ! * ! * @return The name value ! */ ! public MBeanFeatureInfo getInfo() ! { ! return this.info; ! } ! ! ! /** ! * Gets the name attribute of the ResultLine object ! * ! * @return The name value ! */ ! public String getName() ! { ! return this.accessor.getCanonicalName(); ! } ! ! ! /** ! * Gets the type attribute of the ViewLine object ! * ! * @return The type value ! */ ! public int getType() ! { ! return this.type; ! } ! ! ! /** ! * Sets the objectName attribute of the ViewLine object ! * ! * @param accessor The new accessor value ! */ ! public void setAccessor(MBeanAccessor accessor) ! { ! this.accessor = accessor; ! } ! ! ! /** ! * Sets the name attribute of the ViewLine object ! * ! * @param info The new info value ! */ ! public void setInfo(MBeanFeatureInfo info) ! { ! this.info = info; ! } ! ! ! /** ! * Sets the type attribute of the ViewLine object ! * ! * @param type The new type value ! */ ! public void setType(int type) ! { ! this.type = type; ! } ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Return Value ! */ ! public String toString() ! { ! String result = "<undefined>"; ! if (this.accessor != null) ! { ! result = result + this.accessor.getCanonicalName(); ! } ! if (this.info != null) ! { ! result = result + info.getName(); ! } ! return result; ! } ! } --- 1,133 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.mbean; ! ! import java.beans.beancontext.BeanContextSupport; ! ! import javax.management.MBeanFeatureInfo; ! ! import org.ejtools.jmx.MBeanAccessor; ! ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public class ResultLine extends BeanContextSupport ! { ! /** Description of the Field */ ! protected MBeanAccessor accessor = null; ! /** Description of the Field */ ! protected MBeanFeatureInfo info = null; ! /** Description of the Field */ ! protected int type = -1; ! ! ! /** Constructor */ ! public ResultLine() { } ! ! ! /** ! * Gets the objectName attribute of the ViewLine object ! * ! * @return The objectName value ! */ ! public MBeanAccessor getAccessor() ! { ! return this.accessor; ! } ! ! ! /** ! * Gets the name attribute of the ViewLine object ! * ! * @return The name value ! */ ! public MBeanFeatureInfo getInfo() ! { ! return this.info; ! } ! ! ! /** ! * Gets the name attribute of the ResultLine object ! * ! * @return The name value ! */ ! public String getName() ! { ! return this.accessor.getCanonicalName(); ! } ! ! ! /** ! * Gets the type attribute of the ViewLine object ! * ! * @return The type value ! */ ! public int getType() ! { ! return this.type; ! } ! ! ! /** ! * Sets the objectName attribute of the ViewLine object ! * ! * @param accessor The new accessor value ! */ ! public void setAccessor(MBeanAccessor accessor) ! { ! this.accessor = accessor; ! } ! ! ! /** ! * Sets the name attribute of the ViewLine object ! * ! * @param info The new info value ! */ ! public void setInfo(MBeanFeatureInfo info) ! { ! this.info = info; ! } ! ! ! /** ! * Sets the type attribute of the ViewLine object ! * ! * @param type The new type value ! */ ! public void setType(int type) ! { ! this.type = type; ! } ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Return Value ! */ ! public String toString() ! { ! String result = "<undefined>"; ! if (this.accessor != null) ! { ! result = result + this.accessor.getCanonicalName(); ! } ! if (this.info != null) ! { ! result = result + info.getName(); ! } ! return result; ! } ! } Index: View.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/mbean/View.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** View.java 10 Feb 2003 20:49:44 -0000 1.1 --- View.java 27 Nov 2003 01:13:06 -0000 1.2 *************** *** 1,305 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.mbean; ! ! import java.beans.beancontext.BeanContextSupport; ! import java.util.Collection; ! import java.util.Iterator; ! import java.util.Vector; ! ! import javax.management.MBeanFeatureInfo; ! import javax.management.ObjectName; ! ! import org.apache.log4j.Logger; ! import org.ejtools.beans.Sort; ! import org.ejtools.jmx.MBeanAccessor; ! ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public class View extends BeanContextSupport ! { ! /** Description of the Field */ ! protected String displayName = "<undefined>"; ! /** Description of the Field */ ! protected String name = "<undefined>"; ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(View.class); ! /** Description of the Field */ ! public final static int ATTRIBUTE_TYPE = 0; ! /** Description of the Field */ ! public final static int OPERATION_TYPE = 1; ! ! ! /** Constructor */ ! public View() { } ! ! ! /** ! * Adds a feature to the AttributeLine attribute of the View object ! * ! * @param objectName The feature to be added to the AttributeLine attribute ! * @param name The feature to be added to the AttributeLine attribute ! */ ! public void addAttributeLine(ObjectName objectName, String name) ! { ! ViewLine line = new ViewLine(); ! line.setType(View.ATTRIBUTE_TYPE); ! line.setObjectName(objectName); ! line.setName(name); ! add(line); ! logger.debug("Atrribute Line added (" + objectName + " => " + name + ")"); ! } ! ! ! /** ! * Adds a feature to the AttributeLine attribute of the View object ! * ! * @param expression The feature to be added to the AttributeLine attribute ! * @param name The feature to be added to the AttributeLine attribute ! */ ! public void addAttributeLine(String expression, String name) ! { ! try ! { ! ObjectName objectName = new ObjectName(expression); ! addAttributeLine(objectName, name); ! } ! catch (Exception e) ! { ! logger.error("Exception while creating Attribute Line : " + e.getMessage()); ! } ! } ! ! ! /** ! * Adds a feature to the AttributeResult attribute of the View object ! * ! * @param accessor The feature to be added to the AttributeResult attribute ! * @param info The feature to be added to the AttributeResult attribute ! */ ! public void addAttributeResult(MBeanAccessor accessor, MBeanFeatureInfo info) ! { ! ResultLine line = new ResultLine(); ! line.setType(View.ATTRIBUTE_TYPE); ! line.setAccessor(accessor); ! line.setInfo(info); ! add(line); ! logger.debug("Atrribute Result added (" + accessor + " => " + info + ")"); ! } ! ! ! /** ! * Adds a feature to the OperationLine attribute of the View object ! * ! * @param objectName The feature to be added to the OperationLine attribute ! * @param name The feature to be added to the OperationLine attribute ! */ ! public void addOperationLine(ObjectName objectName, String name) ! { ! ViewLine line = new ViewLine(); ! line.setType(View.OPERATION_TYPE); ! line.setObjectName(objectName); ! line.setName(name); ! add(line); ! logger.debug("Operation Line added (" + objectName + " => " + name + ")"); ! } ! ! ! /** ! * Adds a feature to the OperationLine attribute of the View object ! * ! * @param expression The feature to be added to the OperationLine attribute ! * @param name The feature to be added to the OperationLine attribute ! */ ! public void addOperationLine(String expression, String name) ! { ! try ! { ! ObjectName objectName = new ObjectName(expression); ! addOperationLine(objectName, name); ! } ! catch (Exception e) ! { ! logger.error("Exception while creating Operation Line : " + e.getMessage()); ! } ! } ! ! ! /** ! * Adds a feature to the OperationResult attribute of the View object ! * ! * @param accessor The feature to be added to the OperationResult attribute ! * @param info The feature to be added to the OperationResult attribute ! */ ! public void addOperationResult(MBeanAccessor accessor, MBeanFeatureInfo info) ! { ! ResultLine line = new ResultLine(); ! line.setType(View.OPERATION_TYPE); ! line.setAccessor(accessor); ! line.setInfo(info); ! add(line); ! logger.debug("Operation Result added (" + accessor + " => " + info + ")"); ! } ! ! ! /** ! * Gets the attributeLines attribute of the View object ! * ! * @return The attributeLines value ! */ ! public Collection getAttributeLines() ! { ! Vector result = new Vector(); ! Iterator iterator = Sort.getChildrenByClass(iterator(), ViewLine.class); ! while (iterator.hasNext()) ! { ! ViewLine line = (ViewLine) iterator.next(); ! if (line.getType() == View.ATTRIBUTE_TYPE) ! { ! result.add(line); ! } ! } ! return result; ! } ! ! ! /** ! * Gets the attributeResults attribute of the View object ! * ! * @return The attributeResults value ! */ ! public Collection getAttributeResults() ! { ! Vector result = new Vector(); ! Iterator iterator = Sort.getChildrenByClass(iterator(), ResultLine.class); ! while (iterator.hasNext()) ! { ! ResultLine line = (ResultLine) iterator.next(); ! if (line.getType() == View.ATTRIBUTE_TYPE) ! { ! result.add(line); ! } ! } ! return result; ! } ! ! ! /** ! * Gets the displayName attribute of the View object ! * ! * @return The displayName value ! */ ! public String getDisplayName() ! { ! return this.displayName; ! } ! ! ! /** ! * Gets the name attribute of the View object ! * ! * @return The name value ! */ ! public String getName() ! { ! return this.name; ! } ! ! ! /** ! * Gets the operationLines attribute of the View object ! * ! * @return The operationLines value ! */ ! public Collection getOperationLines() ! { ! Vector result = new Vector(); ! Iterator iterator = Sort.getChildrenByClass(iterator(), ViewLine.class); ! while (iterator.hasNext()) ! { ! ViewLine line = (ViewLine) iterator.next(); ! if (line.getType() == View.OPERATION_TYPE) ! { ! result.add(line); ! } ! } ! return result; ! } ! ! ! /** ! * Gets the operationResults attribute of the View object ! * ! * @return The operationResults value ! */ ! public Collection getOperationResults() ! { ! Vector result = new Vector(); ! Iterator iterator = Sort.getChildrenByClass(iterator(), ResultLine.class); ! while (iterator.hasNext()) ! { ! ResultLine line = (ResultLine) iterator.next(); ! if (line.getType() == View.OPERATION_TYPE) ! { ! result.add(line); ! } ! } ! return result; ! } ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Return Value ! */ ! public Iterator iterator() ! { ! return Sort.sortByName(super.iterator()); ! } ! ! ! ! /** ! * Sets the displayName attribute of the View object ! * ! * @param displayName The new displayName value ! */ ! public void setDisplayName(String displayName) ! { ! this.displayName = displayName; ! } ! ! ! /** ! * Sets the name attribute of the View object ! * ! * @param name The new name value ! */ ! public void setName(String name) ! { ! this.name = name; ! } ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Return Value ! */ ! public String toString() ! { ! return this.displayName; ! } ! } --- 1,305 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.mbean; ! ! import java.beans.beancontext.BeanContextSupport; ! import java.util.Collection; ! import java.util.Iterator; ! import java.util.Vector; ! ! import javax.management.MBeanFeatureInfo; ! import javax.management.ObjectName; ! ! import org.apache.log4j.Logger; ! import org.ejtools.beans.Sort; ! import org.ejtools.jmx.MBeanAccessor; ! ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public class View extends BeanContextSupport ! { ! /** Description of the Field */ ! protected String displayName = "<undefined>"; ! /** Description of the Field */ ! protected String name = "<undefined>"; ! /** Description of the Field */ ! private static Logger logger = Logger.getLogger(View.class); ! /** Description of the Field */ ! public final static int ATTRIBUTE_TYPE = 0; ! /** Description of the Field */ ! public final static int OPERATION_TYPE = 1; ! ! ! /** Constructor */ ! public View() { } ! ! ! /** ! * Adds a feature to the AttributeLine attribute of the View object ! * ! * @param objectName The feature to be added to the AttributeLine attribute ! * @param name The feature to be added to the AttributeLine attribute ! */ ! public void addAttributeLine(ObjectName objectName, String name) ! { ! ViewLine line = new ViewLine(); ! line.setType(View.ATTRIBUTE_TYPE); ! line.setObjectName(objectName); ! line.setName(name); ! add(line); ! logger.debug("Atrribute Line added (" + objectName + " => " + name + ")"); ! } ! ! ! /** ! * Adds a feature to the AttributeLine attribute of the View object ! * ! * @param expression The feature to be added to the AttributeLine attribute ! * @param name The feature to be added to the AttributeLine attribute ! */ ! public void addAttributeLine(String expression, String name) ! { ! try ! { ! ObjectName objectName = new ObjectName(expression); ! addAttributeLine(objectName, name); ! } ! catch (Exception e) ! { ! logger.error("Exception while creating Attribute Line : " + e.getMessage()); ! } ! } ! ! ! /** ! * Adds a feature to the AttributeResult attribute of the View object ! * ! * @param accessor The feature to be added to the AttributeResult attribute ! * @param info The feature to be added to the AttributeResult attribute ! */ ! public void addAttributeResult(MBeanAccessor accessor, MBeanFeatureInfo info) ! { ! ResultLine line = new ResultLine(); ! line.setType(View.ATTRIBUTE_TYPE); ! line.setAccessor(accessor); ! line.setInfo(info); ! add(line); ! logger.debug("Atrribute Result added (" + accessor + " => " + info + ")"); ! } ! ! ! /** ! * Adds a feature to the OperationLine attribute of the View object ! * ! * @param objectName The feature to be added to the OperationLine attribute ! * @param name The feature to be added to the OperationLine attribute ! */ ! public void addOperationLine(ObjectName objectName, String name) ! { ! ViewLine line = new ViewLine(); ! line.setType(View.OPERATION_TYPE); ! line.setObjectName(objectName); ! line.setName(name); ! add(line); ! logger.debug("Operation Line added (" + objectName + " => " + name + ")"); ! } ! ! ! /** ! * Adds a feature to the OperationLine attribute of the View object ! * ! * @param expression The feature to be added to the OperationLine attribute ! * @param name The feature to be added to the OperationLine attribute ! */ ! public void addOperationLine(String expression, String name) ! { ! try ! { ! ObjectName objectName = new ObjectName(expression); ! addOperationLine(objectName, name); ! } ! catch (Exception e) ! { ! logger.error("Exception while creating Operation Line : " + e.getMessage()); ! } ! } ! ! ! /** ! * Adds a feature to the OperationResult attribute of the View object ! * ! * @param accessor The feature to be added to the OperationResult attribute ! * @param info The feature to be added to the OperationResult attribute ! */ ! public void addOperationResult(MBeanAccessor accessor, MBeanFeatureInfo info) ! { ! ResultLine line = new ResultLine(); ! line.setType(View.OPERATION_TYPE); ! line.setAccessor(accessor); ! line.setInfo(info); ! add(line); ! logger.debug("Operation Result added (" + accessor + " => " + info + ")"); ! } ! ! ! /** ! * Gets the attributeLines attribute of the View object ! * ! * @return The attributeLines value ! */ ! public Collection getAttributeLines() ! { ! Vector result = new Vector(); ! Iterator iterator = Sort.getChildrenByClass(iterator(), ViewLine.class); ! while (iterator.hasNext()) ! { ! ViewLine line = (ViewLine) iterator.next(); ! if (line.getType() == View.ATTRIBUTE_TYPE) ! { ! result.add(line); ! } ! } ! return result; ! } ! ! ! /** ! * Gets the attributeResults attribute of the View object ! * ! * @return The attributeResults value ! */ ! public Collection getAttributeResults() ! { ! Vector result = new Vector(); ! Iterator iterator = Sort.getChildrenByClass(iterator(), ResultLine.class); ! while (iterator.hasNext()) ! { ! ResultLine line = (ResultLine) iterator.next(); ! if (line.getType() == View.ATTRIBUTE_TYPE) ! { ! result.add(line); ! } ! } ! return result; ! } ! ! ! /** ! * Gets the displayName attribute of the View object ! * ! * @return The displayName value ! */ ! public String getDisplayName() ! { ! return this.displayName; ! } ! ! ! /** ! * Gets the name attribute of the View object ! * ! * @return The name value ! */ ! public String getName() ! { ! return this.name; ! } ! ! ! /** ! * Gets the operationLines attribute of the View object ! * ! * @return The operationLines value ! */ ! public Collection getOperationLines() ! { ! Vector result = new Vector(); ! Iterator iterator = Sort.getChildrenByClass(iterator(), ViewLine.class); ! while (iterator.hasNext()) ! { ! ViewLine line = (ViewLine) iterator.next(); ! if (line.getType() == View.OPERATION_TYPE) ! { ! result.add(line); ! } ! } ! return result; ! } ! ! ! /** ! * Gets the operationResults attribute of the View object ! * ! * @return The operationResults value ! */ ! public Collection getOperationResults() ! { ! Vector result = new Vector(); ! Iterator iterator = Sort.getChildrenByClass(iterator(), ResultLine.class); ! while (iterator.hasNext()) ! { ! ResultLine line = (ResultLine) iterator.next(); ! if (line.getType() == View.OPERATION_TYPE) ! { ! result.add(line); ! } ! } ! return result; ! } ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Return Value ! */ ! public Iterator iterator() ! { ! return Sort.sortByName(super.iterator()); ! } ! ! ! ! /** ! * Sets the displayName attribute of the View object ! * ! * @param displayName The new displayName value ! */ ! public void setDisplayName(String displayName) ! { ! this.displayName = displayName; ! } ! ! ! /** ! * Sets the name attribute of the View object ! * ! * @param name The new name value ! */ ! public void setName(String name) ! { ! this.name = name; ! } ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Return Value ! */ ! public String toString() ! { ! return this.displayName; ! } ! } Index: ViewLine.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/mbean/ViewLine.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ViewLine.java 24 Feb 2003 22:02:44 -0000 1.2 --- ViewLine.java 27 Nov 2003 01:13:06 -0000 1.3 *************** *** 1,111 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.mbean; ! ! import java.beans.beancontext.BeanContextSupport; ! ! import javax.management.ObjectName; ! ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public class ViewLine extends BeanContextSupport ! { ! /** Description of the Field */ ! protected String name = "<undefined>"; ! /** Description of the Field */ ! protected ObjectName objectName = null; ! /** Description of the Field */ ! protected int type = -1; ! ! ! /** Constructor */ ! public ViewLine() { } ! ! ! /** ! * Gets the name attribute of the ViewLine object ! * ! * @return The name value ! */ ! public String getName() ! { ! return this.name; ! } ! ! ! /** ! * Gets the objectName attribute of the ViewLine object ! * ! * @return The objectName value ! */ ! public ObjectName getObjectName() ! { ! return this.objectName; ! } ! ! ! /** ! * Gets the type attribute of the ViewLine object ! * ! * @return The type value ! */ ! public int getType() ! { ! return this.type; ! } ! ! ! /** ! * Sets the name attribute of the ViewLine object ! * ! * @param name The new name value ! */ ! public void setName(String name) ! { ! this.name = name; ! } ! ! ! /** ! * Sets the objectName attribute of the ViewLine object ! * ! * @param objectName The new objectName value ! */ ! public void setObjectName(ObjectName objectName) ! { ! this.objectName = objectName; ! } ! ! ! /** ! * Sets the type attribute of the ViewLine object ! * ! * @param type The new type value ! */ ! public void setType(int type) ! { ! this.type = type; ! } ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Return Value ! */ ! public String toString() ! { ! return (this.objectName != null) ? (this.objectName.getCanonicalName()) : ("<undefined>"); ! } ! } --- 1,111 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.mbean; ! ! import java.beans.beancontext.BeanContextSupport; ! ! import javax.management.ObjectName; ! ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 13 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public class ViewLine extends BeanContextSupport ! { ! /** Description of the Field */ ! protected String name = "<undefined>"; ! /** Description of the Field */ ! protected ObjectName objectName = null; ! /** Description of the Field */ ! protected int type = -1; ! ! ! /** Constructor */ ! public ViewLine() { } ! ! ! /** ! * Gets the name attribute of the ViewLine object ! * ! * @return The name value ! */ ! public String getName() ! { ! return this.name; ! } ! ! ! /** ! * Gets the objectName attribute of the ViewLine object ! * ! * @return The objectName value ! */ ! public ObjectName getObjectName() ! { ! return this.objectName; ! } ! ! ! /** ! * Gets the type attribute of the ViewLine object ! * ! * @return The type value ! */ ! public int getType() ! { ! return this.type; ! } ! ! ! /** ! * Sets the name attribute of the ViewLine object ! * ! * @param name The new name value ! */ ! public void setName(String name) ! { ! this.name = name; ! } ! ! ! /** ! * Sets the objectName attribute of the ViewLine object ! * ! * @param objectName The new objectName value ! */ ! public void setObjectName(ObjectName objectName) ! { ! this.objectName = objectName; ! } ! ! ! /** ! * Sets the type attribute of the ViewLine object ! * ! * @param type The new type value ! */ ! public void setType(int type) ! { ! this.type = type; ! } ! ! ! /** ! * Description of the Method ! * ! * @return Description of the Return Value ! */ ! public String toString() ! { ! return (this.objectName != null) ? (this.objectName.getCanonicalName()) : ("<undefined>"); ! } ! } |
From: <let...@us...> - 2003-11-27 01:13:40
|
Update of /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/dialog In directory sc8-pr-cvs1:/tmp/cvs-serv13614/jmx.browser/src/main/org/ejtools/jmx/browser/dialog Modified Files: CreateMBeanDialog.java Log Message: Address Bug #775745 Address Todo #800902 Address Todo #755528 Remove @created tags Add support for MXJ4 2.0.0 (still beta) Add support for JXM Remoting through RMI Index: CreateMBeanDialog.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/dialog/CreateMBeanDialog.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CreateMBeanDialog.java 24 Feb 2003 22:02:46 -0000 1.2 --- CreateMBeanDialog.java 27 Nov 2003 01:13:06 -0000 1.3 *************** *** 1,218 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.dialog; ! ! import java.awt.Component; ! import java.awt.GridBagConstraints; ! import java.awt.GridBagLayout; ! import java.awt.GridLayout; ! import java.awt.Insets; ! import java.awt.event.ActionEvent; ! import java.awt.event.ActionListener; ! import java.util.ResourceBundle; ! ! import javax.swing.JButton; ! import javax.swing.JComboBox; ! import javax.swing.JDialog; ! import javax.swing.JLabel; ! import javax.swing.JPanel; ! import javax.swing.JTextField; ! ! /** ! * @author letiemble ! * @created 11 décembre 2002 ! * @version $Revision$ ! */ ! public class CreateMBeanDialog extends JDialog ! { ! /** Description of the Field */ ! protected JTextField argTypes; ! /** Description of the Field */ ! protected JTextField argValues; ! /** Description of the Field */ ! protected JTextField classLoader; ! /** Description of the Field */ ! protected JComboBox classes; ! /** Description of the Field */ ! protected JComboBox domains; ! /** Description of the Field */ ! protected Object objectName = null; ! /** Description of the Field */ ! private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.jmx.browser.Resources"); ! ! ! /** ! *Constructor for the CustomJOptionPane object ! * ! * @param parentComponent Description of the Parameter ! * @param domainValues Description of the Parameter ! * @param classValues Description of the Parameter ! */ ! public CreateMBeanDialog(Component parentComponent, Object[] domainValues, Object[] classValues) ! { ! super(); ! this.setModal(true); ! this.setTitle(resources.getString("create.dialog.title")); ! ! JPanel main = new JPanel(new GridBagLayout()); ! GridBagConstraints constraints = new GridBagConstraints(); ! constraints.insets = new Insets(5, 5, 5, 5); ! ! constraints.gridwidth = GridBagConstraints.REMAINDER; ! constraints.weightx = 1.0; ! constraints.fill = GridBagConstraints.HORIZONTAL; ! constraints.anchor = GridBagConstraints.WEST; ! ! JLabel label = new JLabel(resources.getString("create.dialog.text.description")); ! main.add(label, constraints); ! ! constraints.gridwidth = GridBagConstraints.RELATIVE; ! constraints.weightx = 0.0; ! label = new JLabel(resources.getString("create.dialog.text.objectName") + " : ", JLabel.RIGHT); ! main.add(label, constraints); ! ! constraints.gridwidth = GridBagConstraints.REMAINDER; ! constraints.weightx = 1.0; ! this.domains = new JComboBox(domainValues); ! this.domains.setEditable(true); ! main.add(this.domains, constraints); ! ! constraints.gridwidth = GridBagConstraints.RELATIVE; ! constraints.weightx = 0.0; ! label = new JLabel(resources.getString("create.dialog.text.className") + " : ", JLabel.RIGHT); ! main.add(label, constraints); ! ! constraints.gridwidth = GridBagConstraints.REMAINDER; ! constraints.weightx = 1.0; ! this.classes = new JComboBox(classValues); ! this.classes.setEditable(true); ! main.add(this.classes, constraints); ! ! constraints.gridwidth = GridBagConstraints.RELATIVE; ! constraints.weightx = 0.0; ! label = new JLabel(resources.getString("create.dialog.text.classLoader") + " : ", JLabel.RIGHT); ! main.add(label, constraints); ! ! constraints.gridwidth = GridBagConstraints.REMAINDER; ! constraints.weightx = 1.0; ! this.classLoader = new JTextField(30); ! main.add(this.classLoader, constraints); ! ! constraints.gridwidth = GridBagConstraints.RELATIVE; ! constraints.weightx = 0.0; ! label = new JLabel(resources.getString("create.dialog.text.argValues") + " : ", JLabel.RIGHT); ! main.add(label, constraints); ! ! constraints.gridwidth = GridBagConstraints.REMAINDER; ! constraints.weightx = 1.0; ! this.argValues = new JTextField(30); ! main.add(this.argValues, constraints); ! ! constraints.gridwidth = GridBagConstraints.RELATIVE; ! constraints.weightx = 0.0; ! label = new JLabel(resources.getString("create.dialog.text.argTypes") + " : ", JLabel.RIGHT); ! main.add(label, constraints); ! ! constraints.gridwidth = GridBagConstraints.REMAINDER; ! constraints.weightx = 1.0; ! this.argTypes = new JTextField(30); ! main.add(this.argTypes, constraints); ! ! JPanel buttons = new JPanel(new GridLayout(1, 2, 2, 2)); ! ! JButton buttonSelect = new JButton(resources.getString("create.dialog.button.create")); ! buttons.add(buttonSelect); ! buttonSelect.addActionListener( ! new ActionListener() ! { ! public void actionPerformed(ActionEvent e) ! { ! objectName = domains.getEditor().getItem(); ! CreateMBeanDialog.this.dispose(); ! } ! }); ! ! JButton buttonCancel = new JButton(resources.getString("create.dialog.button.cancel")); ! buttons.add(buttonCancel); ! buttonCancel.addActionListener( ! new ActionListener() ! { ! /** ! * @param e Description of the Parameter ! */ ! public void actionPerformed(ActionEvent e) ! { ! objectName = null; ! CreateMBeanDialog.this.dispose(); ! } ! }); ! ! constraints.fill = GridBagConstraints.NONE; ! constraints.anchor = GridBagConstraints.SOUTH; ! main.add(buttons, constraints); ! ! this.setDefaultCloseOperation(DISPOSE_ON_CLOSE); ! this.getContentPane().add(main); ! this.pack(); ! this.setLocationRelativeTo(parentComponent); ! } ! ! ! /** ! * Gets the classLoader attribute of the CreateMBeanDialog object ! * ! * @return The classLoader value ! */ ! public String getClassLoader() ! { ! return this.classLoader.getText(); ! } ! ! ! /** ! * Returns the objectClass. ! * ! * @return Object ! */ ! public String getObjectClass() ! { ! return this.classes.getEditor().getItem().toString(); ! } ! ! ! /** ! * Returns the objectName. ! * ! * @return Object ! */ ! public Object getObjectName() ! { ! return this.objectName; ! } ! ! ! /** ! * Gets the parameters attribute of the CreateMBeanDialog object ! * ! * @return The parameters value ! */ ! public String getParameters() ! { ! return this.argValues.getText(); ! } ! ! ! /** ! * Gets the signature attribute of the CreateMBeanDialog object ! * ! * @return The signature value ! */ ! public String getSignature() ! { ! return this.argTypes.getText(); ! } ! } --- 1,219 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.dialog; ! ! import java.awt.Component; ! import java.awt.GridBagConstraints; ! import java.awt.GridBagLayout; ! import java.awt.GridLayout; ! import java.awt.Insets; ! import java.awt.event.ActionEvent; ! import java.awt.event.ActionListener; ! import java.util.ResourceBundle; ! ! import javax.swing.JButton; ! import javax.swing.JComboBox; ! import javax.swing.JDialog; ! import javax.swing.JLabel; ! import javax.swing.JPanel; ! import javax.swing.JTextField; ! import javax.swing.SwingConstants; ! ! /** ! * @author letiemble ! * @created 11 d?cembre 2002 ! * @version $Revision$ ! */ ! public class CreateMBeanDialog extends JDialog ! { ! /** Description of the Field */ ! protected JTextField argTypes; ! /** Description of the Field */ ! protected JTextField argValues; ! /** Description of the Field */ ! protected JTextField classLoader; ! /** Description of the Field */ ! protected JComboBox classes; ! /** Description of the Field */ ! protected JComboBox domains; ! /** Description of the Field */ ! protected Object objectName = null; ! /** Description of the Field */ ! private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.jmx.browser.Resources"); ! ! ! /** ! *Constructor for the CustomJOptionPane object ! * ! * @param parentComponent Description of the Parameter ! * @param domainValues Description of the Parameter ! * @param classValues Description of the Parameter ! */ ! public CreateMBeanDialog(Component parentComponent, Object[] domainValues, Object[] classValues) ! { ! super(); ! this.setModal(true); ! this.setTitle(resources.getString("create.dialog.title")); ! ! JPanel main = new JPanel(new GridBagLayout()); ! GridBagConstraints constraints = new GridBagConstraints(); ! constraints.insets = new Insets(5, 5, 5, 5); ! ! constraints.gridwidth = GridBagConstraints.REMAINDER; ! constraints.weightx = 1.0; ! constraints.fill = GridBagConstraints.HORIZONTAL; ! constraints.anchor = GridBagConstraints.WEST; ! ! JLabel label = new JLabel(resources.getString("create.dialog.text.description")); ! main.add(label, constraints); ! ! constraints.gridwidth = GridBagConstraints.RELATIVE; ! constraints.weightx = 0.0; ! label = new JLabel(resources.getString("create.dialog.text.objectName") + " : ", SwingConstants.RIGHT); ! main.add(label, constraints); ! ! constraints.gridwidth = GridBagConstraints.REMAINDER; ! constraints.weightx = 1.0; ! this.domains = new JComboBox(domainValues); ! this.domains.setEditable(true); ! main.add(this.domains, constraints); ! ! constraints.gridwidth = GridBagConstraints.RELATIVE; ! constraints.weightx = 0.0; ! label = new JLabel(resources.getString("create.dialog.text.className") + " : ", SwingConstants.RIGHT); ! main.add(label, constraints); ! ! constraints.gridwidth = GridBagConstraints.REMAINDER; ! constraints.weightx = 1.0; ! this.classes = new JComboBox(classValues); ! this.classes.setEditable(true); ! main.add(this.classes, constraints); ! ! constraints.gridwidth = GridBagConstraints.RELATIVE; ! constraints.weightx = 0.0; ! label = new JLabel(resources.getString("create.dialog.text.classLoader") + " : ", SwingConstants.RIGHT); ! main.add(label, constraints); ! ! constraints.gridwidth = GridBagConstraints.REMAINDER; ! constraints.weightx = 1.0; ! this.classLoader = new JTextField(30); ! main.add(this.classLoader, constraints); ! ! constraints.gridwidth = GridBagConstraints.RELATIVE; ! constraints.weightx = 0.0; ! label = new JLabel(resources.getString("create.dialog.text.argValues") + " : ", SwingConstants.RIGHT); ! main.add(label, constraints); ! ! constraints.gridwidth = GridBagConstraints.REMAINDER; ! constraints.weightx = 1.0; ! this.argValues = new JTextField(30); ! main.add(this.argValues, constraints); ! ! constraints.gridwidth = GridBagConstraints.RELATIVE; ! constraints.weightx = 0.0; ! label = new JLabel(resources.getString("create.dialog.text.argTypes") + " : ", SwingConstants.RIGHT); ! main.add(label, constraints); ! ! constraints.gridwidth = GridBagConstraints.REMAINDER; ! constraints.weightx = 1.0; ! this.argTypes = new JTextField(30); ! main.add(this.argTypes, constraints); ! ! JPanel buttons = new JPanel(new GridLayout(1, 2, 2, 2)); ! ! JButton buttonSelect = new JButton(resources.getString("create.dialog.button.create")); ! buttons.add(buttonSelect); ! buttonSelect.addActionListener( ! new ActionListener() ! { ! public void actionPerformed(ActionEvent e) ! { ! objectName = domains.getEditor().getItem(); ! CreateMBeanDialog.this.dispose(); ! } ! }); ! ! JButton buttonCancel = new JButton(resources.getString("create.dialog.button.cancel")); ! buttons.add(buttonCancel); ! buttonCancel.addActionListener( ! new ActionListener() ! { ! /** ! * @param e Description of the Parameter ! */ ! public void actionPerformed(ActionEvent e) ! { ! objectName = null; ! CreateMBeanDialog.this.dispose(); ! } ! }); ! ! constraints.fill = GridBagConstraints.NONE; ! constraints.anchor = GridBagConstraints.SOUTH; ! main.add(buttons, constraints); ! ! this.setDefaultCloseOperation(DISPOSE_ON_CLOSE); ! this.getContentPane().add(main); ! this.pack(); ! this.setLocationRelativeTo(parentComponent); ! } ! ! ! /** ! * Gets the classLoader attribute of the CreateMBeanDialog object ! * ! * @return The classLoader value ! */ ! public String getClassLoader() ! { ! return this.classLoader.getText(); ! } ! ! ! /** ! * Returns the objectClass. ! * ! * @return Object ! */ ! public String getObjectClass() ! { ! return this.classes.getEditor().getItem().toString(); ! } ! ! ! /** ! * Returns the objectName. ! * ! * @return Object ! */ ! public Object getObjectName() ! { ! return this.objectName; ! } ! ! ! /** ! * Gets the parameters attribute of the CreateMBeanDialog object ! * ! * @return The parameters value ! */ ! public String getParameters() ! { ! return this.argValues.getText(); ! } ! ! ! /** ! * Gets the signature attribute of the CreateMBeanDialog object ! * ! * @return The signature value ! */ ! public String getSignature() ! { ! return this.argTypes.getText(); ! } ! } |
From: <let...@us...> - 2003-11-27 01:13:40
|
Update of /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/model In directory sc8-pr-cvs1:/tmp/cvs-serv13614/jmx.browser/src/main/org/ejtools/jmx/browser/model Modified Files: Node.java Resource.java Server.java Log Message: Address Bug #775745 Address Todo #800902 Address Todo #755528 Remove @created tags Add support for MXJ4 2.0.0 (still beta) Add support for JXM Remoting through RMI Index: Node.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/model/Node.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Node.java 10 Feb 2003 20:49:26 -0000 1.1 --- Node.java 27 Nov 2003 01:13:07 -0000 1.2 *************** *** 40,44 **** } - /** * Getter for the className attribute --- 40,43 ---- Index: Resource.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/model/Resource.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Resource.java 1 Apr 2003 21:53:10 -0000 1.5 --- Resource.java 27 Nov 2003 01:13:07 -0000 1.6 *************** *** 26,29 **** --- 26,30 ---- import org.ejtools.adwt.service.ConsoleService; import org.ejtools.graph.service.GraphConsumer; + import org.ejtools.graph.service.GraphConsumerMediator; import org.ejtools.graph.service.GraphProducer; import org.ejtools.graph.service.GraphService; *************** *** 39,44 **** * * @author letiemble - * @created 13 décembre 2001 * @version $Revision$ * @todo Javadoc to complete * @javabean:class displayName="JMX ManagedObject" --- 40,45 ---- * * @author letiemble * @version $Revision$ + * @created 13 d?cembre 2001 * @todo Javadoc to complete * @javabean:class displayName="JMX ManagedObject" *************** *** 72,76 **** * expert="true" */ ! public class Resource extends Node implements MBeanAccessor { /** Description of the Field */ --- 73,77 ---- * expert="true" */ ! public class Resource extends Node implements MBeanAccessor, GraphConsumerMediator { /** Description of the Field */ *************** *** 230,233 **** --- 231,245 ---- /** + * Gets the graphProducers attribute of the Resource object + * + * @return The graphProducers value + */ + public Hashtable getGraphProducers() + { + return this.graphProducers; + } + + + /** * Gets the mBeanInfo attribute of the ManagedObject object * *************** *** 449,472 **** public void log(Throwable t) { ! BeanContextServices context = (BeanContextServices) getBeanContext(); ! ! if (context.hasService(ConsoleService.class)) ! { ! try ! { ! ConsoleService service = (ConsoleService) context.getService(this, this, ConsoleService.class, this, this); ! StringWriter w = new StringWriter(); ! PrintWriter pw = new PrintWriter(w); ! t.printStackTrace(pw); ! pw.close(); ! this.log("Exception occured :"); ! this.log(w.toString()); ! context.releaseService(this, this, ConsoleService.class); ! } ! catch (Exception e) ! { ! logger.error("Error while logging", e); ! } ! } } --- 461,470 ---- public void log(Throwable t) { ! StringWriter w = new StringWriter(); ! PrintWriter pw = new PrintWriter(w); ! t.printStackTrace(pw); ! pw.close(); ! this.log("Exception occured :"); ! this.log(w.toString()); } *************** *** 630,633 **** --- 628,632 ---- { ConnectionService service = (ConnectionService) context.getService(this, this, ConnectionService.class, this, this); + logger.debug("setAttribute(" + objectName + "," + attribute + ")"); service.getMBeanServer().setAttribute(objectName, attribute); context.releaseService(this, this, ConnectionService.class); Index: Server.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/model/Server.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Server.java 1 Apr 2003 21:53:10 -0000 1.6 --- Server.java 27 Nov 2003 01:13:07 -0000 1.7 *************** *** 24,27 **** --- 24,28 ---- import org.ejtools.jmx.browser.model.service.ConnectionService; import org.ejtools.util.service.Profile; + import org.ejtools.util.service.ProfileHolder; /** *************** *** 29,33 **** * * @author letiemble - * @created 13 décembre 2001 * @version $Revision$ * @todo Javadoc to complete --- 30,33 ---- *************** *** 72,77 **** * displayName="Credentials" * shortDescription="Credentials to connect" */ ! public class Server extends Node { /** Description of the Field */ --- 72,81 ---- * displayName="Credentials" * shortDescription="Credentials to connect" + * @javabean:property name="service" + * class="java.lang.String" + * displayName="Service URL" + * shortDescription="JMX Remoting Service URL beginning with 'service:jmx:'" */ ! public class Server extends Node implements ProfileHolder { /** Description of the Field */ *************** *** 98,102 **** * Description of the Method * - * @todo Use queryMBeans instance method instead direct call to service * @javabean:method name="connect" * displayName="Connect" --- 102,105 ---- *************** *** 291,294 **** --- 294,301 ---- } + public String getService() + { + return this.profile.getProperty(ConnectionMetaData.SERVICE); + } /** *************** *** 326,329 **** --- 333,362 ---- /** + * Gets the connected attribute of the Server object + * + * @return The connected value + */ + public boolean isConnected() + { + BeanContextServices context = (BeanContextServices) getBeanContext(); + boolean result = false; + if (context.hasService(ConnectionService.class)) + { + try + { + ConnectionService service = (ConnectionService) context.getService(this, this, ConnectionService.class, this, this); + result = service.isConnected(); + context.releaseService(this, this, ConnectionService.class); + } + catch (Exception e) + { + logger.error("Error during utilisation of service ConnectionService", e); + } + } + return result; + } + + + /** * Description of the Method * *************** *** 502,506 **** public void setFactory(String factory) { ! this.profile.setProperty(ConnectionMetaData.FACTORY, factory); } --- 535,544 ---- public void setFactory(String factory) { ! this.profile.setProperty(ConnectionMetaData.FACTORY, factory); ! } ! ! public void setService(String service) ! { ! this.profile.setProperty(ConnectionMetaData.SERVICE, service); } |
From: <let...@us...> - 2003-11-27 01:13:40
|
Update of /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser In directory sc8-pr-cvs1:/tmp/cvs-serv13614/jmx.browser/src/main/org/ejtools/jmx/browser Modified Files: AboutDialog.java Browser.java Main.java Log Message: Address Bug #775745 Address Todo #800902 Address Todo #755528 Remove @created tags Add support for MXJ4 2.0.0 (still beta) Add support for JXM Remoting through RMI Index: AboutDialog.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/AboutDialog.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AboutDialog.java 24 Feb 2003 22:02:45 -0000 1.2 --- AboutDialog.java 27 Nov 2003 01:13:06 -0000 1.3 *************** *** 16,19 **** --- 16,21 ---- import javax.swing.JLabel; import javax.swing.JPanel; + import javax.swing.SwingConstants; + import javax.swing.UIManager; import org.ejtools.adwt.service.AboutService; *************** *** 74,80 **** this.panel = new JPanel(new BorderLayout()); - String display = null; - JLabel label = null; - // North part of the panel this.panel.add("North", new JLabel(new ImageIcon(getClass().getResource("/images/logo.png")))); --- 76,79 ---- *************** *** 84,104 **** // South part of the panel ! JPanel info = new JPanel(new GridLayout(2, 1)); JLabel java = new JLabel( ! resources.getString("about.dialog.text.javaVersion") ! + " : " ! + System.getProperty("java.version"), JLabel.CENTER); java.setForeground(Color.black); info.add(java); JLabel vm = new JLabel( ! resources.getString("about.dialog.text.virtualMachine") ! + " : " ! + System.getProperty("java.vm.name") ! + ", " ! + System.getProperty("java.vm.version"), JLabel.CENTER); vm.setForeground(Color.black); info.add(vm); this.panel.add("South", info); } } - --- 83,111 ---- // South part of the panel ! JPanel info = new JPanel(new GridLayout(3, 1)); ! JLabel java = new JLabel( ! resources.getString("about.dialog.text.javaVersion") ! + " : " ! + System.getProperty("java.version"), SwingConstants.LEADING); java.setForeground(Color.black); info.add(java); + JLabel vm = new JLabel( ! resources.getString("about.dialog.text.virtualMachine") ! + " : " ! + System.getProperty("java.vm.name") ! + ", " ! + System.getProperty("java.vm.version"), SwingConstants.LEADING); vm.setForeground(Color.black); info.add(vm); + + JLabel laf = new JLabel( + resources.getString("about.dialog.text.lookAndFeel") + + " : " + + UIManager.getLookAndFeel().getName(), SwingConstants.LEADING); + vm.setForeground(Color.black); + info.add(laf); this.panel.add("South", info); } } Index: Browser.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/Browser.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Browser.java 24 Feb 2003 22:02:45 -0000 1.1 --- Browser.java 27 Nov 2003 01:13:06 -0000 1.2 *************** *** 9,24 **** --- 9,33 ---- import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; + import java.net.URL; import java.util.Arrays; import java.util.List; import java.util.ResourceBundle; + import javax.swing.JFileChooser; import javax.swing.JOptionPane; import org.apache.log4j.Logger; + import org.ejtools.adwt.FileUtil; + import org.ejtools.adwt.LookAndFeelUtil; import org.ejtools.adwt.action.Command; import org.ejtools.adwt.action.file.ExitAction; import org.ejtools.adwt.action.file.NewAction; + import org.ejtools.adwt.action.file.OpenWorkspaceAction; + import org.ejtools.adwt.action.file.SaveAsWorkspaceAction; + import org.ejtools.adwt.action.file.SaveWorkspaceAction; import org.ejtools.adwt.service.AboutServiceProvider; import org.ejtools.adwt.service.ConsoleServiceProvider; + import org.ejtools.adwt.service.HistoryService; + import org.ejtools.adwt.service.HistoryServiceProvider; import org.ejtools.adwt.service.MDIFrameServiceProvider; import org.ejtools.adwt.service.MenuBarServiceProvider; *************** *** 27,31 **** --- 36,42 ---- import org.ejtools.graph.service.GraphServiceProvider; import org.ejtools.jmx.browser.frame.ServerInternalFrame; + import org.ejtools.jmx.browser.model.Server; import org.ejtools.jmx.browser.model.service.ConnectionMetaData; + import org.ejtools.jmx.browser.state.WorkbenchState; import org.ejtools.util.service.Profile; import org.ejtools.util.service.ProfileServiceProvider; *************** *** 35,59 **** * * @author Laurent Etiemble - * @created 21 mars 2002 * @version $Revision$ * @todo Javadoc to complete */ ! public class Browser extends CustomBeanContextServicesSupport { - /** Description of the Field */ protected AboutServiceProvider aboutService; - /** Description of the Field */ protected ConsoleServiceProvider consoleService; - /** Description of the Field */ protected ProfileServiceProvider factoryProvider; - /** Description of the Field */ protected MDIFrameServiceProvider frameService; - /** Description of the Field */ protected GraphServiceProvider graphService; ! /** Description of the Field */ protected MenuBarServiceProvider menuBarService; ! /** Description of the Field */ protected ToolBarServiceProvider toolBarService; ! /** Description of the Field */ private static Logger logger = Logger.getLogger(Browser.class); /** Bundle for I18N */ --- 46,65 ---- * * @author Laurent Etiemble * @version $Revision$ + * @created 21 mars 2002 * @todo Javadoc to complete */ ! public class Browser extends CustomBeanContextServicesSupport implements HistoryService.Holder { protected AboutServiceProvider aboutService; protected ConsoleServiceProvider consoleService; protected ProfileServiceProvider factoryProvider; protected MDIFrameServiceProvider frameService; protected GraphServiceProvider graphService; ! protected HistoryServiceProvider historyService; protected MenuBarServiceProvider menuBarService; ! protected WorkbenchState stateManager; protected ToolBarServiceProvider toolBarService; ! /** Default logger */ private static Logger logger = Logger.getLogger(Browser.class); /** Bundle for I18N */ *************** *** 61,69 **** ! /** Constructor for the EJX object */ public Browser() { logger.debug("JMX Browser starting..."); this.frameService = new MDIFrameServiceProvider(); this.aboutService = new AboutServiceProvider(new AboutDialog()); --- 67,84 ---- ! /**Constructor for the Browser object */ public Browser() { logger.debug("JMX Browser starting..."); + // Search for custom Look and Feel + LookAndFeelUtil.setLookAndFeel(); + + // Set the hyperlink navigation for ObjectName + if (System.getProperty("ejtools.objectname.hyperlink") == null) + { + System.setProperty("ejtools.objectname.hyperlink", "true"); + } + this.frameService = new MDIFrameServiceProvider(); this.aboutService = new AboutServiceProvider(new AboutDialog()); *************** *** 73,76 **** --- 88,93 ---- this.consoleService = new ConsoleServiceProvider(); this.graphService = new GraphServiceProvider(); + this.historyService = new HistoryServiceProvider(this, 4); + this.stateManager = new WorkbenchState(this); try *************** *** 85,103 **** { int idx = -1; ! Profile[] datas = ! Browser.this.factoryProvider.getProfiles(); List factories = Arrays.asList(datas); if (factories.size() > 1) { Object selectedValue = ! JOptionPane.showInputDialog( ! null, ! resources.getString("connection.dialog.text.description"), ! resources.getString("connection.dialog.title"), ! JOptionPane.QUESTION_MESSAGE, ! null, ! factories.toArray(), ! factories.get(0) ! ); if (selectedValue == null) --- 102,119 ---- { int idx = -1; ! Profile[] datas = Browser.this.factoryProvider.getProfiles(); List factories = Arrays.asList(datas); if (factories.size() > 1) { Object selectedValue = ! JOptionPane.showInputDialog( ! null, ! resources.getString("connection.dialog.text.description"), ! resources.getString("connection.dialog.title"), ! JOptionPane.QUESTION_MESSAGE, ! null, ! factories.toArray(), ! factories.get(0) ! ); if (selectedValue == null) *************** *** 115,126 **** if (idx >= 0) { ! Browser.this.add( ! new ServerInternalFrame(Browser.this.factoryProvider.getProfile(idx)) ! ); } } } ! )); this.add(this.consoleService); --- 131,219 ---- if (idx >= 0) { ! Profile profile = Browser.this.factoryProvider.getProfile(idx); ! ServerInternalFrame frame = new ServerInternalFrame(); ! frame.setProfile(profile); ! frame.setServer(new Server()); ! Browser.this.add(frame); } } } ! )); ! ! this.add(this.stateManager); ! ! this.add(new OpenWorkspaceAction( ! new Command() ! { ! public void execute() ! { ! try ! { ! URL selectedURL = FileUtil.selectWorkspaceFile(resources.getString("file.dialog.title.load"), JFileChooser.OPEN_DIALOG); ! if (selectedURL != null) ! { ! loadResource(selectedURL, null); ! } ! } ! catch (Exception e) ! { ! // JOptionPane.showMessageDialog(null, "Could not load file:" + e.getMessage(), "Error", JOptionPane.ERROR_MESSAGE); ! logger.error("Error while loading workspace", e); ! } ! } ! } ! )); ! ! this.add(new SaveWorkspaceAction( ! new Command() ! { ! public void execute() ! { ! try ! { ! if (Browser.this.stateManager.getWorkbenchURL() == null) ! { ! URL selectedURL = FileUtil.selectWorkspaceFile(resources.getString("file.dialog.title.save"), JFileChooser.SAVE_DIALOG); ! if (selectedURL != null) ! { ! Browser.this.stateManager.setWorkbenchURL(selectedURL); ! } ! } ! if (Browser.this.stateManager.getWorkbenchURL() != null) ! { ! Browser.this.stateManager.store(); ! } ! } ! catch (Exception e) ! { ! logger.error("Error while saving workspace", e); ! } ! } ! } ! )); + this.add(new SaveAsWorkspaceAction( + new Command() + { + public void execute() + { + try + { + URL selectedURL = FileUtil.selectWorkspaceFile(resources.getString("file.dialog.title.save"), JFileChooser.SAVE_DIALOG); + if (selectedURL != null) + { + Browser.this.stateManager.setWorkbenchURL(selectedURL); + Browser.this.stateManager.store(); + } + } + catch (Exception e) + { + logger.error("Error while saving workspace", e); + } + } + } + )); + + this.add(this.historyService); this.add(this.consoleService); *************** *** 133,140 **** } } ! )); this.add(this.frameService); this.add(this.aboutService); this.add(this.graphService); --- 226,234 ---- } } ! )); this.add(this.frameService); this.add(this.aboutService); + this.add(this.graphService); *************** *** 157,160 **** --- 251,268 ---- throw e; } + } + + + /** + * Description of the Method + * + * @param url Description of the Parameter + * @param context Description of the Parameter + */ + public void loadResource(URL url, Object context) + { + this.stateManager.setWorkbenchURL(url); + this.stateManager.load(); + this.historyService.push(url, context); } Index: Main.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/Main.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Main.java 24 Feb 2003 22:02:45 -0000 1.2 --- Main.java 27 Nov 2003 01:13:06 -0000 1.3 *************** *** 3,7 **** * * Distributable under LGPL license. ! * See terms of license at www.gnu.org. */ package org.ejtools.jmx.browser; --- 3,7 ---- * * Distributable under LGPL license. ! * See terms at http://opensource.org/licenses/lgpl-license.php */ package org.ejtools.jmx.browser; *************** *** 21,31 **** * Description of the Class * * @author Laurent Etiemble * @created 21 mars 2002 - * @version $Revision$ - * @todo Javadoc to complete */ ! public class Main ! { /** Description of the Field */ private static Logger logger = Logger.getLogger(Main.class); --- 21,29 ---- * Description of the Class * + * @version $Revision$ * @author Laurent Etiemble * @created 21 mars 2002 */ ! public class Main { /** Description of the Field */ private static Logger logger = Logger.getLogger(Main.class); *************** *** 39,44 **** */ public static void main(String[] args) ! throws Exception ! { logger.debug("========================================"); logger.debug("JAVA_HOME : " + System.getProperty("java.home")); --- 37,41 ---- */ public static void main(String[] args) ! throws Exception { logger.debug("========================================"); logger.debug("JAVA_HOME : " + System.getProperty("java.home")); *************** *** 60,67 **** pluginDir = new File("../lib"); plugins = pluginDir.listFiles(); ! if (plugins != null) ! { ! for (int i = 0; i < plugins.length; i++) ! { logger.debug("Found " + plugins[i].toURL()); list.add(plugins[i].toURL()); --- 57,62 ---- pluginDir = new File("../lib"); plugins = pluginDir.listFiles(); ! if (plugins != null) { ! for (int i = 0; i < plugins.length; i++) { logger.debug("Found " + plugins[i].toURL()); list.add(plugins[i].toURL()); *************** *** 73,80 **** pluginDir = new File("../lib/ext"); plugins = pluginDir.listFiles(); ! if (plugins != null) ! { ! for (int i = 0; i < plugins.length; i++) ! { logger.debug("Found " + plugins[i].toURL()); list.add(plugins[i].toURL()); --- 68,73 ---- pluginDir = new File("../lib/ext"); plugins = pluginDir.listFiles(); ! if (plugins != null) { ! for (int i = 0; i < plugins.length; i++) { logger.debug("Found " + plugins[i].toURL()); list.add(plugins[i].toURL()); *************** *** 91,96 **** // Custom security manager System.setSecurityManager( ! new SecurityManager() ! { public void checkPermission(Permission p) { } --- 84,88 ---- // Custom security manager System.setSecurityManager( ! new SecurityManager() { public void checkPermission(Permission p) { } *************** *** 102,110 **** logger.debug("Launching EJTools JMX Browser"); AccessController.doPrivileged( ! new PrivilegedExceptionAction() ! { public Object run() ! throws Exception ! { Beans.instantiate( Thread.currentThread().getContextClassLoader(), --- 94,100 ---- logger.debug("Launching EJTools JMX Browser"); AccessController.doPrivileged( ! new PrivilegedExceptionAction() { public Object run() ! throws Exception { Beans.instantiate( Thread.currentThread().getContextClassLoader(), |
From: <let...@us...> - 2003-11-27 01:13:39
|
Update of /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/action In directory sc8-pr-cvs1:/tmp/cvs-serv13614/jmx.browser/src/main/org/ejtools/jmx/browser/action Modified Files: CreateMBeanAction.java ShowNotificationsAction.java Log Message: Address Bug #775745 Address Todo #800902 Address Todo #755528 Remove @created tags Add support for MXJ4 2.0.0 (still beta) Add support for JXM Remoting through RMI Index: CreateMBeanAction.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/action/CreateMBeanAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CreateMBeanAction.java 24 Feb 2003 22:02:46 -0000 1.2 --- CreateMBeanAction.java 27 Nov 2003 01:13:06 -0000 1.3 *************** *** 1,42 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.action; ! ! import java.util.ResourceBundle; ! ! import org.ejtools.adwt.action.Command; ! import org.ejtools.adwt.action.CommandAction; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 29 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public class CreateMBeanAction extends CommandAction ! { ! /** Description of the Field */ ! private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.jmx.browser.Resources"); ! ! ! /** ! * Constructor for the CopyAction object ! * ! * @param command Description of Parameter ! */ ! public CreateMBeanAction(Command command) ! { ! super(command, resources, "action.action.create"); ! this.setMenu("action.action"); ! this.setToolBar(true); ! this.setSmallIcon("/toolbarButtonGraphics/development/EJBAdd16.gif"); ! this.setIcon("/toolbarButtonGraphics/development/EJBAdd24.gif"); ! } ! } ! --- 1,42 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.action; ! ! import java.util.ResourceBundle; ! ! import org.ejtools.adwt.action.Command; ! import org.ejtools.adwt.action.CommandAction; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 29 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public class CreateMBeanAction extends CommandAction ! { ! /** Description of the Field */ ! private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.jmx.browser.Resources"); ! ! ! /** ! * Constructor for the CopyAction object ! * ! * @param command Description of Parameter ! */ ! public CreateMBeanAction(Command command) ! { ! super(command, resources, "action.action.create"); ! this.setMenu("action.action"); ! this.setToolBar(true); ! this.setSmallIcon("/toolbarButtonGraphics/development/EJBAdd16.gif"); ! this.setIcon("/toolbarButtonGraphics/development/EJBAdd24.gif"); ! } ! } ! Index: ShowNotificationsAction.java =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/main/org/ejtools/jmx/browser/action/ShowNotificationsAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ShowNotificationsAction.java 24 Feb 2003 22:02:46 -0000 1.2 --- ShowNotificationsAction.java 27 Nov 2003 01:13:06 -0000 1.3 *************** *** 1,42 **** ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.action; ! ! import java.util.ResourceBundle; ! ! import org.ejtools.adwt.action.Command; ! import org.ejtools.adwt.action.CommandAction; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 29 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public class ShowNotificationsAction extends CommandAction ! { ! /** Description of the Field */ ! private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.jmx.browser.Resources"); ! ! ! /** ! * Constructor for the CopyAction object ! * ! * @param command Description of Parameter ! */ ! public ShowNotificationsAction(Command command) ! { ! super(command, resources, "action.view.notifications"); ! this.setMenu("action.view"); ! this.setToolBar(true); ! this.setSmallIcon("/toolbarButtonGraphics/general/History16.gif"); ! this.setIcon("/toolbarButtonGraphics/general/History24.gif"); ! } ! } ! --- 1,42 ---- ! /* ! * EJTools, the Enterprise Java Tools ! * ! * Distributable under LGPL license. ! * See terms of license at www.gnu.org. ! */ ! package org.ejtools.jmx.browser.action; ! ! import java.util.ResourceBundle; ! ! import org.ejtools.adwt.action.Command; ! import org.ejtools.adwt.action.CommandAction; ! ! /** ! * Description of the Class ! * ! * @author letiemble ! * @created 29 décembre 2001 ! * @version $Revision$ ! * @todo Javadoc to complete ! */ ! public class ShowNotificationsAction extends CommandAction ! { ! /** Description of the Field */ ! private static ResourceBundle resources = ResourceBundle.getBundle("org.ejtools.jmx.browser.Resources"); ! ! ! /** ! * Constructor for the CopyAction object ! * ! * @param command Description of Parameter ! */ ! public ShowNotificationsAction(Command command) ! { ! super(command, resources, "action.view.notifications"); ! this.setMenu("action.view"); ! this.setToolBar(true); ! this.setSmallIcon("/toolbarButtonGraphics/general/History16.gif"); ! this.setIcon("/toolbarButtonGraphics/general/History24.gif"); ! } ! } ! |
From: <let...@us...> - 2003-11-27 01:13:39
|
Update of /cvsroot/ejtools/applications/jmx.browser/src/etc In directory sc8-pr-cvs1:/tmp/cvs-serv13614/jmx.browser/src/etc Modified Files: run.mf Log Message: Address Bug #775745 Address Todo #800902 Address Todo #755528 Remove @created tags Add support for MXJ4 2.0.0 (still beta) Add support for JXM Remoting through RMI Index: run.mf =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/etc/run.mf,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** run.mf 10 Feb 2003 20:47:16 -0000 1.7 --- run.mf 27 Nov 2003 01:13:06 -0000 1.8 *************** *** 1,11 **** ! Main-Class: org.ejtools.jmx.browser.Main ! Class-Path: ../conf/ ../lib/log4j.jar ! ! Name: org/ejtools/jmx/browser/ ! Specification-Title: @module.display.name@ ! Specification-Version: @version.major@.@version.minor@.@version.revision@ ! Specification-Vendor: EJTools Project ! Implementation-Title: @module.display.name@ ! Implementation-Version: @version.major@.@version.minor@.@version.revision@ ! Implementation-Vendor: EJTools Project ! --- 1,11 ---- ! Main-Class: org.ejtools.jmx.browser.Main ! Class-Path: ../conf/ ../lib/log4j.jar ! ! Name: org/ejtools/jmx/browser/ ! Specification-Title: @module.display.name@ ! Specification-Version: @version.major@.@version.minor@.@version.revision@ ! Specification-Vendor: EJTools Project ! Implementation-Title: @module.display.name@ ! Implementation-Version: @version.major@.@version.minor@.@version.revision@ ! Implementation-Vendor: EJTools Project ! |
From: <let...@us...> - 2003-11-27 01:13:39
|
Update of /cvsroot/ejtools/applications/jmx.browser/src/bin In directory sc8-pr-cvs1:/tmp/cvs-serv13614/jmx.browser/src/bin Modified Files: run.bat run.sh Log Message: Address Bug #775745 Address Todo #800902 Address Todo #755528 Remove @created tags Add support for MXJ4 2.0.0 (still beta) Add support for JXM Remoting through RMI Index: run.bat =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/bin/run.bat,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** run.bat 18 Dec 2002 22:19:34 -0000 1.3 --- run.bat 27 Nov 2003 01:13:06 -0000 1.4 *************** *** 1,6 **** ! @echo off ! @if not "%ECHO%" == "" echo %ECHO% ! @if "%OS%" == "Windows_NT" setlocal ! ! java -jar run.jar ! --- 1,6 ---- ! @echo off ! @if not "%ECHO%" == "" echo %ECHO% ! @if "%OS%" == "Windows_NT" setlocal ! ! java -jar run.jar ! Index: run.sh =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/bin/run.sh,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** run.sh 18 Dec 2002 22:19:34 -0000 1.3 --- run.sh 27 Nov 2003 01:13:06 -0000 1.4 *************** *** 1,3 **** ! #!/bin/sh ! ! java -jar run.jar --- 1,3 ---- ! #!/bin/sh ! ! java -jar run.jar |
Update of /cvsroot/ejtools/applications/jmx.browser/src/conf In directory sc8-pr-cvs1:/tmp/cvs-serv13614/jmx.browser/src/conf Modified Files: README jmx.connection.properties log4j.properties Added Files: README_GERONIMO README_JONAS README_MX4J_1.1.1 README_MX4J_2.0.0 plaf.properties Log Message: Address Bug #775745 Address Todo #800902 Address Todo #755528 Remove @created tags Add support for MXJ4 2.0.0 (still beta) Add support for JXM Remoting through RMI --- NEW FILE: README_GERONIMO --- # ------------------------------------------------------------ # # EJTools, the Enterprise Java Tools # # Distributable under LGPL license. # See terms of license at www.gnu.org. # # Feedback and support at http://sourceforge.net/project/ejtools # # ------------------------------------------------------------ See the README for MX4J. --- NEW FILE: README_JONAS --- # ------------------------------------------------------------ # # EJTools, the Enterprise Java Tools # # Distributable under LGPL license. # See terms of license at www.gnu.org. # # Feedback and support at http://sourceforge.net/project/ejtools # # ------------------------------------------------------------ See the README for MX4J. --- NEW FILE: README_MX4J_1.1.1 --- # ------------------------------------------------------------ # # EJTools, the Enterprise Java Tools # # Distributable under LGPL license. # See terms of license at www.gnu.org. # # Feedback and support at http://sourceforge.net/project/ejtools # # ------------------------------------------------------------ To use the Swing based JMX Browser with MX4J 1.1.1, do as follow : - copy the mx4j.jar file of the MX4J distribution to the lib/ext folder of JMX Browser. - copy the mx4j-tools.jar of the MX4J distribution to the lib/ext folder of JMX Browser. That's it. --- NEW FILE: README_MX4J_2.0.0 --- # ------------------------------------------------------------ # # EJTools, the Enterprise Java Tools # # Distributable under LGPL license. # See terms of license at www.gnu.org. # # Feedback and support at http://sourceforge.net/project/ejtools # # ------------------------------------------------------------ To use the Swing based JMX Browser with MX4J 1.2 (JMX Remoting), do as follow : - copy the mx4j.jar file of the MX4J distribution to the lib/ext folder of JMX Browser. - copy the mx4j-remote.jar of the MX4J distribution to the lib/ext folder of JMX Browser. - copy the mx4j-tools.jar of the MX4J distribution to the lib/ext folder of JMX Browser. That's it. --- NEW FILE: plaf.properties --- # ------------------------------------------------------------ # # EJTools, the Enterprise Java Tools # # Distributable under LGPL license. # See terms of license at www.gnu.org. # # Feedback and support at http://sourceforge.net/project/ejtools # # ------------------------------------------------------------ # Set the class for Pluggable Look And Feel #plaf.class=your.look.and.feel.class.name Index: README =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/conf/README,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** README 8 Jan 2003 22:31:09 -0000 1.1 --- README 27 Nov 2003 01:13:06 -0000 1.2 *************** *** 10,12 **** # ------------------------------------------------------------ ! See application server specific README for detailed configuration. --- 10,12 ---- # ------------------------------------------------------------ ! See specific README for detailed configuration. Index: jmx.connection.properties =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/conf/jmx.connection.properties,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** jmx.connection.properties 10 Mar 2003 22:13:11 -0000 1.2 --- jmx.connection.properties 27 Nov 2003 01:13:06 -0000 1.3 *************** *** 10,14 **** # ------------------------------------------------------------ ! connection.10.name=JBoss 3.x (RMI) connection.10.classname=org.ejtools.jmx.browser.model.connector.JBoss30RMIConnectionService connection.10.factory=org.jnp.interfaces.NamingContextFactory --- 10,17 ---- # ------------------------------------------------------------ ! # ! # JBoss connectivity ! # ! connection.10.name=JBoss 3.x.x (RMI) connection.10.classname=org.ejtools.jmx.browser.model.connector.JBoss30RMIConnectionService connection.10.factory=org.jnp.interfaces.NamingContextFactory *************** *** 18,23 **** --- 21,30 ---- connection.10.principal= connection.10.credentials= + connection.10.service= + # + # Weblogic connectivity + # connection.20.name=WebLogic 7.x connection.20.classname=org.ejtools.jmx.browser.model.connector.WebLogic70ConnectionService *************** *** 28,33 **** --- 35,44 ---- connection.20.principal= connection.20.credentials= + connection.20.service= + # + # MX4J connectivity + # connection.30.name=MX4J 1.1.1 (IIOP) connection.30.classname=org.ejtools.jmx.browser.model.connector.MX4J111IIOPConnectionService *************** *** 38,41 **** --- 49,53 ---- connection.30.principal= connection.30.credentials= + connection.30.service= connection.31.name=MX4J 1.1.1 (JRMP) *************** *** 47,52 **** --- 59,97 ---- connection.31.principal= connection.31.credentials= + connection.31.service= + connection.32.name=MX4J 2.0.0 (JMX Remoting) + connection.32.classname=org.ejtools.jmx.browser.model.connector.RemotingConnectionService + connection.32.factory=com.sun.jndi.rmi.registry.RegistryContextFactory + connection.32.packages= + connection.32.context= + connection.32.url=rmi://localhost:1099 + connection.32.principal= + connection.32.credentials= + connection.32.service=service:jmx:rmi://localhost/jndi/jmx + connection.33.name=MX4J 2.0.0 (IIOP) + connection.33.classname=org.ejtools.jmx.browser.model.connector.MX4J12IIOPConnectionService + connection.33.factory=com.sun.jndi.cosnaming.CNCtxFactory + connection.33.packages=com.sun.jndi.cosnaming + connection.33.context=iiop + connection.33.url=iiop://localhost:900 + connection.33.principal= + connection.33.credentials= + connection.33.service= + + connection.34.name=MX4J 2.0.0 (JRMP) + connection.34.classname=org.ejtools.jmx.browser.model.connector.MX4J12JRMPConnectionService + connection.34.factory=com.sun.jndi.rmi.registry.RegistryContextFactory + connection.34.packages=com.sun.jndi.rmi.registry + connection.34.context=jrmp + connection.34.url=rmi://localhost:1099 + connection.34.principal= + connection.34.credentials= + connection.34.service= + + + # + # TMX4J connectivity # Stand by : no need for the moment # *************** *** 61,64 **** --- 106,111 ---- + # + # Pramati connectivity # Stand by : no need for the moment # Index: log4j.properties =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/conf/log4j.properties,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** log4j.properties 10 Jan 2003 21:26:04 -0000 1.5 --- log4j.properties 27 Nov 2003 01:13:06 -0000 1.6 *************** *** 1,26 **** ! # ------------------------------------------------------------ ! # ! # EJTools, the Enterprise Java Tools ! # ! # Distributable under LGPL license. ! # See terms of license at www.gnu.org. ! # ! # Feedback and support at http://sourceforge.net/project/ejtools ! # ! # ------------------------------------------------------------ ! ! # Set root category priority to DEBUG and its only appender to STDOUT. ! log4j.rootCategory=DEBUG, STDOUT, R ! ! # STDOUT is set to be a ConsoleAppender. ! log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender ! log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout ! log4j.appender.STDOUT.layout.ConversionPattern=[%-5p] (%c:%L) - %m%n ! ! # R is set to be a RollingFileAppender ! log4j.appender.R=org.apache.log4j.RollingFileAppender ! log4j.appender.R.File=../logs/event.log ! log4j.appender.R.MaxFileSize=500KB ! log4j.appender.R.MaxBackupIndex=5 ! log4j.appender.R.layout=org.apache.log4j.PatternLayout ! log4j.appender.R.layout.ConversionPattern=[%-5p] (%c:%L) - %m%n --- 1,26 ---- ! # ------------------------------------------------------------ ! # ! # EJTools, the Enterprise Java Tools ! # ! # Distributable under LGPL license. ! # See terms of license at www.gnu.org. ! # ! # Feedback and support at http://sourceforge.net/project/ejtools ! # ! # ------------------------------------------------------------ ! ! # Set root category priority to DEBUG and its only appender to STDOUT. ! log4j.rootCategory=DEBUG, STDOUT, R ! ! # STDOUT is set to be a ConsoleAppender. ! log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender ! log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout ! log4j.appender.STDOUT.layout.ConversionPattern=[%-5p] (%c:%L) - %m%n ! ! # R is set to be a RollingFileAppender ! log4j.appender.R=org.apache.log4j.RollingFileAppender ! log4j.appender.R.File=../logs/event.log ! log4j.appender.R.MaxFileSize=500KB ! log4j.appender.R.MaxBackupIndex=5 ! log4j.appender.R.layout=org.apache.log4j.PatternLayout ! log4j.appender.R.layout.ConversionPattern=[%-5p] (%c:%L) - %m%n |
From: <let...@us...> - 2003-11-27 01:13:39
|
Update of /cvsroot/ejtools/applications/jmx.browser In directory sc8-pr-cvs1:/tmp/cvs-serv13614/jmx.browser Modified Files: .cvsignore maven.xml project.xml Added Files: .classpath .project Log Message: Address Bug #775745 Address Todo #800902 Address Todo #755528 Remove @created tags Add support for MXJ4 2.0.0 (still beta) Add support for JXM Remoting through RMI --- NEW FILE: .classpath --- <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src/conf"/> <classpathentry kind="src" path="src/main"/> <classpathentry kind="src" path="src/resources"/> <classpathentry kind="src" path="src/test"/> <classpathentry kind="src" path="/ejtools-libraries-adwt"/> <classpathentry kind="src" path="/ejtools-libraries-common"/> <classpathentry kind="src" path="/ejtools-libraries-graph"/> <classpathentry kind="src" path="/ejtools-libraries-icons"/> <classpathentry kind="src" path="/ejtools-libraries-taglib"/> <classpathentry kind="src" path="/ejtools-thirdparty"/> <classpathentry kind="var" path="JRE_LIB" sourcepath="JDK_SRC"/> <classpathentry kind="var" path="MAVEN_REPO/mx4j/jars/mx4j-tools-1.1.1.jar"/> <classpathentry kind="var" path="MAVEN_REPO/dreambean/jars/awt-1.0.jar"/> <classpathentry kind="var" path="MAVEN_REPO/jboss/jars/jboss-3.0.4.jar"/> <classpathentry kind="var" path="MAVEN_REPO/jboss/jars/jbossall-client-3.0.4.jar"/> <classpathentry kind="var" path="MAVEN_REPO/jboss/jars/jboss-common-3.0.4.jar"/> <classpathentry kind="var" path="MAVEN_REPO/jboss/jars/jboss-system-3.0.4.jar"/> <classpathentry kind="var" path="MAVEN_REPO/log4j/jars/log4j-1.2.8.jar"/> <classpathentry kind="var" path="MAVEN_REPO/struts/jars/struts-1.0.2.jar"/> <classpathentry kind="var" path="MAVEN_REPO/sun/jars/j2ee-1.3.1.jar"/> <classpathentry kind="lib" path="F:/EJTools/thirdparty/mx4j/jars/mx4j-HEAD-1.2.jar"/> <classpathentry kind="lib" path="F:/EJTools/thirdparty/mx4j/jars/mx4j-HEAD-remote-1.2.jar"/> <classpathentry kind="lib" path="F:/EJTools/thirdparty/mx4j/jars/mx4j-HEAD-tools-1.2.jar"/> <classpathentry kind="output" path="bin"/> </classpath> --- NEW FILE: .project --- <?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>ejtools-app-jmx-browser</name> <comment></comment> <projects> <project>ejtools-libraries-adwt</project> <project>ejtools-libraries-common</project> <project>ejtools-libraries-graph</project> <project>ejtools-libraries-icons</project> <project>ejtools-libraries-taglib</project> <project>ejtools-thirdparty</project> </projects> <buildSpec> <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments> </arguments> </buildCommand> </buildSpec> <natures> <nature>org.eclipse.jdt.core.javanature</nature> </natures> </projectDescription> Index: .cvsignore =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/.cvsignore,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** .cvsignore 8 Mar 2003 20:52:09 -0000 1.4 --- .cvsignore 27 Nov 2003 01:13:05 -0000 1.5 *************** *** 1,4 **** bin ! dist ! output ! target --- 1,4 ---- bin ! dist ! output ! target Index: maven.xml =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/maven.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** maven.xml 8 Mar 2003 20:52:10 -0000 1.3 --- maven.xml 27 Nov 2003 01:13:05 -0000 1.4 *************** *** 23,25 **** --- 23,28 ---- <attainGoal name="ejtools:mbean"/> </postGoal> + <postGoal name="ejtools:app"> + <attainGoal name="ejtools:app-unpack"/> + </postGoal> </project> Index: project.xml =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/project.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** project.xml 1 Apr 2003 21:53:09 -0000 1.3 --- project.xml 27 Nov 2003 01:13:05 -0000 1.4 *************** *** 1,167 **** ! <?xml version="1.0" encoding="UTF-8"?> ! <!-- ! # ================================================================================ ! # EJTools, the Enterprise Java Tools ! # ! # Distributable under LGPL license. ! # See terms of license at gnu.org. ! # ! # $Revision$ ! # ================================================================================ ! --> ! <project> ! <extend>${basedir}/../../project.xml</extend> ! <id>ejtools-jmx-browser</id> ! <groupId>ejtools</groupId> ! <name>JMX Browser</name> ! <currentVersion>1.1.2</currentVersion> ! <package>org/ejtools/management/browser</package> ! <url>/applications/jmx.browser</url> ! <dependencies> ! <dependency> ! <id>log4j</id> ! <version>1.2.7</version> ! <properties> ! <app.bundle.jar>true</app.bundle.jar> ! <war.bundle.jar>true</war.bundle.jar> ! </properties> ! </dependency> ! <dependency> ! <id>mx4j</id> ! <artifactId>mx4j-jmx</artifactId> ! <version>1.1</version> ! </dependency> ! <dependency> ! <id>mx4j</id> ! <artifactId>mx4j-tools</artifactId> ! <version>1.1</version> ! </dependency> ! <dependency> ! <id>struts</id> ! <version>1.0.2</version> ! <properties> ! <war.bundle.jar>true</war.bundle.jar> ! </properties> ! </dependency> ! <!-- Project dependencies --> ! <dependency> ! <id>ejtools-adwt</id> ! <groupId>ejtools</groupId> ! <version>1.0.0</version> ! <properties> ! <app.bundle.jar>true</app.bundle.jar> ! <war.bundle.jar>true</war.bundle.jar> ! </properties> ! </dependency> ! <dependency> ! <id>ejtools-common</id> ! <groupId>ejtools</groupId> ! <version>1.0.0</version> ! <properties> ! <app.bundle.jar>true</app.bundle.jar> ! <war.bundle.jar>true</war.bundle.jar> ! <mbean.bundle.jar>true</mbean.bundle.jar> ! </properties> ! </dependency> ! <dependency> ! <id>ejtools-graph</id> ! <groupId>ejtools</groupId> ! <version>1.0.0</version> ! <properties> ! <app.bundle.jar>true</app.bundle.jar> ! <war.bundle.jar>true</war.bundle.jar> ! <mbean.bundle.jar>true</mbean.bundle.jar> ! </properties> ! </dependency> ! <dependency> ! <id>ejtools-j2ee-icons</id> ! <groupId>ejtools</groupId> ! <version>1.0.0</version> ! <properties> ! <app.bundle.jar>true</app.bundle.jar> ! </properties> ! </dependency> ! <dependency> ! <id>ejtools-taglib</id> ! <groupId>ejtools</groupId> ! <version>1.0.0</version> ! <properties> ! <war.bundle.jar>true</war.bundle.jar> ! <war.bundle.tld>true</war.bundle.tld> ! </properties> ! </dependency> ! <!-- Local dependencies --> ! <dependency> ! <id>dreambean</id> ! <groupId>dreambean</groupId> ! <artifactId>awt</artifactId> ! <version>1.0</version> ! <properties> ! <app.bundle.jar>true</app.bundle.jar> ! </properties> ! </dependency> ! <dependency> ! <id>jboss</id> ! <groupId>jboss</groupId> ! <artifactId>jbossall-client</artifactId> ! <version>3.0.4</version> ! </dependency> ! <dependency> ! <id>jboss</id> ! <groupId>jboss</groupId> ! <artifactId>jboss</artifactId> ! <version>3.0.4</version> ! </dependency> ! <dependency> ! <id>jboss</id> ! <groupId>jboss</groupId> ! <artifactId>jboss-common</artifactId> ! <version>3.0.4</version> ! </dependency> ! <dependency> ! <id>jboss</id> ! <groupId>jboss</groupId> ! <artifactId>jboss-system</artifactId> ! <version>3.0.4</version> ! </dependency> ! <dependency> ! <id>sun</id> ! <groupId>sun</groupId> ! <artifactId>j2ee</artifactId> ! <version>1.3.1</version> ! </dependency> ! <dependency> ! <id>sun</id> ! <groupId>sun</groupId> ! <artifactId>jlfgr</artifactId> ! <version>1.0</version> ! <properties> ! <app.bundle.jar>true</app.bundle.jar> ! </properties> ! </dependency> ! </dependencies> ! <build> ! <nagEmailAddress>ejt...@so...</nagEmailAddress> ! <!-- Source dirs --> ! <sourceDirectory>${basedir}/src/main</sourceDirectory> ! <unitTestSourceDirectory>${basedir}/src/test</unitTestSourceDirectory> ! <integrationUnitTestSourceDirectory>${basedir}/src/test</integrationUnitTestSourceDirectory> ! <aspectSourceDirectory/> ! <!-- Unit test classes --> ! <unitTest> ! <includes> ! <include>**/*Test.java</include> ! </includes> ! </unitTest> ! <!-- Resources --> ! <resources> ! <resource> ! <directory>${basedir}/src/resources</directory> ! </resource> ! <!-- XDoclet Resources --> ! <resource> ! <directory>${maven.build.dir}/xdoclet/xdoclet</directory> ! </resource> ! </resources> ! </build> ! </project> --- 1,177 ---- ! <?xml version="1.0" encoding="UTF-8"?> ! <!-- ! # ================================================================================ ! # EJTools, the Enterprise Java Tools ! # ! # Distributable under LGPL license. ! # See terms of license at gnu.org. ! # ! # $Revision$ ! # ================================================================================ ! --> ! <project> ! <extend>${basedir}/../../project.xml</extend> ! <id>ejtools-jmx-browser</id> ! <groupId>ejtools</groupId> ! <name>JMX Browser</name> ! <currentVersion>1.2.0</currentVersion> ! <package>org/ejtools/jmx/browser</package> ! <url>/applications/jmx.browser</url> ! <dependencies> ! <dependency> ! <id>log4j</id> ! <version>1.2.7</version> ! <properties> ! <app.bundle.jar>true</app.bundle.jar> ! <war.bundle.jar>true</war.bundle.jar> ! </properties> ! </dependency> ! <!-- ! <dependency> ! <id>mx4j</id> ! <artifactId>mx4j-jmx</artifactId> ! <version>1.1.1</version> ! </dependency> ! --> ! <dependency> ! <id>mx4j</id> ! <artifactId>mx4j-tools</artifactId> ! <version>1.1.1</version> ! </dependency> ! <dependency> ! <id>struts</id> ! <version>1.0.2</version> ! <properties> ! <war.bundle.jar>true</war.bundle.jar> ! </properties> ! </dependency> ! <!-- Project dependencies --> ! <dependency> ! <id>ejtools-adwt</id> ! <groupId>ejtools</groupId> ! <version>1.0.0</version> ! <properties> ! <app.bundle.jar>true</app.bundle.jar> ! <war.bundle.jar>true</war.bundle.jar> ! </properties> ! </dependency> ! <dependency> ! <id>ejtools-common</id> ! <groupId>ejtools</groupId> ! <version>1.0.0</version> ! <properties> ! <app.bundle.jar>true</app.bundle.jar> ! <war.bundle.jar>true</war.bundle.jar> ! <mbean.bundle.jar>true</mbean.bundle.jar> ! </properties> ! </dependency> ! <dependency> ! <id>ejtools-graph</id> ! <groupId>ejtools</groupId> ! <version>1.0.0</version> ! <properties> ! <app.bundle.jar>true</app.bundle.jar> ! <war.bundle.jar>true</war.bundle.jar> ! <mbean.bundle.jar>true</mbean.bundle.jar> ! </properties> ! </dependency> ! <dependency> ! <id>ejtools-j2ee-icons</id> ! <groupId>ejtools</groupId> ! <version>1.0.0</version> ! <properties> ! <app.bundle.jar>true</app.bundle.jar> ! </properties> ! </dependency> ! <dependency> ! <id>ejtools-taglib</id> ! <groupId>ejtools</groupId> ! <version>1.0.0</version> ! <properties> ! <war.bundle.jar>true</war.bundle.jar> ! <war.bundle.tld>true</war.bundle.tld> ! </properties> ! </dependency> ! <!-- Local dependencies --> ! <dependency> ! <id>dreambean</id> ! <groupId>dreambean</groupId> ! <artifactId>awt</artifactId> ! <version>1.0</version> ! <properties> ! <app.bundle.jar>true</app.bundle.jar> ! </properties> ! </dependency> ! <dependency> ! <id>jboss</id> ! <groupId>jboss</groupId> ! <artifactId>jbossall-client</artifactId> ! <version>3.0.4</version> ! </dependency> ! <dependency> ! <id>jboss</id> ! <groupId>jboss</groupId> ! <artifactId>jboss</artifactId> ! <version>3.0.4</version> ! </dependency> ! <dependency> ! <id>jboss</id> ! <groupId>jboss</groupId> ! <artifactId>jboss-common</artifactId> ! <version>3.0.4</version> ! </dependency> ! <dependency> ! <id>jboss</id> ! <groupId>jboss</groupId> ! <artifactId>jboss-system</artifactId> ! <version>3.0.4</version> ! </dependency> ! <dependency> ! <id>mx4j</id> ! <groupId>mx4j</groupId> ! <artifactId>mx4j-HEAD</artifactId> ! <version>1.2</version> ! </dependency> ! <dependency> ! <id>mx4j</id> ! <groupId>mx4j</groupId> ! <artifactId>mx4j-HEAD-remote</artifactId> ! <version>1.2</version> ! </dependency> ! <dependency> ! <id>mx4j</id> ! <groupId>mx4j</groupId> ! <artifactId>mx4j-HEAD-tools</artifactId> ! <version>1.2</version> ! </dependency> ! <dependency> ! <id>sun</id> ! <groupId>sun</groupId> ! <artifactId>j2ee</artifactId> ! <version>1.3.1</version> ! </dependency> ! <dependency> ! <id>sun</id> ! <groupId>sun</groupId> ! <artifactId>jlfgr</artifactId> ! <version>1.0</version> ! <properties> ! <app.bundle.jar>true</app.bundle.jar> ! </properties> ! </dependency> ! </dependencies> ! <build> ! <!-- Resources --> ! <resources> ! <!-- General resources --> ! <resource> ! <directory>${basedir}/src/resources</directory> ! </resource> ! <!-- XDoclet Resources --> ! <resource> ! <directory>${basedir}/target/xdoclet/xdoclet</directory> ! <includes>*.properties</includes> ! </resource> ! </resources> ! </build> ! </project> |
From: <let...@us...> - 2003-11-27 01:13:14
|
Update of /cvsroot/ejtools/applications/jmx.browser/src/webapp/content In directory sc8-pr-cvs1:/tmp/cvs-serv13614/jmx.browser/src/webapp/content Modified Files: admin.jsp broadcasters.jsp broadcasters.xml customview.jsp customview.xml detail.jsp detail.xml help.jsp index.jsp index.xml invoke.jsp notifications.jsp search.jsp search.xml style.xsl Log Message: Address Bug #775745 Address Todo #800902 Address Todo #755528 Remove @created tags Add support for MXJ4 2.0.0 (still beta) Add support for JXM Remoting through RMI Index: admin.jsp =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/webapp/content/admin.jsp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** admin.jsp 8 Jan 2003 22:36:24 -0000 1.12 --- admin.jsp 27 Nov 2003 01:13:08 -0000 1.13 *************** *** 1,142 **** ! <?xml version="1.0" encoding="UTF-8"?> ! <jsp:root version="1.2" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:app="/WEB-INF/application.tld" xmlns:ejtools="/WEB-INF/ejtools-taglib.tld" xmlns:bean="/WEB-INF/struts-bean.tld" xmlns:html="/WEB-INF/struts-html.tld" xmlns:logic="/WEB-INF/struts-logic.tld"> ! <jsp:directive.page language="java" contentType="text/html"/> ! <app:connect/> ! <html> ! <head> ! <title> ! <bean:message key="web.title.admin"/> ! </title> ! <link rel="stylesheet" type="text/css" href="style.css"/> ! <html:base/> ! </head> ! <body> ! <table border="0" width="100%" bgcolor="#CCCCCC" cellspacing="0"> ! <tr> ! <td width="100%"> ! <table border="0" width="100%" cellspacing="0" cellpadding="3" bgcolor="#FFFFFF"> ! <tr> ! <td> ! <b> ! <font face="verdana,arial,sans-serif" color="#000000" size="6"> ! <bean:message key="web.title.admin"/> ! </font> ! </b> ! </td> ! <td align="right" rowspan="2"> ! <a href="http://ejtools.sourceforge.net"> ! <img border="0" src="images/ejtools50.png" width="175" height="50"/> ! </a> ! </td> ! </tr> ! <tr> ! <td> ! <html:link forward="home"> ! <bean:message key="web.title.index"/> ! </html:link> >> <bean:message key="web.title.admin"/> ! </td> ! </tr> ! </table> ! </td> ! </tr> ! </table> ! <img border="0" src="images/white.png" width="5" height="15"/> ! <table border="0" cellspacing="1" bgcolor="#CCCCCC" width="100%"> ! <tr bgcolor="#EEEEEE"> ! <td align="left" valign="top"> ! <html:form action="/register"> ! <table border="0" width="100%" cellspacing="0" cellpadding="3"> ! <tr> ! <td colspan="3"> ! <b> ! <bean:message key="web.text.register.mandatory"/> ! </b> ! </td> ! </tr> ! <tr> ! <td nowrap="true"> ! <bean:message key="web.label.register.objectName"/> ! </td> ! <td> ! <html:text property="objectName"/> ! </td> ! <td width="90%"> ! <bean:message key="web.text.register.objectName.nota"/> ! </td> ! </tr> ! <tr> ! <td nowrap="true"> ! <bean:message key="web.label.register.className"/> ! </td> ! <td> ! <html:text property="className"/> ! </td> ! <td width="90%"> ! <bean:message key="web.text.register.className.nota"/> ! </td> ! </tr> ! <tr> ! <td colspan="3"> ! <b> ! <bean:message key="web.text.register.optional"/> ! </b> ! </td> ! </tr> ! <tr> ! <td nowrap="true"> ! <bean:message key="web.label.register.classLoader"/> ! </td> ! <td> ! <html:text property="classLoader"/> ! </td> ! <td width="90%"> ! <bean:message key="web.text.register.classLoader.nota"/> ! </td> ! </tr> ! <tr> ! <td nowrap="true"> ! <bean:message key="web.label.register.parameters"/> ! </td> ! <td> ! <html:text property="parameters"/> ! </td> ! <td width="90%"> ! <bean:message key="web.text.register.parameters.nota"/> ! </td> ! </tr> ! <tr> ! <td nowrap="true"> ! <bean:message key="web.label.register.signature"/> ! </td> ! <td> ! <html:text property="signature"/> ! </td> ! <td width="90%"> ! <bean:message key="web.text.register.signature.nota"/> ! </td> ! </tr> ! </table> ! <center> ! <table border="0" cellspacing="0" cellpadding="3"> ! <tr align="center"> ! <td> ! <html:submit styleClass="button"> ! <bean:message key="web.button.register"/> ! </html:submit> ! </td> ! <td> ! <html:reset styleClass="button"> ! <bean:message key="web.button.cancel"/> ! </html:reset> ! </td> ! </tr> ! </table> ! </center> ! </html:form> ! </td> ! </tr> ! </table> ! <html:errors/> ! </body> ! </html> ! </jsp:root> --- 1,142 ---- ! <?xml version="1.0" encoding="UTF-8"?> ! <jsp:root version="1.2" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:app="/WEB-INF/application.tld" xmlns:ejtools="/WEB-INF/ejtools-taglib.tld" xmlns:bean="/WEB-INF/struts-bean.tld" xmlns:html="/WEB-INF/struts-html.tld" xmlns:logic="/WEB-INF/struts-logic.tld"> ! <jsp:directive.page language="java" contentType="text/html"/> ! <app:connect/> ! <html> ! <head> ! <title> ! <bean:message key="web.title.admin"/> ! </title> ! <link rel="stylesheet" type="text/css" href="style.css"/> ! <html:base/> ! </head> ! <body> ! <table border="0" width="100%" bgcolor="#CCCCCC" cellspacing="0"> ! <tr> ! <td width="100%"> ! <table border="0" width="100%" cellspacing="0" cellpadding="3" bgcolor="#FFFFFF"> ! <tr> ! <td> ! <b> ! <font face="verdana,arial,sans-serif" color="#000000" size="6"> ! <bean:message key="web.title.admin"/> ! </font> ! </b> ! </td> ! <td align="right" rowspan="2"> ! <a href="http://www.ejtools.org"> ! <img border="0" src="images/ejtools50.png" width="175" height="50"/> ! </a> ! </td> ! </tr> ! <tr> ! <td> ! <html:link forward="home"> ! <bean:message key="web.title.index"/> ! </html:link> >> <bean:message key="web.title.admin"/> ! </td> ! </tr> ! </table> ! </td> ! </tr> ! </table> ! <img border="0" src="images/white.png" width="5" height="15"/> ! <table border="0" cellspacing="1" bgcolor="#CCCCCC" width="100%"> ! <tr bgcolor="#EEEEEE"> ! <td align="left" valign="top"> ! <html:form action="/register"> ! <table border="0" width="100%" cellspacing="0" cellpadding="3"> ! <tr> ! <td colspan="3"> ! <b> ! <bean:message key="web.text.register.mandatory"/> ! </b> ! </td> ! </tr> ! <tr> ! <td nowrap="true"> ! <bean:message key="web.label.register.objectName"/> ! </td> ! <td> ! <html:text property="objectName"/> ! </td> ! <td width="90%"> ! <bean:message key="web.text.register.objectName.nota"/> ! </td> ! </tr> ! <tr> ! <td nowrap="true"> ! <bean:message key="web.label.register.className"/> ! </td> ! <td> ! <html:text property="className"/> ! </td> ! <td width="90%"> ! <bean:message key="web.text.register.className.nota"/> ! </td> ! </tr> ! <tr> ! <td colspan="3"> ! <b> ! <bean:message key="web.text.register.optional"/> ! </b> ! </td> ! </tr> ! <tr> ! <td nowrap="true"> ! <bean:message key="web.label.register.classLoader"/> ! </td> ! <td> ! <html:text property="classLoader"/> ! </td> ! <td width="90%"> ! <bean:message key="web.text.register.classLoader.nota"/> ! </td> ! </tr> ! <tr> ! <td nowrap="true"> ! <bean:message key="web.label.register.parameters"/> ! </td> ! <td> ! <html:text property="parameters"/> ! </td> ! <td width="90%"> ! <bean:message key="web.text.register.parameters.nota"/> ! </td> ! </tr> ! <tr> ! <td nowrap="true"> ! <bean:message key="web.label.register.signature"/> ! </td> ! <td> ! <html:text property="signature"/> ! </td> ! <td width="90%"> ! <bean:message key="web.text.register.signature.nota"/> ! </td> ! </tr> ! </table> ! <center> ! <table border="0" cellspacing="0" cellpadding="3"> ! <tr align="center"> ! <td> ! <html:submit styleClass="button"> ! <bean:message key="web.button.register"/> ! </html:submit> ! </td> ! <td> ! <html:reset styleClass="button"> ! <bean:message key="web.button.cancel"/> ! </html:reset> ! </td> ! </tr> ! </table> ! </center> ! </html:form> ! </td> ! </tr> ! </table> ! <html:errors/> ! </body> ! </html> ! </jsp:root> Index: broadcasters.jsp =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/webapp/content/broadcasters.jsp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** broadcasters.jsp 10 Feb 2003 20:56:51 -0000 1.8 --- broadcasters.jsp 27 Nov 2003 01:13:08 -0000 1.9 *************** *** 1,93 **** ! <?xml version="1.0" encoding="UTF-8"?> ! <jsp:root version="1.2" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:app="/WEB-INF/application.tld" xmlns:ejtools="/WEB-INF/ejtools-taglib.tld" xmlns:bean="/WEB-INF/struts-bean.tld" xmlns:html="/WEB-INF/struts-html.tld" xmlns:logic="/WEB-INF/struts-logic.tld"> ! <jsp:directive.page language="java" contentType="text/html"/> ! <app:connect/> ! <html> ! <head> ! <title> ! <bean:message key="web.title.broadcasters"/> ! </title> ! <link rel="stylesheet" type="text/css" href="style.css"/> ! <html:base/> ! </head> ! <body> ! <table border="0" width="100%" bgcolor="#CCCCCC" cellspacing="0"> ! <tr> ! <td width="100%"> ! <table border="0" width="100%" cellspacing="0" cellpadding="3" bgcolor="#FFFFFF"> ! <tr> ! <td> ! <b> ! <font face="verdana,arial,sans-serif" color="#000000" size="6"> ! <bean:message key="web.title.broadcasters"/> ! </font> ! </b> ! </td> ! <td align="right" rowspan="2"> ! <a href="http://ejtools.sourceforge.net"> ! <img border="0" src="images/ejtools50.png" width="175" height="50"/> ! </a> ! </td> ! </tr> ! <tr> ! <td> ! <html:link forward="home"> ! <bean:message key="web.title.index"/> ! </html:link> >> <bean:message key="web.title.broadcasters"/> ! </td> ! </tr> ! </table> ! </td> ! </tr> ! </table> ! <img border="0" src="images/white.png" width="5" height="15"/> ! <table border="0" width="100%" cellspacing="1" cellpadding="2" bgcolor="#CCCCCC"> ! <tr bgcolor="#000090"> ! <td align="center" valign="top" width="20%"> ! <font face="verdana,arial,sans-serif" color="#ffffff" size="-1"> ! <b> ! <bean:message key="web.table.header.mbean"/> ! </b> ! </font> ! </td> ! <td align="center" valign="top" width="10%"> ! <font face="verdana,arial,sans-serif" color="#ffffff" size="-1"> ! <b> ! <bean:message key="web.table.header.registration"/> ! </b> ! </font> ! </td> ! </tr> ! <form action="register-broadcasters.do"> ! <ejtools:generateTree name="tree" property="server" id="jmxtree"/> ! <logic:iterate name="jmxtree" id="treenode" indexId="number" type="org.ejtools.servlet.http.jsp.tagext.tree.IndentedObject"> ! <bean:define id="resource" name="treenode" property="object" type="org.ejtools.jmx.browser.model.Node"/> ! <bean:define id="resourceName" name="resource" property="name"/> ! <ejtools:className id="clazz" name="resource"/> ! <logic:equal name="clazz" value="org.ejtools.jmx.browser.model.Resource"> ! <logic:equal name="resource" property="broadcaster" value="true"> ! <tr bgcolor="#EEEEEE"> ! <td valign="top" align="left" width="99%"> ! <html:link page="/detail.do" paramId="reference" paramName="treenode" paramProperty="object"> ! <bean:write name="resourceName"/> ! </html:link> ! </td> ! <td valign="top" align="right"> ! <app:notificationCheckBox id="resourceName" name="resource" property="registeredForNotifications"/> ! </td> ! </tr> ! </logic:equal> ! </logic:equal> ! </logic:iterate> ! <tr bgcolor="#EEEEEE"> ! <td valign="top" align="center" colspan="2"> ! <html:submit styleClass="button"> ! <bean:message key="web.button.register"/> ! </html:submit> ! </td> ! </tr> ! </form> ! </table> ! </body> ! </html> ! </jsp:root> --- 1,93 ---- ! <?xml version="1.0" encoding="UTF-8"?> ! <jsp:root version="1.2" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:app="/WEB-INF/application.tld" xmlns:ejtools="/WEB-INF/ejtools-taglib.tld" xmlns:bean="/WEB-INF/struts-bean.tld" xmlns:html="/WEB-INF/struts-html.tld" xmlns:logic="/WEB-INF/struts-logic.tld"> ! <jsp:directive.page language="java" contentType="text/html"/> ! <app:connect/> ! <html> ! <head> ! <title> ! <bean:message key="web.title.broadcasters"/> ! </title> ! <link rel="stylesheet" type="text/css" href="style.css"/> ! <html:base/> ! </head> ! <body> ! <table border="0" width="100%" bgcolor="#CCCCCC" cellspacing="0"> ! <tr> ! <td width="100%"> ! <table border="0" width="100%" cellspacing="0" cellpadding="3" bgcolor="#FFFFFF"> ! <tr> ! <td> ! <b> ! <font face="verdana,arial,sans-serif" color="#000000" size="6"> ! <bean:message key="web.title.broadcasters"/> ! </font> ! </b> ! </td> ! <td align="right" rowspan="2"> ! <a href="http://www.ejtools.org"> ! <img border="0" src="images/ejtools50.png" width="175" height="50"/> ! </a> ! </td> ! </tr> ! <tr> ! <td> ! <html:link forward="home"> ! <bean:message key="web.title.index"/> ! </html:link> >> <bean:message key="web.title.broadcasters"/> ! </td> ! </tr> ! </table> ! </td> ! </tr> ! </table> ! <img border="0" src="images/white.png" width="5" height="15"/> ! <table border="0" width="100%" cellspacing="1" cellpadding="2" bgcolor="#CCCCCC"> ! <tr bgcolor="#000090"> ! <td align="center" valign="top" width="20%"> ! <font face="verdana,arial,sans-serif" color="#ffffff" size="-1"> ! <b> ! <bean:message key="web.table.header.mbean"/> ! </b> ! </font> ! </td> ! <td align="center" valign="top" width="10%"> ! <font face="verdana,arial,sans-serif" color="#ffffff" size="-1"> ! <b> ! <bean:message key="web.table.header.registration"/> ! </b> ! </font> ! </td> ! </tr> ! <form action="register-broadcasters.do"> ! <ejtools:generateTree name="tree" property="server" id="jmxtree"/> ! <logic:iterate name="jmxtree" id="treenode" indexId="number" type="org.ejtools.servlet.http.jsp.tagext.tree.IndentedObject"> ! <bean:define id="resource" name="treenode" property="object" type="org.ejtools.jmx.browser.model.Node"/> ! <bean:define id="resourceName" name="resource" property="name"/> ! <ejtools:className id="clazz" name="resource"/> ! <logic:equal name="clazz" value="org.ejtools.jmx.browser.model.Resource"> ! <logic:equal name="resource" property="broadcaster" value="true"> ! <tr bgcolor="#EEEEEE"> ! <td valign="top" align="left" width="99%"> ! <html:link page="/detail.do" paramId="reference" paramName="treenode" paramProperty="object"> ! <bean:write name="resourceName"/> ! </html:link> ! </td> ! <td valign="top" align="right"> ! <app:notificationCheckBox id="resourceName" name="resource" property="registeredForNotifications"/> ! </td> ! </tr> ! </logic:equal> ! </logic:equal> ! </logic:iterate> ! <tr bgcolor="#EEEEEE"> ! <td valign="top" align="center" colspan="2"> ! <html:submit styleClass="button"> ! <bean:message key="web.button.register"/> ! </html:submit> ! </td> ! </tr> ! </form> ! </table> ! </body> ! </html> ! </jsp:root> Index: broadcasters.xml =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/webapp/content/broadcasters.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** broadcasters.xml 10 Feb 2003 20:56:54 -0000 1.8 --- broadcasters.xml 27 Nov 2003 01:13:08 -0000 1.9 *************** *** 1,63 **** ! <?xml version="1.0" encoding="US-ASCII"?> ! <?xml-stylesheet type="text/xsl" href="style.xsl"?> ! <Page xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:app="/WEB-INF/application.tld" xmlns:ejtools="/WEB-INF/ejtools-taglib.tld" xmlns:bean="/WEB-INF/struts-bean.tld" xmlns:html="/WEB-INF/struts-html.tld" xmlns:logic="/WEB-INF/struts-logic.tld"> ! <Title> ! <bean:message key="web.title.broadcasters"/> ! </Title> ! <Content> ! <!-- ======================================== --> ! <!-- Header --> ! <!-- ======================================== --> ! <TitleBlock> ! <Title> ! <bean:message key="web.title.broadcasters"/> ! </Title> ! <Path> ! <Element> ! <html:link forward="home"> ! <bean:message key="web.title.index"/> ! </html:link> ! </Element> ! <Element> ! <bean:message key="web.title.broadcasters"/> ! </Element> ! </Path> ! </TitleBlock> ! <!-- ======================================== --> ! <!-- Spacer --> ! <!-- ======================================== --> ! <Spacer/> ! <!-- ======================================== --> ! <!-- Broadcasters --> ! <!-- ======================================== --> ! <BroadcastersBlock> ! <form action="register-broadcasters.do"> ! <ejtools:generateTree name="tree" property="server" id="jmxtree"/> ! <logic:iterate name="jmxtree" id="treenode" indexId="number" type="org.ejtools.servlet.http.jsp.tagext.tree.IndentedObject"> ! <bean:define id="resource" name="treenode" property="object" type="org.ejtools.jmx.browser.model.Node"/> ! <bean:define id="resourceName" name="resource" property="name"/> ! <ejtools:className id="clazz" name="resource"/> ! <logic:equal name="clazz" value="org.ejtools.jmx.browser.model.Resource"> ! <logic:equal name="resource" property="broadcaster" value="true"> ! <Broadcaster> ! <BroadcasterName> ! <html:link page="/detail.do" paramId="reference" paramName="treenode" paramProperty="object"> ! <bean:write name="resourceName"/> ! </html:link> ! </BroadcasterName> ! <BroadcasterRegistration> ! <app:notificationCheckBox id="resourceName" name="resource" property="registeredForNotifications"/> ! </BroadcasterRegistration> ! </Broadcaster> ! </logic:equal> ! </logic:equal> ! </logic:iterate> ! <BroadcasterButtons> ! <html:submit styleClass="button"> ! <bean:message key="web.button.register"/> ! </html:submit> ! </BroadcasterButtons> ! </form> ! </BroadcastersBlock> ! </Content> ! </Page> --- 1,63 ---- ! <?xml version="1.0" encoding="US-ASCII"?> ! <?xml-stylesheet type="text/xsl" href="style.xsl"?> ! <Page xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:app="/WEB-INF/application.tld" xmlns:ejtools="/WEB-INF/ejtools-taglib.tld" xmlns:bean="/WEB-INF/struts-bean.tld" xmlns:html="/WEB-INF/struts-html.tld" xmlns:logic="/WEB-INF/struts-logic.tld"> ! <Title> ! <bean:message key="web.title.broadcasters"/> ! </Title> ! <Content> ! <!-- ======================================== --> ! <!-- Header --> ! <!-- ======================================== --> ! <TitleBlock> ! <Title> ! <bean:message key="web.title.broadcasters"/> ! </Title> ! <Path> ! <Element> ! <html:link forward="home"> ! <bean:message key="web.title.index"/> ! </html:link> ! </Element> ! <Element> ! <bean:message key="web.title.broadcasters"/> ! </Element> ! </Path> ! </TitleBlock> ! <!-- ======================================== --> ! <!-- Spacer --> ! <!-- ======================================== --> ! <Spacer/> ! <!-- ======================================== --> ! <!-- Broadcasters --> ! <!-- ======================================== --> ! <BroadcastersBlock> ! <form action="register-broadcasters.do"> ! <ejtools:generateTree name="tree" property="server" id="jmxtree"/> ! <logic:iterate name="jmxtree" id="treenode" indexId="number" type="org.ejtools.servlet.http.jsp.tagext.tree.IndentedObject"> ! <bean:define id="resource" name="treenode" property="object" type="org.ejtools.jmx.browser.model.Node"/> ! <bean:define id="resourceName" name="resource" property="name"/> ! <ejtools:className id="clazz" name="resource"/> ! <logic:equal name="clazz" value="org.ejtools.jmx.browser.model.Resource"> ! <logic:equal name="resource" property="broadcaster" value="true"> ! <Broadcaster> ! <BroadcasterName> ! <html:link page="/detail.do" paramId="reference" paramName="treenode" paramProperty="object"> ! <bean:write name="resourceName"/> ! </html:link> ! </BroadcasterName> ! <BroadcasterRegistration> ! <app:notificationCheckBox id="resourceName" name="resource" property="registeredForNotifications"/> ! </BroadcasterRegistration> ! </Broadcaster> ! </logic:equal> ! </logic:equal> ! </logic:iterate> ! <BroadcasterButtons> ! <html:submit styleClass="button"> ! <bean:message key="web.button.register"/> ! </html:submit> ! </BroadcasterButtons> ! </form> ! </BroadcastersBlock> ! </Content> ! </Page> Index: customview.jsp =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/webapp/content/customview.jsp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** customview.jsp 10 Feb 2003 20:56:55 -0000 1.7 --- customview.jsp 27 Nov 2003 01:13:08 -0000 1.8 *************** *** 1,195 **** ! <?xml version="1.0" encoding="UTF-8"?> ! <jsp:root version="1.2" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:app="/WEB-INF/application.tld" xmlns:ejtools="/WEB-INF/ejtools-taglib.tld" xmlns:bean="/WEB-INF/struts-bean.tld" xmlns:html="/WEB-INF/struts-html.tld" xmlns:logic="/WEB-INF/struts-logic.tld"> ! <jsp:directive.page language="java" contentType="text/html"/> ! <app:connect/> ! <html> ! <head> ! <title> ! <bean:message key="web.title.customview"/> ! </title> ! <link rel="stylesheet" type="text/css" href="style.css"/> ! <html:base/> ! </head> ! <body> ! <table border="0" width="100%" bgcolor="#CCCCCC" cellspacing="0"> ! <tr> ! <td width="100%"> ! <table border="0" width="100%" cellspacing="0" cellpadding="3" bgcolor="#FFFFFF"> ! <tr> ! <td> ! <b> ! <font face="verdana,arial,sans-serif" color="#000000" size="6"> ! <bean:message key="web.title.customview"/> ! </font> ! </b> ! </td> ! <td align="right" rowspan="2"> ! <a href="http://ejtools.sourceforge.net"> ! <img border="0" src="images/ejtools50.png" width="175" height="50"/> ! </a> ! </td> ! </tr> ! <tr> ! <td> ! <html:link forward="home"> ! <bean:message key="web.title.index"/> ! </html:link> >> <bean:message key="web.title.customview"/> ! </td> ! </tr> ! </table> ! </td> ! </tr> ! </table> ! <img border="0" src="images/white.png" width="5" height="15"/> ! <table border="0" cellspacing="1" bgcolor="#CCCCCC" width="100%"> ! <tr bgcolor="#EEEEEE"> ! <td align="left" valign="top"> ! <table border="0" width="100%" cellspacing="0" cellpadding="3"> ! <tr> ! <td align="right" nowrap="true"> ! <b> ! <bean:message key="web.label.view.name"/> ! </b> ! </td> ! <td align="left" width="90%"> ! <bean:write name="custom.view" property="displayName"/> ! </td> ! </tr> ! <tr> ! <form action="customview.do"> ! <ejtools:hidden id="view" name="custom.view.index"/> ! <td align="center" colspan="2"> ! <html:submit styleClass="button"> ! <bean:message key="web.button.refresh"/> ! </html:submit> ! </td> ! </form> ! </tr> ! </table> ! </td> ! </tr> ! </table> ! <img border="0" src="images/white.png" width="5" height="15"/> ! <bean:size name="custom.view.attributes" id="attributesSize"/> ! <logic:greaterThan name="attributesSize" value="0"> ! <img border="0" src="images/white.png" width="5" height="15"/> ! <table border="0" width="100%" cellspacing="1" cellpadding="2" bgcolor="#CCCCCC"> ! <tr bgcolor="#000090"> ! <td align="center" valign="top" width="25%"> ! <font face="verdana,arial,sans-serif" color="#ffffff" size="-1"> ! <b> ! <bean:message key="web.table.header.mbean"/> ! </b> ! </font> ! </td> ! <td align="center" valign="top" width="25%"> ! <font face="verdana,arial,sans-serif" color="#ffffff" size="-1"> ! <b> ! <bean:message key="web.table.header.name"/> ! </b> ! </font> ! </td> ! <td align="center" valign="top" width="50%"> ! <font face="verdana,arial,sans-serif" color="#ffffff" size="-1"> ! <b> ! <bean:message key="web.table.header.value"/> ! </b> ! </font> ! </td> ! </tr> ! <logic:iterate name="custom.view.attributes" id="holder" type="org.ejtools.jmx.browser.mbean.ResultLine"> ! <bean:define id="currentMBean" name="holder" property="accessor" type="org.ejtools.jmx.MBeanAccessor"/> ! <bean:define id="currentInfo" name="holder" property="info" type="javax.management.MBeanAttributeInfo"/> ! <tr bgcolor="#EEEEEE"> ! <td valign="top" align="left"> ! <html:link page="/detail.do" paramId="reference" paramName="holder" paramProperty="name"> ! <bean:write name="holder" property="name"/> ! </html:link> ! </td> ! <td valign="top" align="left"> ! <jsp:text><a href="javascript:alert('</jsp:text> ! <bean:write name="currentInfo" property="description"/> ! <jsp:text>');"></jsp:text> ! <bean:write name="currentInfo" property="name"/> ! <jsp:text></a></jsp:text> ! </td> ! <td class="attributeValue" valign="top" align="left"> ! <app:mbeanAttributeEditor name="currentMBean" property="currentInfo"/> ! </td> ! </tr> ! </logic:iterate> ! </table> ! </logic:greaterThan> ! <bean:size name="custom.view.operations" id="operationsSize"/> ! <logic:greaterThan name="operationsSize" value="0"> ! <img border="0" src="images/white.png" width="5" height="15"/> ! <table border="0" width="100%" cellspacing="1" cellpadding="2" bgcolor="#CCCCCC"> ! <tr bgcolor="#000090"> ! <td align="center" valign="top" width="40%"> ! <font face="verdana,arial,sans-serif" color="#ffffff" size="-1"> ! <b> ! <bean:message key="web.table.header.mbean"/> ! </b> ! </font> ! </td> ! <td align="center" valign="top" width="20%"> ! <font face="verdana,arial,sans-serif" color="#ffffff" size="-1"> ! <b> ! <bean:message key="web.table.header.operation"/> ! </b> ! </font> ! </td> ! <td align="center" valign="top" width="40%"> ! <font face="verdana,arial,sans-serif" color="#ffffff" size="-1"> ! <b> ! <bean:message key="web.table.header.parameters"/> ! </b> ! </font> ! </td> ! </tr> ! <logic:iterate name="custom.view.operations" id="holder" type="org.ejtools.jmx.browser.mbean.ResultLine"> ! <bean:define id="currentMBean" name="holder" property="accessor" type="org.ejtools.jmx.MBeanAccessor"/> ! <bean:define id="currentOperation" name="holder" property="info" type="javax.management.MBeanOperationInfo"/> ! <form action="invoke.do" method="POST"> ! <ejtools:hidden id="reference" name="holder" property="name"/> ! <ejtools:hidden id="operation" name="currentOperation" property="name"/> ! <ejtools:hidden id="type" name="currentOperation" property="returnType"/> ! <input type="hidden" name="from" value="customview"/> ! <tr bgcolor="#EEEEEE"> ! <td valign="top" align="left"> ! <html:link page="/detail.do" paramId="reference" paramName="holder" paramProperty="name"> ! <bean:write name="holder" property="name"/> ! </html:link> ! </td> ! <td valign="top" align="left"> ! <jsp:text><a href="javascript:alert('</jsp:text> ! <bean:write name="currentOperation" property="description"/> ! <jsp:text>');"></jsp:text> ! <bean:write name="currentOperation" property="name"/> ! <jsp:text></a></jsp:text> ! </td> ! <td class="attributeValue" valign="top" align="left"> ! <logic:iterate name="currentOperation" property="signature" id="parameter" type="javax.management.MBeanParameterInfo" indexId="number"> ! <jsp:text><a href="javascript:alert('</jsp:text> ! <bean:write name="parameter" property="description"/> ! <jsp:text>');"></jsp:text> ! <bean:write name="parameter" property="name"/> ! <jsp:text></a> </jsp:text> ! <app:mbeanParameterEditor name="parameter" id="number"/> ! <jsp:text> (</jsp:text> ! <app:mbeanParameterClass name="parameter"/> ! <jsp:text>)</jsp:text> ! <jsp:text><br/></jsp:text> ! </logic:iterate> ! <html:submit styleClass="button"> ! <bean:message key="web.button.invoke"/> ! </html:submit> ! </td> ! </tr> ! </form> ! </logic:iterate> ! </table> ! </logic:greaterThan> ! </body> ! </html> ! </jsp:root> --- 1,195 ---- ! <?xml version="1.0" encoding="UTF-8"?> ! <jsp:root version="1.2" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:app="/WEB-INF/application.tld" xmlns:ejtools="/WEB-INF/ejtools-taglib.tld" xmlns:bean="/WEB-INF/struts-bean.tld" xmlns:html="/WEB-INF/struts-html.tld" xmlns:logic="/WEB-INF/struts-logic.tld"> ! <jsp:directive.page language="java" contentType="text/html"/> ! <app:connect/> ! <html> ! <head> ! <title> ! <bean:message key="web.title.customview"/> ! </title> ! <link rel="stylesheet" type="text/css" href="style.css"/> ! <html:base/> ! </head> ! <body> ! <table border="0" width="100%" bgcolor="#CCCCCC" cellspacing="0"> ! <tr> ! <td width="100%"> ! <table border="0" width="100%" cellspacing="0" cellpadding="3" bgcolor="#FFFFFF"> ! <tr> ! <td> ! <b> ! <font face="verdana,arial,sans-serif" color="#000000" size="6"> ! <bean:message key="web.title.customview"/> ! </font> ! </b> ! </td> ! <td align="right" rowspan="2"> ! <a href="http://www.ejtools.org"> ! <img border="0" src="images/ejtools50.png" width="175" height="50"/> ! </a> ! </td> ! </tr> ! <tr> ! <td> ! <html:link forward="home"> ! <bean:message key="web.title.index"/> ! </html:link> >> <bean:message key="web.title.customview"/> ! </td> ! </tr> ! </table> ! </td> ! </tr> ! </table> ! <img border="0" src="images/white.png" width="5" height="15"/> ! <table border="0" cellspacing="1" bgcolor="#CCCCCC" width="100%"> ! <tr bgcolor="#EEEEEE"> ! <td align="left" valign="top"> ! <table border="0" width="100%" cellspacing="0" cellpadding="3"> ! <tr> ! <td align="right" nowrap="true"> ! <b> ! <bean:message key="web.label.view.name"/> ! </b> ! </td> ! <td align="left" width="90%"> ! <bean:write name="custom.view" property="displayName"/> ! </td> ! </tr> ! <tr> ! <form action="customview.do"> ! <ejtools:hidden id="view" name="custom.view.index"/> ! <td align="center" colspan="2"> ! <html:submit styleClass="button"> ! <bean:message key="web.button.refresh"/> ! </html:submit> ! </td> ! </form> ! </tr> ! </table> ! </td> ! </tr> ! </table> ! <img border="0" src="images/white.png" width="5" height="15"/> ! <bean:size name="custom.view.attributes" id="attributesSize"/> ! <logic:greaterThan name="attributesSize" value="0"> ! <img border="0" src="images/white.png" width="5" height="15"/> ! <table border="0" width="100%" cellspacing="1" cellpadding="2" bgcolor="#CCCCCC"> ! <tr bgcolor="#000090"> ! <td align="center" valign="top" width="25%"> ! <font face="verdana,arial,sans-serif" color="#ffffff" size="-1"> ! <b> ! <bean:message key="web.table.header.mbean"/> ! </b> ! </font> ! </td> ! <td align="center" valign="top" width="25%"> ! <font face="verdana,arial,sans-serif" color="#ffffff" size="-1"> ! <b> ! <bean:message key="web.table.header.name"/> ! </b> ! </font> ! </td> ! <td align="center" valign="top" width="50%"> ! <font face="verdana,arial,sans-serif" color="#ffffff" size="-1"> ! <b> ! <bean:message key="web.table.header.value"/> ! </b> ! </font> ! </td> ! </tr> ! <logic:iterate name="custom.view.attributes" id="holder" type="org.ejtools.jmx.browser.mbean.ResultLine"> ! <bean:define id="currentMBean" name="holder" property="accessor" type="org.ejtools.jmx.MBeanAccessor"/> ! <bean:define id="currentInfo" name="holder" property="info" type="javax.management.MBeanAttributeInfo"/> ! <tr bgcolor="#EEEEEE"> ! <td valign="top" align="left"> ! <html:link page="/detail.do" paramId="reference" paramName="holder" paramProperty="name"> ! <bean:write name="holder" property="name"/> ! </html:link> ! </td> ! <td valign="top" align="left"> ! <jsp:text><a href="javascript:alert('</jsp:text> ! <bean:write name="currentInfo" property="description"/> ! <jsp:text>');"></jsp:text> ! <bean:write name="currentInfo" property="name"/> ! <jsp:text></a></jsp:text> ! </td> ! <td class="attributeValue" valign="top" align="left"> ! <app:mbeanAttributeEditor name="currentMBean" property="currentInfo"/> ! </td> ! </tr> ! </logic:iterate> ! </table> ! </logic:greaterThan> ! <bean:size name="custom.view.operations" id="operationsSize"/> ! <logic:greaterThan name="operationsSize" value="0"> ! <img border="0" src="images/white.png" width="5" height="15"/> ! <table border="0" width="100%" cellspacing="1" cellpadding="2" bgcolor="#CCCCCC"> ! <tr bgcolor="#000090"> ! <td align="center" valign="top" width="40%"> ! <font face="verdana,arial,sans-serif" color="#ffffff" size="-1"> ! <b> ! <bean:message key="web.table.header.mbean"/> ! </b> ! </font> ! </td> ! <td align="center" valign="top" width="20%"> ! <font face="verdana,arial,sans-serif" color="#ffffff" size="-1"> ! <b> ! <bean:message key="web.table.header.operation"/> ! </b> ! </font> ! </td> ! <td align="center" valign="top" width="40%"> ! <font face="verdana,arial,sans-serif" color="#ffffff" size="-1"> ! <b> ! <bean:message key="web.table.header.parameters"/> ! </b> ! </font> ! </td> ! </tr> ! <logic:iterate name="custom.view.operations" id="holder" type="org.ejtools.jmx.browser.mbean.ResultLine"> ! <bean:define id="currentMBean" name="holder" property="accessor" type="org.ejtools.jmx.MBeanAccessor"/> ! <bean:define id="currentOperation" name="holder" property="info" type="javax.management.MBeanOperationInfo"/> ! <form action="invoke.do" method="POST"> ! <ejtools:hidden id="reference" name="holder" property="name"/> ! <ejtools:hidden id="operation" name="currentOperation" property="name"/> ! <ejtools:hidden id="type" name="currentOperation" property="returnType"/> ! <input type="hidden" name="from" value="customview"/> ! <tr bgcolor="#EEEEEE"> ! <td valign="top" align="left"> ! <html:link page="/detail.do" paramId="reference" paramName="holder" paramProperty="name"> ! <bean:write name="holder" property="name"/> ! </html:link> ! </td> ! <td valign="top" align="left"> ! <jsp:text><a href="javascript:alert('</jsp:text> ! <bean:write name="currentOperation" property="description"/> ! <jsp:text>');"></jsp:text> ! <bean:write name="currentOperation" property="name"/> ! <jsp:text></a></jsp:text> ! </td> ! <td class="attributeValue" valign="top" align="left"> ! <logic:iterate name="currentOperation" property="signature" id="parameter" type="javax.management.MBeanParameterInfo" indexId="number"> ! <jsp:text><a href="javascript:alert('</jsp:text> ! <bean:write name="parameter" property="description"/> ! <jsp:text>');"></jsp:text> ! <bean:write name="parameter" property="name"/> ! <jsp:text></a> </jsp:text> ! <app:mbeanParameterEditor name="parameter" id="number"/> ! <jsp:text> (</jsp:text> ! <app:mbeanParameterClass name="parameter"/> ! <jsp:text>)</jsp:text> ! <jsp:text><br/></jsp:text> ! </logic:iterate> ! <html:submit styleClass="button"> ! <bean:message key="web.button.invoke"/> ! </html:submit> ! </td> ! </tr> ! </form> ! </logic:iterate> ! </table> ! </logic:greaterThan> ! </body> ! </html> ! </jsp:root> Index: customview.xml =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/webapp/content/customview.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** customview.xml 10 Feb 2003 20:56:52 -0000 1.6 --- customview.xml 27 Nov 2003 01:13:08 -0000 1.7 *************** *** 1,157 **** ! <?xml version="1.0" encoding="US-ASCII"?> ! <?xml-stylesheet type="text/xsl" href="style.xsl"?> ! <Page xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:app="/WEB-INF/application.tld" xmlns:ejtools="/WEB-INF/ejtools-taglib.tld" xmlns:bean="/WEB-INF/struts-bean.tld" xmlns:html="/WEB-INF/struts-html.tld" xmlns:logic="/WEB-INF/struts-logic.tld"> ! <Title> ! <bean:message key="web.title.customview"/> ! </Title> ! <Content> ! <!-- ======================================== --> ! <!-- Header --> ! <!-- ======================================== --> ! <TitleBlock> ! <Title> ! <bean:message key="web.title.customview"/> ! </Title> ! <Path> ! <Element> ! <html:link forward="home"> ! <bean:message key="web.title.index"/> ! </html:link> ! </Element> ! <Element> ! <bean:message key="web.title.customview"/> ! </Element> ! </Path> ! </TitleBlock> ! <!-- ======================================== --> ! <!-- Spacer --> ! <!-- ======================================== --> ! <Spacer/> ! <!-- ======================================== --> ! <!-- Header Block --> ! <!-- ======================================== --> ! <HeaderBlock> ! <table border="0" width="100%" cellspacing="0" cellpadding="3"> ! <tr> ! <td align="right" nowrap="true"> ! <b> ! <bean:message key="web.label.view.name"/> ! </b> ! </td> ! <td align="left" width="90%"> ! <bean:write name="custom.view" property="displayName"/> ! </td> ! </tr> ! <tr> ! <form action="customview.do"> ! <ejtools:hidden id="view" name="custom.view.index"/> ! <td align="center" colspan="2"> ! <html:submit styleClass="button"> ! <bean:message key="web.button.refresh"/> ! </html:submit> ! </td> ! </form> ! </tr> ! </table> ! </HeaderBlock> ! <!-- ======================================== --> ! <!-- Spacer --> ! <!-- ======================================== --> ! <Spacer/> ! <!-- ======================================== --> ! <!-- Test for CustomView Attributes --> ! <!-- ======================================== --> ! <bean:size name="custom.view.attributes" id="attributesSize"/> ! <logic:greaterThan name="attributesSize" value="0"> ! <!-- ======================================== --> ! <!-- Spacer --> ! <!-- ======================================== --> ! <Spacer/> ! <!-- ======================================== --> ! <!-- Attributes CustomView --> ! <!-- ======================================== --> ! <CustomView-AttributesBlock> ! <!-- ======================================== --> ! <!-- List --> ! <!-- ======================================== --> ! <logic:iterate name="custom.view.attributes" id="holder" type="org.ejtools.jmx.browser.mbean.ResultLine"> ! <bean:define id="currentMBean" name="holder" property="accessor" type="org.ejtools.jmx.MBeanAccessor"/> ! <bean:define id="currentInfo" name="holder" property="info" type="javax.management.MBeanAttributeInfo"/> ! <CustomView-Attribute> ! <MBeanName> ! <html:link page="/detail.do" paramId="reference" paramName="holder" paramProperty="name"> ! <bean:write name="holder" property="name"/> ! </html:link> ! </MBeanName> ! <AttributeName> ! <bean:write name="currentInfo" property="name"/> ! </AttributeName> ! <AttributeDescription> ! <bean:write name="currentInfo" property="description"/> ! </AttributeDescription> ! <AttributeValue> ! <app:mbeanAttributeEditor name="currentMBean" property="currentInfo"/> ! </AttributeValue> ! </CustomView-Attribute> ! </logic:iterate> ! </CustomView-AttributesBlock> ! </logic:greaterThan> ! <!-- ======================================== --> ! <!-- Test for CustomView Operations --> ! <!-- ======================================== --> ! <bean:size name="custom.view.operations" id="operationsSize"/> ! <logic:greaterThan name="operationsSize" value="0"> ! <!-- ======================================== --> ! <!-- Spacer --> ! <!-- ======================================== --> ! <Spacer/> ! <!-- ======================================== --> ! <!-- Operations CustomView --> ! <!-- ======================================== --> ! <CustomView-OperationsBlock> ! <!-- ======================================== --> ! <!-- List --> ! <!-- ======================================== --> ! <logic:iterate name="custom.view.operations" id="holder" type="org.ejtools.jmx.browser.mbean.ResultLine"> ! <bean:define id="currentMBean" name="holder" property="accessor" type="org.ejtools.jmx.MBeanAccessor"/> ! <bean:define id="currentOperation" name="holder" property="info" type="javax.management.MBeanOperationInfo"/> ! <CustomView-Operation action="invoke.do" method="POST"> ! <ejtools:hidden id="reference" name="holder" property="name"/> ! <ejtools:hidden id="operation" name="currentOperation" property="name"/> ! <ejtools:hidden id="type" name="currentOperation" property="returnType"/> ! <input type="hidden" name="from" value="customview"/> ! <MBeanName> ! <html:link page="/detail.do" paramId="reference" paramName="holder" paramProperty="name"> ! <bean:write name="holder" property="name"/> ! </html:link> ! </MBeanName> ! <OperationName> ! <bean:write name="currentOperation" property="name"/> ! </OperationName> ! <OperationDescription> ! <bean:write name="currentOperation" property="description"/> ! </OperationDescription> ! <Parameters> ! <logic:iterate name="currentOperation" property="signature" id="parameter" type="javax.management.MBeanParameterInfo" indexId="number"> ! <Parameter> ! <ParameterName> ! <bean:write name="parameter" property="name"/> ! </ParameterName> ! <ParameterDescription> ! <bean:write name="parameter" property="description"/> ! </ParameterDescription> ! <ParameterContent> ! <app:mbeanParameterEditor name="parameter" id="number"/> ! <... [truncated message content] |
Update of /cvsroot/ejtools/applications/jmx.browser/src/webapp/resources In directory sc8-pr-cvs1:/tmp/cvs-serv13614/jmx.browser/src/webapp/resources Modified Files: log.tld struts-bean.tld struts-config.xml struts-form.tld struts-html.tld struts-logic.tld struts-template.tld struts.tld Log Message: Address Bug #775745 Address Todo #800902 Address Todo #755528 Remove @created tags Add support for MXJ4 2.0.0 (still beta) Add support for JXM Remoting through RMI Index: log.tld =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/webapp/resources/log.tld,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** log.tld 26 Aug 2002 22:33:11 -0000 1.6 --- log.tld 27 Nov 2003 01:13:09 -0000 1.7 *************** *** 1,107 **** ! <?xml version="1.0" encoding="UTF-8"?> ! <!-- edited with XML Spy v4.3 U (http://www.xmlspy.com) by Laurent Etiemble (Orange) --> ! <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd"> ! <taglib> ! <tlibversion>1.0</tlibversion> ! <jspversion>1.1</jspversion> ! <shortname>log</shortname> ! <uri>http://jakarta.apache.org/taglibs/log-1.0</uri> ! <info> ! The Log library allows you to embed logging calls in your JSP which can be ! output to a variety of destinations thanks to the power of the ! log4j project. ! Initialising log4jBy default these log tags do not explicitly initialise log4j, ! you are free to do that however you wish. ! A common approach is to create a log4j servlet and for it to initialise ! log4j using some configuration file or options specified in your web.xml ! My own personal preference is just to put a log4j.properties file ! in the WEB-INF/classes directory and for that to have your log4j ! configuration. Then without any special servlets or initialisation ! code log4j will correctly initialise itself. This approach also avoids ! a single web app accidentally initialising log4j several times ! (e.g. via 2 different servlets). ! If you have any further questions regarding the configuration of ! log4j please visit the ! log4j ! site or a log4j specific mailing list. ! </info> ! <tag> ! <name>debug</name> ! <tagclass>org.apache.taglibs.log.DebugTag</tagclass> ! <attribute> ! <name>category</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>message</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! <tag> ! <name>info</name> ! <tagclass>org.apache.taglibs.log.InfoTag</tagclass> ! <attribute> ! <name>category</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>message</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! <tag> ! <name>warn</name> ! <tagclass>org.apache.taglibs.log.WarnTag</tagclass> ! <attribute> ! <name>category</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>message</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! <tag> ! <name>error</name> ! <tagclass>org.apache.taglibs.log.ErrorTag</tagclass> ! <attribute> ! <name>category</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>message</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! <tag> ! <name>fatal</name> ! <tagclass>org.apache.taglibs.log.FatalTag</tagclass> ! <attribute> ! <name>category</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>message</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! <tag> ! <name>dump</name> ! <tagclass>org.apache.taglibs.log.DumpTag</tagclass> ! <attribute> ! <name>scope</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! </taglib> --- 1,107 ---- ! <?xml version="1.0" encoding="UTF-8"?> ! <!-- edited with XML Spy v4.3 U (http://www.xmlspy.com) by Laurent Etiemble (Orange) --> ! <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd"> ! <taglib> ! <tlibversion>1.0</tlibversion> ! <jspversion>1.1</jspversion> ! <shortname>log</shortname> ! <uri>http://jakarta.apache.org/taglibs/log-1.0</uri> ! <info> ! The Log library allows you to embed logging calls in your JSP which can be ! output to a variety of destinations thanks to the power of the ! log4j project. ! Initialising log4jBy default these log tags do not explicitly initialise log4j, ! you are free to do that however you wish. ! A common approach is to create a log4j servlet and for it to initialise ! log4j using some configuration file or options specified in your web.xml ! My own personal preference is just to put a log4j.properties file ! in the WEB-INF/classes directory and for that to have your log4j ! configuration. Then without any special servlets or initialisation ! code log4j will correctly initialise itself. This approach also avoids ! a single web app accidentally initialising log4j several times ! (e.g. via 2 different servlets). ! If you have any further questions regarding the configuration of ! log4j please visit the ! log4j ! site or a log4j specific mailing list. ! </info> ! <tag> ! <name>debug</name> ! <tagclass>org.apache.taglibs.log.DebugTag</tagclass> ! <attribute> ! <name>category</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>message</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! <tag> ! <name>info</name> ! <tagclass>org.apache.taglibs.log.InfoTag</tagclass> ! <attribute> ! <name>category</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>message</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! <tag> ! <name>warn</name> ! <tagclass>org.apache.taglibs.log.WarnTag</tagclass> ! <attribute> ! <name>category</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>message</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! <tag> ! <name>error</name> ! <tagclass>org.apache.taglibs.log.ErrorTag</tagclass> ! <attribute> ! <name>category</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>message</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! <tag> ! <name>fatal</name> ! <tagclass>org.apache.taglibs.log.FatalTag</tagclass> ! <attribute> ! <name>category</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>message</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! <tag> ! <name>dump</name> ! <tagclass>org.apache.taglibs.log.DumpTag</tagclass> ! <attribute> ! <name>scope</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! </taglib> Index: struts-bean.tld =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/webapp/resources/struts-bean.tld,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** struts-bean.tld 26 Aug 2002 22:33:11 -0000 1.6 --- struts-bean.tld 27 Nov 2003 01:13:09 -0000 1.7 *************** *** 1,347 **** ! <?xml version="1.0" encoding="UTF-8"?> ! ! ! ! ! ! ! ! <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd"> ! <taglib> ! <tlibversion>1.0</tlibversion> ! <jspversion>1.1</jspversion> ! <shortname>bean</shortname> ! <uri>http://jakarta.apache.org/struts/tags-bean-1.0</uri> ! <tag> ! <name>cookie</name> ! <tagclass>org.apache.struts.taglib.bean.CookieTag</tagclass> ! <teiclass>org.apache.struts.taglib.bean.CookieTei</teiclass> ! <bodycontent>empty</bodycontent> ! <attribute> ! <name>id</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>multiple</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>name</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>value</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! <tag> ! <name>define</name> ! <tagclass>org.apache.struts.taglib.bean.DefineTag</tagclass> ! <teiclass>org.apache.struts.taglib.bean.DefineTei</teiclass> ! <bodycontent>empty</bodycontent> ! <attribute> ! <name>id</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>name</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>property</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>scope</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>toScope</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>type</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>value</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! <tag> ! <name>header</name> ! <tagclass>org.apache.struts.taglib.bean.HeaderTag</tagclass> ! <teiclass>org.apache.struts.taglib.bean.HeaderTei</teiclass> ! <bodycontent>empty</bodycontent> ! <attribute> ! <name>id</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>multiple</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>name</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>value</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! <tag> ! <name>include</name> ! <tagclass>org.apache.struts.taglib.bean.IncludeTag</tagclass> ! <teiclass>org.apache.struts.taglib.bean.IncludeTei</teiclass> ! <bodycontent>empty</bodycontent> ! <attribute> ! <name>anchor</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>forward</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>href</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>id</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>name</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>page</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>transaction</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! <tag> ! <name>message</name> ! <tagclass>org.apache.struts.taglib.bean.MessageTag</tagclass> ! <bodycontent>empty</bodycontent> ! <attribute> ! <name>arg0</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>arg1</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>arg2</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>arg3</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>arg4</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>bundle</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>key</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>locale</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! <tag> ! <name>page</name> ! <tagclass>org.apache.struts.taglib.bean.PageTag</tagclass> ! <teiclass>org.apache.struts.taglib.bean.PageTei</teiclass> ! <bodycontent>empty</bodycontent> ! <attribute> ! <name>id</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>property</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! <tag> ! <name>parameter</name> ! <tagclass>org.apache.struts.taglib.bean.ParameterTag</tagclass> ! <teiclass>org.apache.struts.taglib.bean.ParameterTei</teiclass> ! <bodycontent>empty</bodycontent> ! <attribute> ! <name>id</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>multiple</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>name</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>value</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! <tag> ! <name>resource</name> ! <tagclass>org.apache.struts.taglib.bean.ResourceTag</tagclass> ! <teiclass>org.apache.struts.taglib.bean.ResourceTei</teiclass> ! <bodycontent>empty</bodycontent> ! <attribute> ! <name>id</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>input</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>name</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! <tag> ! <name>size</name> ! <tagclass>org.apache.struts.taglib.bean.SizeTag</tagclass> ! <teiclass>org.apache.struts.taglib.bean.SizeTei</teiclass> ! <bodycontent>empty</bodycontent> ! <attribute> ! <name>collection</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>id</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>name</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>property</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>scope</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! <tag> ! <name>struts</name> ! <tagclass>org.apache.struts.taglib.bean.StrutsTag</tagclass> ! <teiclass>org.apache.struts.taglib.bean.StrutsTei</teiclass> ! <bodycontent>empty</bodycontent> ! <attribute> ! <name>id</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>formBean</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>forward</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>mapping</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! <tag> ! <name>write</name> ! <tagclass>org.apache.struts.taglib.bean.WriteTag</tagclass> ! <bodycontent>empty</bodycontent> ! <attribute> ! <name>filter</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>ignore</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>name</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>property</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>scope</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! </taglib> ! ! ! --- 1,347 ---- ! <?xml version="1.0" encoding="UTF-8"?> ! ! ! ! ! ! ! ! <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd"> ! <taglib> ! <tlibversion>1.0</tlibversion> ! <jspversion>1.1</jspversion> ! <shortname>bean</shortname> ! <uri>http://jakarta.apache.org/struts/tags-bean-1.0</uri> ! <tag> ! <name>cookie</name> ! <tagclass>org.apache.struts.taglib.bean.CookieTag</tagclass> ! <teiclass>org.apache.struts.taglib.bean.CookieTei</teiclass> ! <bodycontent>empty</bodycontent> ! <attribute> ! <name>id</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>multiple</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>name</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>value</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! <tag> ! <name>define</name> ! <tagclass>org.apache.struts.taglib.bean.DefineTag</tagclass> ! <teiclass>org.apache.struts.taglib.bean.DefineTei</teiclass> ! <bodycontent>empty</bodycontent> ! <attribute> ! <name>id</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>name</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>property</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>scope</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>toScope</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>type</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>value</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! <tag> ! <name>header</name> ! <tagclass>org.apache.struts.taglib.bean.HeaderTag</tagclass> ! <teiclass>org.apache.struts.taglib.bean.HeaderTei</teiclass> ! <bodycontent>empty</bodycontent> ! <attribute> ! <name>id</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>multiple</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>name</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>value</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! <tag> ! <name>include</name> ! <tagclass>org.apache.struts.taglib.bean.IncludeTag</tagclass> ! <teiclass>org.apache.struts.taglib.bean.IncludeTei</teiclass> ! <bodycontent>empty</bodycontent> ! <attribute> ! <name>anchor</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>forward</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>href</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>id</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>name</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>page</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>transaction</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! <tag> ! <name>message</name> ! <tagclass>org.apache.struts.taglib.bean.MessageTag</tagclass> ! <bodycontent>empty</bodycontent> ! <attribute> ! <name>arg0</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>arg1</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>arg2</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>arg3</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>arg4</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>bundle</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>key</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>locale</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! <tag> ! <name>page</name> ! <tagclass>org.apache.struts.taglib.bean.PageTag</tagclass> ! <teiclass>org.apache.struts.taglib.bean.PageTei</teiclass> ! <bodycontent>empty</bodycontent> ! <attribute> ! <name>id</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>property</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! <tag> ! <name>parameter</name> ! <tagclass>org.apache.struts.taglib.bean.ParameterTag</tagclass> ! <teiclass>org.apache.struts.taglib.bean.ParameterTei</teiclass> ! <bodycontent>empty</bodycontent> ! <attribute> ! <name>id</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>multiple</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>name</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>value</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! <tag> ! <name>resource</name> ! <tagclass>org.apache.struts.taglib.bean.ResourceTag</tagclass> ! <teiclass>org.apache.struts.taglib.bean.ResourceTei</teiclass> ! <bodycontent>empty</bodycontent> ! <attribute> ! <name>id</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>input</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>name</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! <tag> ! <name>size</name> ! <tagclass>org.apache.struts.taglib.bean.SizeTag</tagclass> ! <teiclass>org.apache.struts.taglib.bean.SizeTei</teiclass> ! <bodycontent>empty</bodycontent> ! <attribute> ! <name>collection</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>id</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>name</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>property</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>scope</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! <tag> ! <name>struts</name> ! <tagclass>org.apache.struts.taglib.bean.StrutsTag</tagclass> ! <teiclass>org.apache.struts.taglib.bean.StrutsTei</teiclass> ! <bodycontent>empty</bodycontent> ! <attribute> ! <name>id</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>formBean</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>forward</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>mapping</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! <tag> ! <name>write</name> ! <tagclass>org.apache.struts.taglib.bean.WriteTag</tagclass> ! <bodycontent>empty</bodycontent> ! <attribute> ! <name>filter</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>ignore</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>name</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>property</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>scope</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! </taglib> ! ! ! Index: struts-config.xml =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/webapp/resources/struts-config.xml,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** struts-config.xml 10 Feb 2003 20:54:31 -0000 1.16 --- struts-config.xml 27 Nov 2003 01:13:09 -0000 1.17 *************** *** 1,82 **** ! <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd"> ! <struts-config> ! <!-- ========== Data Source Configuration =============================== --> ! <data-sources/> ! <!-- ========== Form Bean Definitions ================================== --> ! <form-beans type="org.apache.struts.action.ActionFormBean"> ! <form-bean name="detailForm" type="org.ejtools.jmx.browser.web.form.DetailForm"/> ! <form-bean name="searchForm" type="org.ejtools.jmx.browser.web.form.SearchForm"/> ! <form-bean name="registerForm" type="org.ejtools.jmx.browser.web.form.RegisterForm"/> ! </form-beans> ! <!-- ========== Global Forward Definitions =============================== --> ! <global-forwards type="org.apache.struts.actions.ActionForward"> ! <forward name="home" path="/connect.do"/> ! </global-forwards> ! <!-- ========== Action Mapping Definitions =============================== --> ! <action-mappings type="org.apache.struts.actions.ActionMapping"> ! <!-- ======================================== --> ! <!-- Connection to JMX Server --> ! <action path="/connect" type="org.ejtools.jmx.browser.web.action.RefreshAction"> ! <forward name="view" path="/index.jsp"/> ! </action> ! <!-- ======================================== --> ! <!-- MBean detail --> ! <action path="/detail" type="org.ejtools.jmx.browser.web.action.DetailAction"> ! <forward name="detail" path="/detail.jsp"/> ! <forward name="error" path="/index.jsp"/> ! </action> ! <!-- ======================================== --> ! <!-- MBean attributes update --> ! <action path="/update" type="org.ejtools.jmx.browser.web.action.UpdateAction" name="detailForm"> ! <forward name="detail" path="/detail.jsp"/> ! <forward name="error" path="/detail.jsp"/> ! </action> ! <!-- ======================================== --> ! <!-- MBean operation invoke --> ! <action path="/invoke" type="org.ejtools.jmx.browser.web.action.InvokeAction"> ! <forward name="result" path="/invoke.jsp"/> ! <forward name="error" path="/invoke.jsp"/> ! </action> ! <!-- ======================================== --> ! <!-- MBean unregistration --> ! <action path="/unregister" type="org.ejtools.jmx.browser.web.action.UnregisterAction"> ! <forward name="error" path="/detail.jsp"/> ! <forward name="view" path="/connect.do"/> ! </action> ! <!-- ======================================== --> ! <!-- Search form display --> ! <action path="/search-form" type="org.ejtools.jmx.browser.web.action.ClearSearchAction"> ! <forward name="view" path="/search.jsp"/> ! <forward name="error" path="/index.jsp"/> ! </action> ! <!-- Search result display --> ! <action path="/search" type="org.ejtools.jmx.browser.web.action.SearchAction" name="searchForm" input="/search.jsp"> ! <forward name="view" path="/search.jsp"/> ! </action> ! <!-- ======================================== --> ! <!-- Admin --> ! <action path="/admin" forward="/admin.jsp"/> ! <action path="/register" type="org.ejtools.jmx.browser.web.action.RegisterAction" name="registerForm" input="/admin.jsp"> ! <forward name="view" path="/connect.do"/> ! </action> ! <!-- ======================================== --> ! <!-- View Notification Broadcasters --> ! <action path="/select-broadcasters" forward="/broadcasters.jsp"/> ! <action path="/register-broadcasters" type="org.ejtools.jmx.browser.web.action.NotificationAction"> ! <forward name="view" path="/notifications.jsp"/> ! <forward name="error" path="/index.jsp"/> ! </action> ! <action path="/view-notifications" forward="/notifications.jsp"/> ! <!-- ======================================== --> ! <!-- Custom Views --> ! <action path="/customview" type="org.ejtools.jmx.browser.web.action.CustomViewAction"> ! <forward name="error" path="/index.jsp"/> ! <forward name="view" path="/customview.jsp"/> ! </action> ! <!-- ======================================== --> ! <!-- Help --> ! <action path="/help" forward="/help.jsp"/> ! </action-mappings> ! <!-- ========== Message Resources Definitions =========================== --> ! </struts-config> --- 1,82 ---- ! <?xml version="1.0" encoding="UTF-8"?> ! <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd"> ! <struts-config> ! <!-- ========== Data Source Configuration =============================== --> ! <data-sources/> ! <!-- ========== Form Bean Definitions ================================== --> ! <form-beans type="org.apache.struts.action.ActionFormBean"> ! <form-bean name="detailForm" type="org.ejtools.jmx.browser.web.form.DetailForm"/> ! <form-bean name="searchForm" type="org.ejtools.jmx.browser.web.form.SearchForm"/> ! <form-bean name="registerForm" type="org.ejtools.jmx.browser.web.form.RegisterForm"/> ! </form-beans> ! <!-- ========== Global Forward Definitions =============================== --> ! <global-forwards type="org.apache.struts.actions.ActionForward"> ! <forward name="home" path="/connect.do"/> ! </global-forwards> ! <!-- ========== Action Mapping Definitions =============================== --> ! <action-mappings type="org.apache.struts.actions.ActionMapping"> ! <!-- ======================================== --> ! <!-- Connection to JMX Server --> ! <action path="/connect" type="org.ejtools.jmx.browser.web.action.RefreshAction"> ! <forward name="view" path="/index.jsp"/> ! </action> ! <!-- ======================================== --> ! <!-- MBean detail --> ! <action path="/detail" type="org.ejtools.jmx.browser.web.action.DetailAction"> ! <forward name="detail" path="/detail.jsp"/> ! <forward name="error" path="/index.jsp"/> ! </action> ! <!-- ======================================== --> ! <!-- MBean attributes update --> ! <action path="/update" type="org.ejtools.jmx.browser.web.action.UpdateAction" name="detailForm"> ! <forward name="detail" path="/detail.jsp"/> ! <forward name="error" path="/detail.jsp"/> ! </action> ! <!-- ======================================== --> ! <!-- MBean operation invoke --> ! <action path="/invoke" type="org.ejtools.jmx.browser.web.action.InvokeAction"> ! <forward name="result" path="/invoke.jsp"/> ! <forward name="error" path="/invoke.jsp"/> ! </action> ! <!-- ======================================== --> ! <!-- MBean unregistration --> ! <action path="/unregister" type="org.ejtools.jmx.browser.web.action.UnregisterAction"> ! <forward name="error" path="/detail.jsp"/> ! <forward name="view" path="/connect.do"/> ! </action> ! <!-- ======================================== --> ! <!-- Search form display --> ! <action path="/search-form" type="org.ejtools.jmx.browser.web.action.ClearSearchAction"> ! <forward name="view" path="/search.jsp"/> ! <forward name="error" path="/index.jsp"/> ! </action> ! <!-- Search result display --> ! <action path="/search" type="org.ejtools.jmx.browser.web.action.SearchAction" name="searchForm" input="/search.jsp"> ! <forward name="view" path="/search.jsp"/> ! </action> ! <!-- ======================================== --> ! <!-- Admin --> ! <action path="/admin" forward="/admin.jsp"/> ! <action path="/register" type="org.ejtools.jmx.browser.web.action.RegisterAction" name="registerForm" input="/admin.jsp"> ! <forward name="view" path="/connect.do"/> ! </action> ! <!-- ======================================== --> ! <!-- View Notification Broadcasters --> ! <action path="/select-broadcasters" forward="/broadcasters.jsp"/> ! <action path="/register-broadcasters" type="org.ejtools.jmx.browser.web.action.NotificationAction"> ! <forward name="view" path="/notifications.jsp"/> ! <forward name="error" path="/index.jsp"/> ! </action> ! <action path="/view-notifications" forward="/notifications.jsp"/> ! <!-- ======================================== --> ! <!-- Custom Views --> ! <action path="/customview" type="org.ejtools.jmx.browser.web.action.CustomViewAction"> ! <forward name="error" path="/index.jsp"/> ! <forward name="view" path="/customview.jsp"/> ! </action> ! <!-- ======================================== --> ! <!-- Help --> ! <action path="/help" forward="/help.jsp"/> ! </action-mappings> ! <!-- ========== Message Resources Definitions =========================== --> ! </struts-config> Index: struts-form.tld =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/webapp/resources/struts-form.tld,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** struts-form.tld 26 Aug 2002 22:33:11 -0000 1.6 --- struts-form.tld 27 Nov 2003 01:13:09 -0000 1.7 *************** *** 1,1705 **** ! <?xml version="1.0" encoding="UTF-8"?> ! ! ! ! ! ! ! ! <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd"> ! <taglib> [...3381 lines suppressed...] ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>style</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>styleClass</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>tabindex</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! </taglib> ! Index: struts-html.tld =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/webapp/resources/struts-html.tld,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** struts-html.tld 26 Aug 2002 22:33:11 -0000 1.6 --- struts-html.tld 27 Nov 2003 01:13:09 -0000 1.7 *************** *** 1,2155 **** ! <?xml version="1.0" encoding="UTF-8"?> ! ! ! ! ! ! ! ! <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd"> ! <taglib> [...4281 lines suppressed...] ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>styleId</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>tabindex</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>value</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! </taglib> ! Index: struts-logic.tld =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/webapp/resources/struts-logic.tld,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** struts-logic.tld 26 Aug 2002 22:33:11 -0000 1.6 --- struts-logic.tld 27 Nov 2003 01:13:09 -0000 1.7 *************** *** 1,562 **** ! <?xml version="1.0" encoding="UTF-8"?> ! ! ! ! ! ! ! <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd"> ! <taglib> ! <tlibversion>1.0</tlibversion> [...1095 lines suppressed...] ! <attribute> ! <name>property</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>scope</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>transaction</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! </taglib> ! ! ! Index: struts-template.tld =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/webapp/resources/struts-template.tld,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** struts-template.tld 26 Aug 2002 22:33:11 -0000 1.6 --- struts-template.tld 27 Nov 2003 01:13:09 -0000 1.7 *************** *** 1,73 **** ! <?xml version="1.0" encoding="UTF-8"?> ! ! ! ! ! ! ! ! <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd"> ! <taglib> ! <tlibversion>1.0</tlibversion> ! <jspversion>1.1</jspversion> ! <shortname>template</shortname> ! <uri>http://jakarta.apache.org/struts/tags-template-1.0</uri> ! <tag> ! <name>insert</name> ! <tagclass>org.apache.struts.taglib.template.InsertTag</tagclass> ! <bodycontent>JSP</bodycontent> ! <attribute> ! <name>template</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! <tag> ! <name>put</name> ! <tagclass>org.apache.struts.taglib.template.PutTag</tagclass> ! <bodycontent>JSP</bodycontent> ! <attribute> ! <name>name</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>role</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>content</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>direct</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! <tag> ! <name>get</name> ! <tagclass>org.apache.struts.taglib.template.GetTag</tagclass> ! <bodycontent>empty</bodycontent> ! <attribute> ! <name>flush</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>name</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>role</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! </taglib> ! ! ! --- 1,73 ---- ! <?xml version="1.0" encoding="UTF-8"?> ! ! ! ! ! ! ! ! <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd"> ! <taglib> ! <tlibversion>1.0</tlibversion> ! <jspversion>1.1</jspversion> ! <shortname>template</shortname> ! <uri>http://jakarta.apache.org/struts/tags-template-1.0</uri> ! <tag> ! <name>insert</name> ! <tagclass>org.apache.struts.taglib.template.InsertTag</tagclass> ! <bodycontent>JSP</bodycontent> ! <attribute> ! <name>template</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! <tag> ! <name>put</name> ! <tagclass>org.apache.struts.taglib.template.PutTag</tagclass> ! <bodycontent>JSP</bodycontent> ! <attribute> ! <name>name</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>role</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>content</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>direct</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! <tag> ! <name>get</name> ! <tagclass>org.apache.struts.taglib.template.GetTag</tagclass> ! <bodycontent>empty</bodycontent> ! <attribute> ! <name>flush</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>name</name> ! <required>true</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>role</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! </taglib> ! ! ! Index: struts.tld =================================================================== RCS file: /cvsroot/ejtools/applications/jmx.browser/src/webapp/resources/struts.tld,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** struts.tld 26 Aug 2002 22:33:11 -0000 1.6 --- struts.tld 27 Nov 2003 01:13:09 -0000 1.7 *************** *** 1,1986 **** ! <?xml version="1.0" encoding="ISO-8859-1" ?> ! <!DOCTYPE taglib ! PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" ! "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd"> ! ! <taglib> ! ! <!-- ============== Tag Library Description Elements ============= --> ! ! <tlibversion>1.0</tlibversion> [...3943 lines suppressed...] ! </attribute> ! <attribute> ! <name>arg2</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>arg3</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! <attribute> ! <name>arg4</name> ! <required>false</required> ! <rtexprvalue>true</rtexprvalue> ! </attribute> ! </tag> ! ! ! </taglib> |