Managing Tomcat Connections - Newbie

2004-04-12 Thread David Langschied
Hi all!
I am using Tomcat (4.1.24) through my app vendor.  I
want to be able to manage my connections from the
command line.  I have found some info on ant and
being able to do things like start/stop/reload/etc.  I
have not seen how this can be applied to managing
connections.

Here is my problem in a nut shell:

When Tomcat starts, I get a minimum number of
connections, let's say this is 2 and a maximum of 20. 
What is happening is that Tomcat is opening new
sessions each and every time that a new session is
requested.  This number eventually reaches 20.  

At that point, I may have only two busy sessions and
the remaining 18 are idle.  These idle sessions are
considered as resources connected to my database.  I
have top keep the number of resources down as low as
possible.  These idle sessions need to be trimmed if
they have been in an idle state for too long.  

Is there any way of doing this with Tomcat from the
command line?

 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Managing Tomcat Connections - Newbie

2004-04-12 Thread David Langschied
I can certainly shorten the session timeout.  

When a user connects to the application, this does not
generate a any activity in Tomcat.  When the user
accesses a program, then the user is using a
connection.  This connection is part of a connection
pool.  What I find odd is that the connection used is
not the oldest idle session, but a new connection is
created (if the max has not been reached).  On top of
this, the minimum idle sessions do not get used unless
the max has been reached and all of the sessions above
min are busy,

Is this the way Tomcat functions or just the way the
application is accessing Tomcat?

--- Shapira, Yoav [EMAIL PROTECTED] wrote:
 
 Hi,
 There's no way to manage connections from the
 command line, and you
 probably don't want to do it anyways.  Consider:
 - Using shorter session timeouts (change from the
 default 30 minutes to
 3 for example),
 - Redesigning your app so that a session doesn't
 have a one to one
 correlation with a database connection.  That leads
 to horrible
 scalability anyhow.  Use a connection pool.
 
 Yoav Shapira
 Millennium Research Informatics
 
 
 -Original Message-
 From: David Langschied
 [mailto:[EMAIL PROTECTED]
 Sent: Monday, April 12, 2004 10:02 AM
 To: [EMAIL PROTECTED]
 Subject: Managing Tomcat Connections - Newbie
 
 Hi all!
 I am using Tomcat (4.1.24) through my app vendor. 
 I
 want to be able to manage my connections from the
 command line.  I have found some info on ant and
 being able to do things like start/stop/reload/etc.
  I
 have not seen how this can be applied to managing
 connections.
 
 Here is my problem in a nut shell:
 
 When Tomcat starts, I get a minimum number of
 connections, let's say this is 2 and a maximum of
 20.
 What is happening is that Tomcat is opening new
 sessions each and every time that a new session is
 requested.  This number eventually reaches 20.
 
 At that point, I may have only two busy sessions
 and
 the remaining 18 are idle.  These idle sessions are
 considered as resources connected to my database. 
 I
 have top keep the number of resources down as low
 as
 possible.  These idle sessions need to be trimmed
 if
 they have been in an idle state for too long.
 
 Is there any way of doing this with Tomcat from the
 command line?
 
 
 

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



RE: Managing Tomcat Connections - Newbie

2004-04-12 Thread David Langschied
Since I am a newbie, I may not be getting the point
across effectively by mixing terms.

I have the ability to go to my connection manager and
see a graphic representation of the current
connections be they idle, busy, or initializing. 
Therefore, please disregard the term session.  What I
am referring to is these connections.

On the other point of connection pool, I may be wrong,
via terminology, on this as well.  I have these
connections out there and they are connected to my
database and waiting for activity.  If this is not a
connection pool, I need to find out more about this
method.


--- Shapira, Yoav [EMAIL PROTECTED] wrote:
 
 Hi,
 
 What I find odd is that the connection used is
 not the oldest idle session
 
 Please clarify this, as a connection is not a
 session.
 
 If you're using a tomcat-managed connection pool,
 you're most likely
 using DBCP.  The full docs for DBCP, which include
 significant tuning
 abilities regarding connection usage and creation,
 are at
 http://jakarta.apache.org/commons/dbcp/.
 
 Yoav Shapira
 
 
 
 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]



Starting and stopping connections in Tomcat 4.2

2004-04-06 Thread David Langschied
Hi all!
I have an app that uses Tomcat to make connections to
a Progress database.  They have a web based tool to
manage these connections, but I would like to be able
to control these connections from the command line. 
Does Tomcat have utilities to manage these connections
from the command line?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]