Date: 2004-12-15T04:53:27
   Editor: JacekLaskowski <[EMAIL PROTECTED]>
   Wiki: Apache Geronimo Wiki
   Page: Tomcat
   URL: http://wiki.apache.org/geronimo/Tomcat

   Update

Change Log:

------------------------------------------------------------------------------
@@ -10,80 +10,73 @@
 
 The version of Apache Tomcat is 5.5.4.
 
-= How to run Tomcat GBean =
+= How to run Apache Tomcat =
 
-By default, Geronimo is set up with Jetty as a web container. To enable Apache 
Tomcat, it's necessary to uncomment the sections marked
+By default, Geronimo is set up with Jetty as the web deployer 
(!JettyModuleBuilder). When a webapp is deployed using !JettyModuleBuilder it 
will reference Jetty as a web container. A module builder chooses what 
container the webapp will be deployed to. To enable Apache Tomcat as a web 
container, it's necessary to enable !TomcatModuleBuilder (which will assign 
Apache Tomcat to the deployed webapps). Uncomment the sections marked:
 
  {{{
-<!-- the tomcat module's requirement
-   - uncomment it to run Apache Tomcat as a web container
+<!--
+   - Uncomment it to run Apache Tomcat as a web container
    -
 ...
    -->
 }}}
 
-The files to be changed are:
-
- * modules/assembly/project.xml
- * modules/assembly/src/plan/j2ee-deployer-plan.xml
- * modules/assembly/src/plan/j2ee-server-plan.xml
-
-Don't forget to change the ''port'' attribute value of 
"geronimo.server:type=WebConnector,container=Jetty,port=8080" from 8080 to 
another value (e.g. 8090) as the port number is hardcoded in !TomcatContainer 
(it's the default listen port of the HTTP connector).
+in ''modules/assembly/src/plan/j2ee-deployer-plan.xml''
 
 Once it's done, rebuild the assembly module and start up Geronimo as follows 
(see ["Running"]):
 
- {{{
-java -Djava.endorsed.dirs=c:\apps\jakarta-tomcat\common\endorsed -jar 
bin/server.jar <deployed_webapp_id>
+ {{{java -Djava.endorsed.dirs=c:\apps\jakarta-tomcat\common\endorsed -jar 
bin/server.jar <configuration_id>
 }}}
 
-'''NOTE''': {{{TODO}}}: Describe what's the ''deployed_webapp_id'' identifier
-
 '''NOTE''': ''java.endorsed.dirs'' Java property must be specified on the 
command line as otherwise Tomcat won't be able to find Xerces classes and 
refuses to deploy web applications. So, before running a Tomcat instance within 
Geronimo the compat libraries of Tomcat (jakarta-tomcat-compat-5.5.4.*) will 
have to be installed. Does anyone know how to work it out?
 
-'''NOTE''': CATALINA_HOME environment variable is required to run Tomcat. It's 
set to ''var/catalina/'' (it's not yet possible to change it without touching 
the code)
+'''NOTE''': CATALINA_HOME environment variable is required to run Tomcat. It's 
set to ''var/catalina/'' via the j2ee-server-tomcat-plan.xml
 
-'''NOTE''': Default HTTP connector listens to 8080 port (it's not yet possible 
to change it without touching the code)
+'''NOTE''': Default HTTP connector listens to 8090 port (it's possible to 
change it via the j2ee-server-tomcat-plan.xml)
 
 '''NOTE''': It's not yet possible to configure Tomcat other than it's done by 
default. All configuration settings are currently hardcoded.
 
-A simple start-up of Geronimo with Apache Tomcat and the DebugConsole webapp:
+A simple start-up of Geronimo with Apache Tomcat and the !DebugConsole webapp:
 
  {{{
 $ java -Djava.endorsed.dirs=c\:/apps/jakarta-tomcat/common/endorsed -jar 
bin/server.jar org/apache/geronimo/DebugConsole
-01:26:54,015 INFO  [Daemon] Server startup begun
-01:26:54,095 INFO  [Kernel] Starting boot
-01:26:54,355 INFO  [Kernel] Booted
-01:26:54,376 INFO  [ConfigurationManagerImpl] Loaded Configuration 
geronimo.config:name="org/apache/geronimo/System"
-01:26:54,486 INFO  [Configuration] Started configuration 
org/apache/geronimo/System
-01:26:54,616 INFO  [RMIRegistryService] Started RMI Registry on port 1099
-01:26:54,686 INFO  [ReadOnlyRepository] Repository root is 
file:/C:/projs/geronimo/modules/assembly/target/geronimo-1.0-SNAPSHOT/repository/
-01:26:54,746 INFO  [ConfigurationManagerImpl] Loaded Configuration 
geronimo.config:name="org/apache/geronimo/DebugConsole"
-01:26:54,766 INFO  [ConfigurationManagerImpl] Loaded Configuration 
geronimo.config:name="org/apache/geronimo/Server"
-01:26:55,297 INFO  [Configuration] Started configuration 
org/apache/geronimo/Server
-01:26:55,327 INFO  [HttpServer] Statistics on = false for [EMAIL PROTECTED]
-01:26:55,327 INFO  [HttpServer] Version Jetty/5.1.1
-01:26:55,327 INFO  [Container] Started [EMAIL PROTECTED]
-01:26:55,367 INFO  [HOWLLog] Initiating transaction manager recovery
-01:26:55,437 WARN  [HOWLLog] Received unexpected log record: [EMAIL PROTECTED]
-01:26:55,437 INFO  [HOWLLog] In doubt transactions recovered from log
-01:26:55,537 INFO  [ThreadPool] Thread pool DefaultThreadPool started
-01:26:55,567 INFO  [SocketListener] Started SocketListener on 0.0.0.0:8090
-01:26:55,967 INFO  [Embedded] Starting tomcat server
-01:26:55,967 INFO  [Embedded] Catalina naming disabled
-01:26:56,188 INFO  [StandardEngine] Starting Servlet Engine: Apache 
Tomcat/5.5.4
-01:26:56,198 INFO  [StandardHost] XML validation disabled
-01:26:56,308 INFO  [WebappLoader] Dual registration of jndi stream handler: 
factory already defined
-01:26:56,808 INFO  [ContextConfig] Missing application web.xml, using defaults 
only StandardEngine[tomcat.engine].StandardHost[localhost].StandardContext[]
-01:26:57,049 INFO  [Http11Protocol] Initializing Coyote HTTP/1.1 on http-8080
-01:26:57,109 INFO  [Http11Protocol] Starting Coyote HTTP/1.1 on http-8080
-01:26:57,339 INFO  [GeronimoLoginConfiguration] Added ACE JMX
-01:26:57,339 INFO  [GeronimoLoginConfiguration] Added ACE 
geronimo-properties-realm
-01:26:57,349 INFO  [GeronimoLoginConfiguration] Installed Geronimo login 
configuration
-01:26:57,439 INFO  [server:name=localhost,role=JMXService] Started 
JMXConnector service:jmx:rmi://localhost/jndi/rmi:/JMXConnector
-01:26:57,459 INFO  [SecurityService] Security service started
-01:26:57,669 INFO  [Configuration] Started configuration 
org/apache/geronimo/DebugConsole
-01:26:58,360 INFO  [TomcatWebAppContext] TomcatWebAppContext started
-01:26:58,360 INFO  [Daemon] Server startup completed
+20:15:37,532 INFO  [Daemon] Server startup begun
+20:15:37,612 INFO  [Kernel] Starting boot
+20:15:37,842 INFO  [Kernel] Booted
+20:15:37,883 INFO  [ConfigurationManagerImpl] Loaded Configuration 
geronimo.config:name="org/apache/geronimo/System"
+20:15:37,983 INFO  [Configuration] Started configuration 
org/apache/geronimo/System
+20:15:38,143 INFO  [RMIRegistryService] Started RMI Registry on port 1099
+20:15:38,203 INFO  [ReadOnlyRepository] Repository root is 
file:/C:/projs/geronimo/modules/assembly/target/geronimo-1.0-SNAPSHOT/repository/
+20:15:38,263 INFO  [ConfigurationManagerImpl] Loaded Configuration 
geronimo.config:name="org/apache/geronimo/DebugConsole"
+20:15:38,283 INFO  [ConfigurationManagerImpl] Loaded Configuration 
geronimo.config:name="org/apache/geronimo/Tomcat"
+20:15:38,303 INFO  [ConfigurationManagerImpl] Loaded Configuration 
geronimo.config:name="org/apache/geronimo/Server"
+20:15:38,804 INFO  [Configuration] Started configuration 
org/apache/geronimo/Server
+20:15:38,834 INFO  [HttpServer] Statistics on = false for [EMAIL PROTECTED]
+20:15:38,834 INFO  [HttpServer] Version Jetty/5.1.1
+20:15:38,834 INFO  [Container] Started [EMAIL PROTECTED]
+20:15:38,874 INFO  [HOWLLog] Initiating transaction manager recovery
+20:15:38,934 WARN  [HOWLLog] Received unexpected log record: [EMAIL PROTECTED]
+20:15:38,934 INFO  [HOWLLog] In doubt transactions recovered from log
+20:15:39,024 INFO  [ThreadPool] Thread pool DefaultThreadPool started
+20:15:39,054 INFO  [SocketListener] Started SocketListener on 0.0.0.0:8080
+20:15:39,435 INFO  [GeronimoLoginConfiguration] Added ACE JMX
+20:15:39,435 INFO  [GeronimoLoginConfiguration] Added ACE 
geronimo-properties-realm
+20:15:39,435 INFO  [GeronimoLoginConfiguration] Installed Geronimo login 
configuration
+20:15:39,575 INFO  [server:name=localhost,role=JMXService] Started 
JMXConnector service:jmx:rmi://localhost/jndi/rmi:/JMXConnector
+20:15:39,585 INFO  [SecurityService] Security service started
+20:15:39,645 INFO  [Configuration] Started configuration 
org/apache/geronimo/Tomcat
+20:15:39,936 INFO  [Embedded] Starting tomcat server
+20:15:39,936 INFO  [Embedded] Catalina naming disabled
+20:15:40,286 INFO  [StandardEngine] Starting Servlet Engine: Apache 
Tomcat/5.5.4
+20:15:40,296 INFO  [StandardHost] XML validation disabled
+20:15:40,416 INFO  [WebappLoader] Dual registration of jndi stream handler: 
factory already defined
+20:15:41,127 INFO  [ContextConfig] Missing application web.xml, using defaults 
only StandardEngine[tomcat.engine].StandardHost[localhost].StandardContext[]
+20:15:41,358 INFO  [Http11Protocol] Initializing Coyote HTTP/1.1 on http-8090
+20:15:41,418 INFO  [Http11Protocol] Starting Coyote HTTP/1.1 on http-8090
+20:15:41,658 INFO  [Configuration] Started configuration 
org/apache/geronimo/DebugConsole
+20:15:42,419 INFO  [TomcatWebAppContext] TomcatWebAppContext started
+20:15:42,429 INFO  [Daemon] Server startup completed
 }}}
 
 = Installing Geronimo over one already installed Tomcat (not possible; 
outdated) =
@@ -99,4 +92,4 @@
 
 = A few words on how it works =
 
-The heart of the module is the GBean itself, which is 
org.apache.geronimo.tomcat.!TomcatContainer. TomcatContainer is given a set of 
deployed webapps that are of org.apache.geronimo.tomcat.!TomcatWebAppContext 
type. When a webapp is deployed, a configured !WebModule (aka !WebBuilder) is 
asked for handling it. There're two !WebModules: !JettyModuleBuilder and 
!TomcatModuleBuilder. No matter what builder is used, the idea of deploying the 
webapp is the same. First, !TomcatModuleBuilder creates a plan (wraps it into 
!TomcatWebAppContext) and saves it in the repository (a place where 
configurations are stored). !TomcatWebAppContext's plan contains a reference to 
!TomcatContainer so that when the context starts up it hands itself over to 
!TomcatContainer for deployment.
+The heart of the module is the GBean itself, which is 
org.apache.geronimo.tomcat.!TomcatContainer. !TomcatContainer is given a set of 
deployed webapps that are of org.apache.geronimo.tomcat.!TomcatWebAppContext 
type. When a webapp is deployed, a configured !WebModuleBuilder is asked for 
handling it. There're two !WebModuleBuilders: !JettyModuleBuilder and 
!TomcatModuleBuilder. No matter what builder is used, the idea of deploying the 
webapp is the same. First, !TomcatModuleBuilder creates a plan (wraps it into 
!TomcatWebAppContext) and saves it in the repository (a place where 
configurations are stored). !TomcatWebAppContext's plan contains a reference to 
!TomcatContainer so that when the context starts up it hands itself over to 
!TomcatContainer for deployment. It's therefore important to change the module 
builder if the decision of running Jetty or Tomcat is to be made.

Reply via email to