tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Gomez <henri.go...@gmail.com>
Subject Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup Bootstrap.java
Date Thu, 15 Sep 2005 10:22:28 GMT
Happy to see Costin is back :)

15 Sep 2005 06:04:01 -0000, costin@apache.org <costin@apache.org>:
> costin      2005/09/14 23:04:01
> 
>   Modified:    catalina/src/share/org/apache/catalina/startup
>                         Bootstrap.java
>   Log:
>   Support for corner case, when all tomcat is in a single jar and no fancy classloaders
are used.
> 
>   Revision  Changes    Path
>   1.23      +9 -5      jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/Bootstrap.java
> 
>   Index: Bootstrap.java
>   ===================================================================
>   RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/Bootstrap.java,v
>   retrieving revision 1.22
>   retrieving revision 1.23
>   diff -u -r1.22 -r1.23
>   --- Bootstrap.java    3 May 2005 14:12:52 -0000       1.22
>   +++ Bootstrap.java    15 Sep 2005 06:04:01 -0000      1.23
>   @@ -95,6 +95,10 @@
>        private void initClassLoaders() {
>            try {
>                commonLoader = createClassLoader("common", null);
>   +            if( commonLoader == null ) {
>   +                // no config file, default to this loader - we might be in a 'single'
env.
>   +                commonLoader=this.getClass().getClassLoader();
>   +            }
>                catalinaLoader = createClassLoader("server", commonLoader);
>                sharedLoader = createClassLoader("shared", commonLoader);
>            } catch (Throwable t) {
>   @@ -122,10 +126,10 @@
>                // Local repository
>                boolean packed = false;
>                if (repository.startsWith(CATALINA_HOME_TOKEN)) {
>   -                repository = getCatalinaHome()
>   +                repository = getCatalinaHome()
>                        + repository.substring(CATALINA_HOME_TOKEN.length());
>                } else if (repository.startsWith(CATALINA_BASE_TOKEN)) {
>   -                repository = getCatalinaBase()
>   +                repository = getCatalinaBase()
>                        + repository.substring(CATALINA_BASE_TOKEN.length());
>                }
> 
>   @@ -159,14 +163,14 @@
>            // Retrieving MBean server
>            MBeanServer mBeanServer = null;
>            if (MBeanServerFactory.findMBeanServer(null).size() > 0) {
>   -            mBeanServer =
>   +            mBeanServer =
>                    (MBeanServer) MBeanServerFactory.findMBeanServer(null).get(0);
>            } else {
>                mBeanServer = MBeanServerFactory.createMBeanServer();
>            }
> 
>            // Register the server classloader
>   -        ObjectName objectName =
>   +        ObjectName objectName =
>                new ObjectName("Catalina:type=ServerClassLoader,name=" + name);
>            mBeanServer.registerMBean(classLoader, objectName);
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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