RE: Tomcat web application stops automatically

2013-04-15 Thread Rishad Ali
These application are running inside tomcat because I was under the impression 
that Tomcat is an application server and I need tomcat to run Java dynamic web 
applications.


-Original Message-
From: André Warnier [mailto:a...@ice-sa.com] 
Sent: 15 April 2013 11:14
To: Tomcat Users List
Subject: Re: Tomcat web application stops automatically

Rishad Ali wrote:
 I have a dedicated server running CentOS 5.9, Apache-Tomcat 5.5.36. I 
 have written a JAVA web applications which runs every minute to 
 collect the data from multiple sensors. I am using 
 ScheduledExecutorService to execute the threads. (one thread for each 
 sensor every minute and there can be more than hundred sensors) The 
 flow of the thread is
 
 1.Collect sensor information from the database.
 
 2.Sends the command to the instrument to collect data.
 
 3.Update the database with the data values.
 
 There is another application that checks the database every minute and 
 send the alerts to the users (if necessary). I have monitored the 
 application using jvisualVM, I cant find any memory leak. for every 
 thread. The applications work fine but after some time(24 Hour - 48
 Hours) the applications stop working. I can't find out what the 
 problem could be, is it server configuration problem, too many threads or 
 what?
 
 This might not be a Tomcat server problem but this could be 
 
 Does anyone have any idea what might be going wrong or is there anyone 
 who has done think kind of work? Please help, Thanks
 
[.. snip .. ]
This may be a naive question, but from your description above it is not clear 
if any of these applications have anything to do with Tomcat, or with a 
webserver environment.
Why would it/they be running inside Tomcat ?

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Tomcat web application stops automatically

2013-04-15 Thread Rishad Ali
I think I mentioned this in the question that I am using
ScheduledExecutorService to start threads every minute. This is not the
application running every minute, these are the threads I create. 
And as I said It works fine for some time then it stops. 

Yes I checked the log but there is no sign of stopping application or
nothing about Too many database connections.





-Original Message-
From: Ralph Plawetzki [mailto:ra...@purejava.org] 
Sent: 15 April 2013 13:11
To: Tomcat Users List
Subject: Re: Tomcat web application stops automatically

Am 15.04.2013 11:31, schrieb Rishad Ali:
 I have a dedicated server running CentOS 5.9, Apache-Tomcat 5.5.36. I 
 have written a JAVA web applications which runs every minute to 
 collect the data from multiple sensors. I am using 
 ScheduledExecutorService to execute the threads. (one thread for each 
 sensor every minute and there can be more than hundred sensors) The 
 flow of the thread is
 
A web application can be deployed to tomcat and when it is deployed it
can be running or not. It can't run every minute.

snip/

 thread. The applications work fine but after some time(24 Hour - 48
 Hours) the applications stop working. I can't find out what the 
 problem
What does that mean? Did you take a look at the tomcat logfiles?

Ralph

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



How to start a continuous java application in tomcat

2012-05-14 Thread Rishad Ali
Hi,

The scenario is: 

I have a java application which collects some data from sensors and
stores in the database. This java application has to run continuously.
On the other hand I have a web application which I am running on tomcat
which collects the data from database and display it on the web.

Database is same for both applications. I don't mind whether the
application runs inside tomcat or outside tomcat.

 

I've tried to make a jar file of the java application and created a
simple web application which uses some classes of the jar file. But it
is not working.

 

Can anyone please tell me how do I do this.

I am sure there should be an easy way to do that.

Thank you.

 

Regards.

 




RE: How to start a continuous java application in tomcat

2012-05-14 Thread Rishad Ali
Hi Hassan,
I don't want to run mash them. I just want to run the java application.
On the local server it is working fine but when I try it in the
dedicated linux server it does not work.
Thank you

-Original Message-
From: Hassan Schroeder [mailto:hassan.schroe...@gmail.com] 
Sent: 14 May 2012 15:30
To: Tomcat Users List
Subject: Re: How to start a continuous java application in tomcat

On Mon, May 14, 2012 at 6:46 AM, Rishad Ali
rishad@turnkey-instruments.com wrote:

 I have a java application which collects some data from sensors and 
 stores in the database. This java application has to run continuously.
 On the other hand I have a web application which I am running on 
 tomcat which collects the data from database and display it on the
web.

They sound like 2 independent applications then, which should *run*
independently.

The fact that they're using the same DB, or sharing some classes, is not
really a good enough reason to mash them together, IMO.

--
Hassan Schroeder  hassan.schroe...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org