Load balance in tomcat
Hi! Which is the best way to load balance, across multiple tomcat instances, without using jk conectors or apache web servers? Is there support for it in the Catalina core? Thanks, Henrique Faria Senior Consultant Java Software Team tel:55.11.3285 4699 cel:55.11.9811 8281 fax: 55.11.3266 5121 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Getting only Response 400 when implementing a new connector for Tomcat 5
I´ve been trying to write a Dummy Conector to Tomcat just to learn how I must call an Adapter. It´s the first step to write a ISO-8583 connector. For that, I instancialize an Request and Response (org.apache.coyote), and set all attributes that I think to be necessary : request = new Request(); response = new Response(); ByteChunk inputChunk = new ByteChunk(); InputBuffer inputBuffer = new ByteChunkInputBuffer(new ByteChunk()); OutputBuffer outputBuffer = new ByteChunkOutputBuffer(new ByteChunk()); request.setInputBuffer(inputBuffer); response.setOutputBuffer(outputBuffer); // construct a fake request request.setResponse(response); request.setInputBuffer(inputBuffer); request.protocol().setString(HTTP/1.1); request.query().setString(); request.method().setString(GET); request.scheme().setString(http); request.serverName().setString(jlima-dsk1); request.requestURI().setString(/WebModule/servlet1); request.unparsedURI().setString(/WebModule/servlet1); request.queryString().setString(); request.setStartTime(System.currentTimeMillis()); After that, I try to invoke the container via an Adapter ( org.apache.coyote ), and finally I print the response. adapter.service(request,response); But what I got from the response is quit strange. I always get an 400 error, even when the host exist. org.apache.coyote.Response.getMessage() = No Host matches server name jlima-dsk1 org.apache.coyote.Response.getStatus() = 400 Do anybody know what I´m doing wrong ? PS: I´m using J2SDK 1.4.2 and Tomcat 5. Henrique Faria Senior Consultant Java Software Team tel:55.11.3285 4699 cel:55.11.9811 8281 fax:55.11.3266 5121 [EMAIL PROTECTED] Júlio Melhado Lima Senior Consultant Java Software Team tel:55.11.3285 4699 cel:55.11.9811 8281 fax:55.11.3266 5121 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RES: Getting only Response 400 when implementing a new connector for Tomcat 5
The whole problem was due to the protocol attribute of the connector element, in the server.xml. We didn't set it. Actually, we extended the CoyoteConnector class, overriding setProtocol() method, which called super.setProtocol(), if the protocol didn't match our string protocol. Thanks anyway! Henrique Faria Senior Consultant Java Software Team tel:55.11.3285 4699 cel:55.11.9811 8281 fax: 55.11.3266 5121 [EMAIL PROTECTED] -Mensagem original- De: Remy Maucherat [mailto:[EMAIL PROTECTED] Enviada em: Monday, August 02, 2004 6:37 PM Para: Tomcat Developers List Assunto: Re: Getting only Response 400 when implementing a new connector for Tomcat 5 Bill Barker wrote: The Adapter implementation is expecting that the requestURI is of type BYTE. It doesn't deal well with type STRING. I don't think the latest 5.0.x code has these limitations anymore. Rémy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Developing a new tomcat connector
Hello! Has anyone already developed a non http tomcat connector in java? We're wondering if it is possible to implement connectors, for other protocols, to work within tomcat infrastructure. For now, we're analyzing the existing http classes, and trying to understand its functionality. The next step would be implement classes like MyProtocolConnector, MyProtocolProcessor, MyProtocolRequest, MyProtocolResponse for the new connector, so we could use a servlet based layer, inside our middleware, to process different kinds of transactions. Is tomcat too much http driven for us to try it? Thanks, Henrique Faria Senior Consultant Java Software Team tel:55.11.3285 4699 cel:55.11.9811 8281 fax:55.11.3266 5121 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RES: Developing a new tomcat connector
Yoav, One of the protocols we're going to work with is the ISO8583. Do you know some project similar to ours? We want to know the viability of implementing JAVA non http connectors... I downloaded the JK2 source code. It's in C! We have already deployed a dummy connector through the server.xml, that just echoes the request to the client. Thanks, Henrique Faria Senior Consultant Java Software Team tel:55.11.3285 4699 cel:55.11.9811 8281 fax:55.11.3266 5121 [EMAIL PROTECTED] -Mensagem original- De: Shapira, Yoav [mailto:[EMAIL PROTECTED] Enviada em: Friday, July 23, 2004 4:39 PM Para: Tomcat Developers List Assunto: RE: Developing a new tomcat connector Hi, There's the AJP connector in Tomcat itself, you can take a look at that. Depending on your protocol and requirements, you might be able to reuse CoyoteRequest/Response and their Facades, and only focus on the ProtoclProcessor. Yoav Shapira Millennium Research Informatics -Original Message- From: Henrique Faria [mailto:[EMAIL PROTECTED] Sent: Friday, July 23, 2004 3:35 PM To: [EMAIL PROTECTED] Subject: Developing a new tomcat connector Hello! Has anyone already developed a non http tomcat connector in java? We're wondering if it is possible to implement connectors, for other protocols, to work within tomcat infrastructure. For now, we're analyzing the existing http classes, and trying to understand its functionality. The next step would be implement classes like MyProtocolConnector, MyProtocolProcessor, MyProtocolRequest, MyProtocolResponse for the new connector, so we could use a servlet based layer, inside our middleware, to process different kinds of transactions. Is tomcat too much http driven for us to try it? Thanks, Henrique Faria Senior Consultant Java Software Team tel: 55.11.3285 4699 cel: 55.11.9811 8281 fax: 55.11.3266 5121 [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]