Google Answers Logo
View Question
 
Q: Differences between Tomcat for Windows and Linux? ( No Answer,   1 Comment )
Question  
Subject: Differences between Tomcat for Windows and Linux?
Category: Computers > Programming
Asked by: dmitrovitch-ga
List Price: $40.00
Posted: 24 Aug 2005 15:12 PDT
Expires: 23 Sep 2005 15:12 PDT
Question ID: 559953
I warn the following is an eyeful; this is the most I could condense it to.

I'm currently developing an application that uses Tomcat (and
PHP/MySQL in some capacity). For local development, I use Windows XP.
For production, I use RHEL AS.

To give a brief blurb about what I'm doing (I believe the problem
involves some type of threading relevant to Tomcat, but I could be
wrong), I'm essentially writing an application that allows instant
messaging to selected groups of people through a browser (with a bunch
of other domain related knowledge, but that's moving beyond the
point).

A basic workflow is that an admin will go to a PHP page and will
login. admin can then send a message to a group of people. PHP will
make a CURL call to a servlet, which then uses a library to send out
messages through the installed Jabber server.

The most basic way of stating the problem is that when an admin hits
'submit' on the php page, the messages will get through, if the
servlet is on the Windows Tomcat but won't if on the Linux Tomcat.
I've put in some debugging statements, and wierdly, in both cases, the
servlet receives the sent message and are able to send them out
'successfully' (the library says), but the end client, which which
uses a library to create a connection to the Jabber server, only gets
the message if sent through Windows Tomcat and not Linux Tomcat.

Here?s the kicker. If an admin sends a message through the PHP page,
when it?s set to make a curl call to a servlet on the Linux Tomcat,
message will be seen by the Linux Tomcat, and it will attempt to send
it and will say it was ?successful? (I put in quotes, since the
library does an async send [I believe, and can?t wait for
confirmation]), but message won?t get sent. But, if after you
submitted the message on PHP page, you refresh the page (and hit yes
to REPOST the data) a few times in rapid pace, it will get sent. It?s
pretty variable how many times you need to REPOST. And, to clarify,
when making the PHP page setup to make a curl call to the Windows
Tomcat, it will only take one submission for the instance to see
message and then to send it out successful to where end client will
receive it.

To go into more of the debugging statement, I want to say, completely
subjectively based on the Tomcat stdout I see, that when the admin
sends a message, the tomcat will wait for each 'send message through
jabber' to finish before waiting to continue. While when ssh'ing to
the Linux Tomcat, when an admin sends a message, all the messages will
seem to be sent at same time. This may have to do with lag time of SSH
and whatever else there might be on the internet.

There's a litany of technologies involved, including a
db/jabber/tomcat/php server, but I think I've narrowed it down to
Tomcat. Specifically, my local dev environment uses the remote
db/jabber server. PHP shouldn't be an issue, since it just makes a
CURL call to a servlet. The only point of variability, to my
knowledge, is whether or not I'm using the local or remote Tomcat
server. I've also copied over the config files from the local Tomcat
install to the remote Tomcat install.

If relevant, I'm using
j2sdk1.4.2_06 on Windows / j2sdk1.4.2_08 on Linux
Tomcat 5.5 (Windows binaries / Linux binaries)
jabberd-2.0s7 (jabber server on linux)
mysql-server-3.23.58-1 (houses jabber info + app info) on Linux
smack-1.5.0 (java library end client and servlet uses to connect to jabber server)

An answer will be able to tell me what the difference between Tomcat
for Windows/Linux are *such that* it will fix the problem I'm
encountering. Another criteria for a successful answer, if it's not a
Tomcat issue, will give me the required information to fix the
problems I'm encountering.

That was a total eyeful, but I'm getting at my wit's end here, so any
help would be appreciated. If needing more information, please state
as such.

Clarification of Question by dmitrovitch-ga on 24 Aug 2005 15:17 PDT
I should note that I need a response extremely quickly, less than 24 hours.
Answer  
There is no answer at this time.

Comments  
Subject: Re: Differences between Tomcat for Windows and Linux?
From: apadmana-ga on 24 Aug 2005 18:40 PDT
 
Here is my 2 cents worth...

It appears there are too many variables in your project.. My
suggestion is to narrow down the problem to the Tomcat-library layer.
If Tomcat/servlet(both versions) is receiving the POST requests from
the PHP page, I would'nt worry about the PHP script or servlet. Start
by writing a simple multithreaded Java client for the library and try
posting messages to it. If there is anyway to increase the granularity
of the logging within the library, turn it on. Redirect all log
messages to a file. Source code for the library will also help and
allows for debugging the problem further. Hope this helps!

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy