Re: Tomcat connectors

2007-08-09 Thread threepointsomething

I was finally able to get Comet to work in Geronimo using the Tomcat NIO
connector.

Thanks,
Gautham.

Paul McMahan-2 wrote:
 
 This work is complete now and available in trunk and the 2.0 branch.   
 As a side effect of introducing these new connectors we needed to  
 make some changes to the management apis (mainly WebManager) to allow  
 the connectors to specify which attributes they support, what their  
 types are (string, boolean, integer, etc), whether or not they are  
 required vs. optional, etc.  All this used to be hard coded in the  
 portlet but now they are defined per connector type in  
 JettyManagerImpl and TomcatManagerImpl and the portlet just renders a  
 form with corresponding inputs and validation.
 
 I tried to cover as much testing as possible within our proposed  
 timeframe for 2.0 but there may still be some rough edges.   In  
 particular I was not able to test the APR connectors without having  
 the native libraries.  You can successfully create an APR connector  
 but without the libraries it won't start due to an unsatisfied link  
 error (as expected).
 
 Thanks to Jeff and David Jencks for all their help on getting this  
 important feature into 2.0.
 
 Best wishes,
 Paul
 
 On Jul 25, 2007, at 1:43 PM, Jeff Genender wrote:
 
 Ok I added a whole bunch of new connectors in the o.a.g.t.connectors
 package.

 I am still working on APR - more notes to follow on this as its a  
 little
 squirly since the Tomcat Connector somewhat chooses this  
 automatically
 based on the existence of a native libraries.  For the console we may
 wish to do a check on whether the native libs exist, and if so,  
 present
 the APR connector.  More on this in another email.

 Here are the connectors we care about at the moment...

 AJP13ConnectorGBean - Implements AJP
 Http11ConnectorGBean - Implements blocking Http connector
 Https11ConnectorGBean  - Implements blocking Https connector
 Http11NIOConnectorGBean - Implements non-blocking Http connector
 Https11NIOConnectorGBean - Implements non-blocking Https connector

 I have not wired them into the container and other GBeans yet...I want
 to clena them up and get any feedback before making the switch since
 this obviously will impact the console upon wiring them in.

 As a side note...I am not using any references to the WebManager or
 other interfaces we used that hooked into the console.  We can re-add
 those if those are deemed necessary.

 Jeff

 Paul McMahan wrote:
 I agree NIO support would be great to have in 2.0, especially  
 since its
 required for comet.

 Best wishes,
 Paul

 On Jul 23, 2007, at 2:42 PM, Jeff Genender wrote:

 Hi,

 I was going through some JIRAs and the Geronimo2.0 source and  
 noticed it
 will be difficult at best to get the NIO connector and setting
 attributes on the APR connector for Tomcat due to its current
 implementation.  I really think the ability to use these 2  
 connectors is
 very important for the 2.0 release and I would like to put these  
 in.  If
 there are no objections, I would like this to be a part of the 2.0
 release.

 Jeff
 
 
 

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



Re: Tomcat connectors

2007-08-09 Thread threepointsomething

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.Http11NIOConnectorGBeangt;

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
 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?

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.



Re: Tomcat connectors

2007-08-09 Thread threepointsomething

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=TomcatWebConnectorgt; or change it to
lt;gbean name=TomcatWebConnector load=falsegt;

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=TomcatNIOConnectorgt;
lt;attribute name=portgt;${HTTPPortPrimary +
PortOffset}lt;/attributegt;
lt;attribute name=redirectPortgt;${HTTPSPortPrimary +
PortOffset}lt;/attributegt;
lt;attribute name=maxThreadsgt;150lt;/attributegt;
lt;attribute
name=connectionTimeoutgt;6lt;/attributegt;
lt;attribute
name=namegt;TomcatNIOConnectorlt;/attributegt;
lt;attribute name=hostgt;${ServerHostname}lt;/attributegt;
lt;reference name=TomcatContainergt;
lt;patterngt;
   
lt;groupIdgt;org.apache.geronimo.configslt;/groupIdgt;
lt;artifactIdgt;tomcat6lt;/artifactIdgt;
lt;versiongt;2.0.1-SNAPSHOTlt;/versiongt;
lt;typegt;carlt;/typegt;
lt;namegt;TomcatWebContainerlt;/namegt;
lt;/patterngt;
lt;/referencegt;
lt;reference name=ServerInfogt;
lt;patterngt;
   
lt;groupIdgt;org.apache.geronimo.configslt;/groupIdgt;
lt;artifactIdgt;j2ee-systemlt;/artifactIdgt;
lt;versiongt;2.0.1-SNAPSHOTlt;/versiongt;
lt;typegt;carlt;/typegt;
lt;namegt;ServerInfolt;/namegt;
lt;/patterngt;
lt;/referencegt;
lt;/gbeangt;

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
 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.Http11NIOConnectorGBeang 
 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
  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