tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amy Roh" <amy...@apache.org>
Subject Re: cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans MBeanFactory.java ServerLifecycleListener.java
Date Tue, 11 Mar 2003 19:48:52 GMT
> amyroh@apache.org wrote:
>
> > amyroh      2003/03/10 19:25:52
> >
> >   Modified:    catalina/src/share/org/apache/catalina/mbeans
> >                         MBeanFactory.java ServerLifecycleListener.java
> >   Log:
> >   Set to use JSR77 names as default.
>
> Please make sure tomcat 5 is also updated.

Of course I was planning to do so.  ;-)

Question:
Is there a way to get the service name from jsr77 context name?  Currently,
it's not included in its object name.

Thanks,
Amy

>
> I would do it in reverse - first tc5 and then backport.
>
>
> Costin
>
>
> >
> >   Revision  Changes    Path
> >   1.41      +11 -8
> >
>
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanFactor
y.java
> >
> >   Index: MBeanFactory.java
> >   ===================================================================
> >   RCS file:
> >
>
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/M
BeanFactory.java,v
> >   retrieving revision 1.40 retrieving revision 1.41
> >   diff -u -r1.40 -r1.41
> >   --- MBeanFactory.java       19 Sep 2002 22:55:48 -0000      1.40
> >   +++ MBeanFactory.java       11 Mar 2003 03:25:52 -0000      1.41
> >   @@ -1227,13 +1227,16 @@
> >         *
> >         * @exception Exception if a component cannot be removed
> >         */
> >   -    public void removeContext(String name) throws Exception {
> >   +    public void removeContext(String name, String pname) throws
> >   Exception {
> >
> >            // Acquire a reference to the component to be removed
> >            ObjectName oname = new ObjectName(name);
> >   -        String serviceName = oname.getKeyProperty("service");
> >   -        String hostName = oname.getKeyProperty("host");
> >   -        String contextName =
getPathStr(oname.getKeyProperty("path"));
> >   +        ObjectName poname = new ObjectName(pname);
> >   +        String serviceName = poname.getKeyProperty("service");
> >   +        String hostName = poname.getKeyProperty("host");
> >   +        String pathname = oname.getKeyProperty("name");
> >   +        String path = pathname.substring(pathname.lastIndexOf('/'));
> >   +        String contextName = getPathStr(path);
> >            Server server = ServerFactory.getServer();
> >            Service service = server.findService(serviceName);
> >            Engine engine = (Engine) service.getContainer();
> >
> >
> >
> >   1.38      +5 -4
> >
>
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/ServerLifec
ycleListener.java
> >
> >   Index: ServerLifecycleListener.java
> >   ===================================================================
> >   RCS file:
> >
>
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/S
erverLifecycleListener.java,v
> >   retrieving revision 1.37 retrieving revision 1.38
> >   diff -u -r1.37 -r1.38
> >   --- ServerLifecycleListener.java    12 Feb 2003 22:11:27 -0000
1.37
> >   +++ ServerLifecycleListener.java    11 Mar 2003 03:25:52 -0000
1.38
> >   @@ -367,6 +367,7 @@
> >
> >            try {
> >
> >   +            setJsr77Names(true);
> >                MBeanFactory factory = new MBeanFactory();
> >                createMBeans(factory);
> >                createMBeans(ServerFactory.getServer());
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message