geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From threepointsomething <buz...@gmail.com>
Subject Re: Tomcat connectors
Date Thu, 09 Aug 2007 19:21:56 GMT

Great!

I followed your suggestions and am now able to configure the connector via
config.xml. Here are the steps:

1. Ensure the server is not running.
2. Disable the BIO connector by making the following change in
var\config\config.xml:

Remove the element &lt;gbean name="TomcatWebConnector"&gt; or change it to
&lt;gbean name="TomcatWebConnector" load="false"&gt;

3. Add the NIO connector by adding the following to var\config\config.xml:

	&lt;gbean
gbeanInfo="org.apache.geronimo.tomcat.connector.Http11NIOConnectorGBean"
name="org.apache.geronimo.configs/tomcat6/2.0.1-SNAPSHOT/car?ServiceModule=org.apache.geronimo.configs/tomcat6/2.0.1-SNAPSHOT/car,j2eeType=GBean,name=TomcatNIOConnector"&gt;
            &lt;attribute name="port"&gt;${HTTPPortPrimary +
PortOffset}&lt;/attribute&gt;
            &lt;attribute name="redirectPort"&gt;${HTTPSPortPrimary +
PortOffset}&lt;/attribute&gt;
            &lt;attribute name="maxThreads"&gt;150&lt;/attribute&gt;
            &lt;attribute
name="connectionTimeout"&gt;60000&lt;/attribute&gt;
            &lt;attribute
name="name"&gt;TomcatNIOConnector&lt;/attribute&gt;
            &lt;attribute name="host"&gt;${ServerHostname}&lt;/attribute&gt;
            &lt;reference name="TomcatContainer"&gt;
                &lt;pattern&gt;
                   
&lt;groupId&gt;org.apache.geronimo.configs&lt;/groupId&gt;
                    &lt;artifactId&gt;tomcat6&lt;/artifactId&gt;
                    &lt;version&gt;2.0.1-SNAPSHOT&lt;/version&gt;
                    &lt;type&gt;car&lt;/type&gt;
                    &lt;name&gt;TomcatWebContainer&lt;/name&gt;
                &lt;/pattern&gt;
            &lt;/reference&gt;
            &lt;reference name="ServerInfo"&gt;
                &lt;pattern&gt;
                   
&lt;groupId&gt;org.apache.geronimo.configs&lt;/groupId&gt;
                    &lt;artifactId&gt;j2ee-system&lt;/artifactId&gt;
                    &lt;version&gt;2.0.1-SNAPSHOT&lt;/version&gt;
                    &lt;type&gt;car&lt;/type&gt;
                    &lt;name&gt;ServerInfo&lt;/name&gt;
                &lt;/pattern&gt;
            &lt;/reference&gt;
        &lt;/gbean&gt;

4. Start Geronimo. You should see the following:

  Listening on Ports:
    1050 127.0.0.1 CORBA Naming Service
    1099 0.0.0.0   RMI Naming
    1527 0.0.0.0   Derby Connector
    2001 127.0.0.1 OpenEJB ORB Adapter
    4201 0.0.0.0   OpenEJB Daemon
    6882 127.0.0.1 OpenEJB ORB Adapter
    8009 0.0.0.0   Tomcat Connector AJP AJP
    8080 0.0.0.0   Tomcat Connector HTTP NIO TomcatNIOConnector
    8080 0.0.0.0   Tomcat Connector HTTP BIO HTTP
    8443 0.0.0.0   Tomcat Connector HTTPS BIO HTTPS
    9999 0.0.0.0   JMX Remoting Connector
   61613 0.0.0.0   ActiveMQ Transport Connector
   61616 0.0.0.0   ActiveMQ Transport Connector

(It seems to show 8080 with a BIO connector as well. Is this a bug?)

Gautham.


djencks wrote:
> 
> 
> On Aug 9, 2007, at 11:18 AM, threepointsomething wrote:
> 
>>
>> I am quite new to Geronimo, so I am not sure if the steps I  
>> followed are
>> right. Here goes:
>>
>> I had to ensure that the NIO connector is picked up in place of the  
>> basic
>> HTTP connector, so I made the following change in
>> configs\tomcat6\src\plan\plan.xml:
>>
>> &lt;gbean name="TomcatWebConnector"
>> class="org.apache.geronimo.tomcat.connector.Http11NIOConnectorGBean"&g 
>> t;
>>
>> I then rebuilt config\tomcat6\. When I started Geronimo, it picked  
>> up the
>> NIO connector as expected.
>>
>>   Listening on Ports:
>>     1050 127.0.0.1 CORBA Naming Service
>>     1099 0.0.0.0   RMI Naming
>>     1527 0.0.0.0   Derby Connector
>>     2001 127.0.0.1 OpenEJB ORB Adapter
>>     4201 0.0.0.0   OpenEJB Daemon
>>     6882 127.0.0.1 OpenEJB ORB Adapter
>>     8009 0.0.0.0   Tomcat Connector AJP AJP
>>     8080 0.0.0.0   Tomcat Connector HTTP NIO HTTP
>>     8443 0.0.0.0   Tomcat Connector HTTPS BIO HTTPS
>>     9999 0.0.0.0   JMX Remoting Connector
>>    61613 0.0.0.0   ActiveMQ Transport Connector
>>    61616 0.0.0.0   ActiveMQ Transport Connector
>>
>> I then ran a sample comet application (WAR) that was executing  
>> properly in
>> Tomcat and tried it in this instance of Geronimo. Seemed to work fine.
>>
>> I was wondering if there is a simpler way of configuring NIO  
>> without having
>> to rebuild config\tomcat6. If so can you please suggest how I can  
>> do that?
> 
> Well, I expect we actually want to ship with the NIO connectors used  
> by default anyway, like we do for jetty.
> 
> However until we get there you can either turn off the BIO connector  
> and add a NIO connector in var/config/config.xml or turn off the BIO  
> connector in config.xml and add the appropriate connector to the  
> geronimo plan for your app.  You can add the NIO connector using the  
> admin console, but I think you need to turn off the BIO connector by  
> editing config.xml when geronimo is not running.  add the attribute  
> load="false" to the gbean entry for the BIO connector.
> 
> Hope this helps
> david jencks
> 
> 
>>
>> Thanks,
>> Gautham.
>>
>> -- 
>> View this message in context: http://www.nabble.com/Tomcat- 
>> connectors-tf4132628s134.html#a12077742
>> Sent from the Apache Geronimo - Dev mailing list archive at  
>> Nabble.com.
>>
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Tomcat-connectors-tf4132628s134.html#a12078907
Sent from the Apache Geronimo - Dev mailing list archive at Nabble.com.


Mime
View raw message