tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Costin Manolache <cmanola...@yahoo.com>
Subject Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup Bootstrap.java
Date Sat, 17 Sep 2005 03:23:20 GMT
I have few weeks, I'm trying to sync up some of the few changes I made 
in the last year before the code is moved to svn and try a bit more
the 'embedded' scenario ( both single-jar tomcat - that actually works 
well, and also coyote-only ).

I uploaded 2 jars at http://people.apache.org/~costin/mini - one has 
full jasper, the other only the jsp runtime. There are still few 
requirements  on the dir structure - you need to have the conf/web.xml, 
work/, webapps/, but besides that it's just 'java -jar 
tomcat+jasper.jar', no extra jars required.

tomcat-http11.jar is just coyote, with a javascript adapter as example ( 
  let me know if you want to play with it, I'll send additional info ).

Costin


Henri Gomez wrote:
> 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