RE: Tomcat 5.0 Datasource Realm and Cluster/load balance web servers

2006-04-10 Thread Manisha Sathe
Thanks for the reply, Do you mean to say that not
Tomcat but load balancer will do the replication job?
So user and roles will be still available in another
server. 

regards
manisha

--- "Farrow, Marc" <[EMAIL PROTECTED]> wrote:

> Depending on the load balancer, most sessions are
> replicated across the load
> balancer.  *shrug*
> 
> -Original Message-
> From: Manisha Sathe
> [mailto:[EMAIL PROTECTED]
> Sent: Monday, April 10, 2006 11:05 AM
> To: Tomcat Users List
> Subject: Tomcat 5.0 Datasource Realm and
> Cluster/load balance web servers
> 
> I am using form based Datasource Realm for
> authentication and authorization. Also need to
> consider clustering/loadbalancing of web server (in
> this case Tomcat). In docs it is written for Realm
> as
> follows
> 
> "Once a user has been authenticated, the user (and
> his
> or her associated roles) are cached within Tomcat
> for
> the duration of the user's login. 
> The cached user is not saved and restored across
> sessions serialisations."
> 
> I am worried about last line - whether it means that
> it does not support loadbalance techniques ? So if
> next request from user (who is logged in previously)
> goes to another server, then user needs to login
> again? What is the solution for this?
> 
> Thanks in advance,
> 
> regards
> Manisha
> 
> 
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com
> 
>
-
> 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]
> 
> 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



Tomcat 5.0 Datasource Realm and Cluster/load balance web servers

2006-04-10 Thread Manisha Sathe
I am using form based Datasource Realm for
authentication and authorization. Also need to
consider clustering/loadbalancing of web server (in
this case Tomcat). In docs it is written for Realm as
follows

"Once a user has been authenticated, the user (and his
or her associated roles) are cached within Tomcat for
the duration of the user's login. 
The cached user is not saved and restored across
sessions serialisations."

I am worried about last line - whether it means that
it does not support loadbalance techniques ? So if
next request from user (who is logged in previously)
goes to another server, then user needs to login
again? What is the solution for this?

Thanks in advance, 

regards
Manisha


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



RE: How to test connection pooling - Resolved

2005-11-30 Thread Manisha Sathe
I do not know when i am going to get over from such
silly mistakes... but I was putting MaxActive - 1 ??
(whereas i wanted to put 100)

Any way thanks a lot for trying to help me out

regards
Manisha


--- "Lucuk, Pete" <[EMAIL PROTECTED]> wrote:

>  
> >So you mean to say you did not get error for second
> request 
> >and it created a new connection ?
> 
> Yes, that is what I am saying
> 
> 
>  (But this is for Oracle8i). 
> >Whether it means there is a problem for MSSQL ?
> 
> Yeah, I do not know what it means for MSSQL.
> I know I have read the netbeans forums and people
> have head massive
> problems with MSSQL and Netbeans Tomcat
> 
> >
> >regards
> >Manisha 
> >
> >--- "Lucuk, Pete" <[EMAIL PROTECTED]> wrote:
> >
> >> I used Tomcat 4.1 and got the.
> >> 
> >>"create only one connection at first and then
> create 
> >more connections 
> >> as needed"
> >> 
> >> behavior and it works fine, no errors.
> >> 
> >> Also, I am using Oracle 8i and use the Oracle
> jdbc driver 
> >ojdbc14.jar 
> >> Different that commons stuff you are using.
> >> 
> >> >-Original Message-
> >> >From: Manisha Sathe
> >> [mailto:[EMAIL PROTECTED]
> >> >Sent: Tuesday, November 29, 2005 1:44 PM
> >> >To: Tomcat Users List
> >> >Subject: RE: How to test connection pooling
> >> >
> >> >Hi,
> >> >
> >> >After some testing on Tomcat 5 / Tomcat 4.1, i
> am
> >> finding some
> >> >strange behaviour.
> >> >I could figure out how to check number of
> >> conections on MSSQL. 
> >> >It is Enterprise Manager -> Management ->
> Current
> >> Processes -
> >> >u have to refresh it now and then.
> >> >
> >> >1)For Tomcat 5, it does create a pool of
> >> connections at start
> >> >depending on initial size. And it uses it from
> >> those depending
> >> >upon availability. I tested this using some big
> >> loops.
> >> >
> >> >2)But for Tomcat 4.1 - it does not create a pool
> of
> >> conections
> >> >but only ONE connection. I thought if trafic
> >> increases it
> >> >might add new connections to it.
> >> >So again tested with 2 requests and used a big
> loop
> >> so that
> >> >first request will make use of connection object
> >> for
> >> >sufficient time and will not release it. 
> >> >
> >> >I was expecting second request should create new
> >> connection in
> >> >a pool, but it did not, it waited for existing
> >> connection to
> >> >become free and later it gave error saying:
> >> >
> >> >Error message
> >> >
> >> >java.sql.SQLException: SQLException from
> connection
> >> >manager:
> >> org.apache.commons.dbcp.SQLNestedException:
> >> >Cannot get a connection, pool exhausted, cause:
> >> >Timeout waiting for idle object
> >> >--
> >> >
> >> >
> >> >Now whether it means that Tomcat 4.1 does not
> >> create pooling
> >> >at all ? Am i missing any settings ? For 4.1 am
> i
> >> suppose to
> >> >use any different jars ?
> >> >
> >> >I even tested the same for MySQL. The result is
> >> same.
> >> >Pls Pls help me, i am stuck like anything.
> >> >
> >> >regards
> >> >Manisha
> >> >
> >> >--- andy gordon <[EMAIL PROTECTED]> wrote:
> >> >
> >> >> Show Processlist will show the number of
> initial
> >> connections
> >> >at start
> >> >> but does it show what subsystem a connection
> is
> >> bound to? what if
> >> >> there are multiple tomcat's connected to one
> >> database. How do you
> >> >> differentiate?
> >> >> 
> >> >> "Lucuk, Pete" <[EMAIL PROTECTED]> wrote: 
> >> Manisha,
> >> >> 
> >> >> I do not know how you check in MSSQL.
> >> >> But, just an FYI
> >> >> 
> >> >> If you setup your connection to ten, ten do
> not
> >> automatically get
&

RE: How to test connection pooling

2005-11-29 Thread Manisha Sathe
Hi,

I tried with MSSQL/MySQL on Tomcat 4.1 / Tomcat 5. On
Tomcat 5 everything works great but on omcat 4 for
both databases I do not get pool  of connection. It
always gives one single connection and does not create
another if needed. 
I am stuck like anything, and want to use it rather
than going back to old method (JDBC call).

I completely reinstall tomcat 4.1 and tested. Is there
any workaround, setting which i can try ? Btw i am
using singleton class, i thought it may be causing
problem so tried w/o my singleton too.

Passing complete extract of my context xml. Pls guide
me.
---



  

  

  factory
 
org.apache.commons.dbcp.BasicDataSourceFactory




  initialSize
  10


  maxActive
  1


  maxIdle
  30


  minIdle
  10


  maxWait
  1




  username
  webuser


  password
  webpwd





   driverClassName
   com.mysql.jdbc.Driver



  defaultTransactionIsolation
  SERIALIZABLE




  removeAbandoned
  true


   removeAbandonedTimeout
   60


   logAbandoned
   true





  url
 
jdbc:mysql://localhost:3306/cim?zeroDateTimeBehavior=convertToNull



  


-

regards
Manisha 

--- "Lucuk, Pete" <[EMAIL PROTECTED]> wrote:

>  
> >So you mean to say you did not get error for second
> request 
> >and it created a new connection ?
> 
> Yes, that is what I am saying
> 
> 
>  (But this is for Oracle8i). 
> >Whether it means there is a problem for MSSQL ?
> 
> Yeah, I do not know what it means for MSSQL.
> I know I have read the netbeans forums and people
> have head massive
> problems with MSSQL and Netbeans Tomcat
> 
> >
> >regards
> >Manisha 
> >
> >--- "Lucuk, Pete" <[EMAIL PROTECTED]> wrote:
> >
> >> I used Tomcat 4.1 and got the.
> >> 
> >>"create only one connection at first and then
> create 
> >more connections 
> >> as needed"
> >> 
> >> behavior and it works fine, no errors.
> >> 
> >> Also, I am using Oracle 8i and use the Oracle
> jdbc driver 
> >ojdbc14.jar 
> >> Different that commons stuff you are using.
> >> 
> >> >-Original Message-
> >> >From: Manisha Sathe
> >> [mailto:[EMAIL PROTECTED]
> >> >Sent: Tuesday, November 29, 2005 1:44 PM
> >> >To: Tomcat Users List
> >> >Subject: RE: How to test connection pooling
> >> >
> >> >Hi,
> >> >
> >> >After some testing on Tomcat 5 / Tomcat 4.1, i
> am
> >> finding some
> >> >strange behaviour.
> >> >I could figure out how to check number of
> >> conections on MSSQL. 
> >> >It is Enterprise Manager -> Management ->
> Current
> >> Processes -
> >> >u have to refresh it now and then.
> >> >
> >> >1)For Tomcat 5, it does create a pool of
> >> connections at start
> >> >depending on initial size. And it uses it from
> >> those depending
> >> >upon availability. I tested this using some big
> >> loops.
> >> >
> >> >2)But for Tomcat 4.1 - it does not create a pool
> of
> >> conections
> >> >but only ONE connection. I thought if trafic
> >> increases it
> >> >might add new connections to it.
> >> >So again tested with 2 requests and used a big
> loop
> >> so that
> >> >first request will make use of connection object
> >> for
> >> >sufficient time and will not release it. 
> >> >
> >> >I was expecting second request should create new
> >> connection in
> >> >a pool, but it did not, it waited for existing
> >> connection to
> >> >become free and later it gave error saying:
> >> >
> >> >Error message
> >> >
> >> >java.sql.SQLException: SQLException from
> connection
> >> >manager:
> >> org.apache.commons.dbcp.SQLNestedException:
> >> >Cannot get a connection, pool exhausted, cause:
> >> >Timeout waiting for idle object
> >> >--
> >> >
> >> >
> >> >Now whether it means that Tomcat 4.1 does not
> >> create pooling
> >> >at all ? Am i missing any settings ? For 4.1 am
> i
> >> suppose to
> >> >use any different jars ?
&

RE: How to test connection pooling

2005-11-29 Thread Manisha Sathe
Thanks for quick reply,

So you mean to say you did not get error for second
request and it created a new connection ? (But this is
for Oracle8i). Whether it means there is a problem for
MSSQL ?

regards
Manisha 

--- "Lucuk, Pete" <[EMAIL PROTECTED]> wrote:

> I used Tomcat 4.1 and got the.
> 
>   "create only one connection at first and then
> create more
> connections as needed"
> 
> behavior and it works fine, no errors.
> 
> Also, I am using Oracle 8i and use the Oracle jdbc
> driver ojdbc14.jar
> Different that commons stuff you are using.
> 
> >-Original Message-
> >From: Manisha Sathe
> [mailto:[EMAIL PROTECTED] 
> >Sent: Tuesday, November 29, 2005 1:44 PM
> >To: Tomcat Users List
> >Subject: RE: How to test connection pooling
> >
> >Hi, 
> >
> >After some testing on Tomcat 5 / Tomcat 4.1, i am
> finding some 
> >strange behaviour.
> >I could figure out how to check number of
> conections on MSSQL. 
> >It is Enterprise Manager -> Management -> Current
> Processes - 
> >u have to refresh it now and then.
> >
> >1)For Tomcat 5, it does create a pool of
> connections at start 
> >depending on initial size. And it uses it from
> those depending 
> >upon availability. I tested this using some big
> loops.
> >
> >2)But for Tomcat 4.1 - it does not create a pool of
> conections 
> >but only ONE connection. I thought if trafic
> increases it 
> >might add new connections to it.
> >So again tested with 2 requests and used a big loop
> so that 
> >first request will make use of connection object
> for 
> >sufficient time and will not release it. 
> >
> >I was expecting second request should create new
> connection in 
> >a pool, but it did not, it waited for existing
> connection to 
> >become free and later it gave error saying:
> >
> >Error message
> >
> >java.sql.SQLException: SQLException from connection
> >manager:
> org.apache.commons.dbcp.SQLNestedException:
> >Cannot get a connection, pool exhausted, cause:
> >Timeout waiting for idle object
> >--
> >
> >
> >Now whether it means that Tomcat 4.1 does not
> create pooling 
> >at all ? Am i missing any settings ? For 4.1 am i
> suppose to 
> >use any different jars ?
> >
> >I even tested the same for MySQL. The result is
> same.
> >Pls Pls help me, i am stuck like anything.
> >
> >regards
> >Manisha
> >
> >--- andy gordon <[EMAIL PROTECTED]> wrote:
> >
> >> Show Processlist will show the number of initial
> connections 
> >at start 
> >> but does it show what subsystem a connection is
> bound to? what if 
> >> there are multiple tomcat's connected to one
> database. How do you 
> >> differentiate?
> >> 
> >> "Lucuk, Pete" <[EMAIL PROTECTED]> wrote: 
> Manisha,
> >> 
> >> I do not know how you check in MSSQL.
> >> But, just an FYI
> >> 
> >> If you setup your connection to ten, ten do not
> automatically get 
> >> created, only one, and as your app requires more
> connections, more 
> >> connections will be created up to a max of ten.
> >> 
> >> Took me a couple days to figure out that one
> >> 
> >> >-Original Message-
> >> >From: Manisha Sathe
> >> [mailto:[EMAIL PROTECTED]
> >> >Sent: Tuesday, November 29, 2005 10:45 AM
> >> >To: users@tomcat.apache.org
> >> >Subject: How to test connection pooling
> >> >
> >> >I am on tomcat 4.1
> >> >
> >> >I am using JDBC connection pooling for MSSQL and
> >> singleton
> >> >class for JNDI lookup (only once) and get
> >> connection.
> >> >
> >> >Everything is working file. But how to test that
> >> connection
> >> >pool for 10 (where initial size specified is 10)
> >> has been created ?
> >> >
> >> >I know for mysql it is 'show processlist' and
> this
> >> gives out
> >> >initial number of connections at start. Same
> thing
> >> how can i
> >> >do it for mssql ?
> >> >
> >> >regards
> >> >Manisha
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > 
> >> >__
&

RE: How to test connection pooling

2005-11-29 Thread Manisha Sathe
Hi, 

After some testing on Tomcat 5 / Tomcat 4.1, i am
finding some strange behaviour.
I could figure out how to check number of conections
on MSSQL. It is Enterprise Manager -> Management ->
Current Processes - u have to refresh it now and then.

1)For Tomcat 5, it does create a pool of connections
at start depending on initial size. And it uses it
from those depending upon availability. I tested this
using some big loops.

2)But for Tomcat 4.1 - it does not create a pool of
conections but only ONE connection. I thought if
trafic increases it might add new connections to it.
So again tested with 2 requests and used a big loop so
that first request will make use of connection object
for sufficient time and will not release it. 

I was expecting second request should create new
connection in a pool, but it did not, it waited for
existing connection to become free and later it gave
error saying:

Error message

java.sql.SQLException: SQLException from connection
manager: org.apache.commons.dbcp.SQLNestedException:
Cannot get a connection, pool exhausted, cause:
Timeout waiting for idle object
--


Now whether it means that Tomcat 4.1 does not create
pooling at all ? Am i missing any settings ? For 4.1
am i suppose to use any different jars ?

I even tested the same for MySQL. The result is same.
Pls Pls help me, i am stuck like anything.

regards
Manisha

--- andy gordon <[EMAIL PROTECTED]> wrote:

> Show Processlist will show the number of initial
> connections at start but does it show what subsystem
> a connection is bound to? what if there are multiple
> tomcat's connected to one database. How do you
> differentiate? 
> 
> "Lucuk, Pete" <[EMAIL PROTECTED]> wrote:  Manisha,
> 
> I do not know how you check in MSSQL.
> But, just an FYI
> 
> If you setup your connection to ten, ten do not
> automatically get
> created, only one, and as your app requires more
> connections, more
> connections will be created up to a max of ten.
> 
> Took me a couple days to figure out that one 
> 
> >-Original Message-
> >From: Manisha Sathe
> [mailto:[EMAIL PROTECTED] 
> >Sent: Tuesday, November 29, 2005 10:45 AM
> >To: users@tomcat.apache.org
> >Subject: How to test connection pooling
> >
> >I am on tomcat 4.1
> >
> >I am using JDBC connection pooling for MSSQL and
> singleton 
> >class for JNDI lookup (only once) and get
> connection.
> >
> >Everything is working file. But how to test that
> connection 
> >pool for 10 (where initial size specified is 10)
> has been created ?
> >
> >I know for mysql it is 'show processlist' and this
> gives out 
> >initial number of connections at start. Same thing
> how can i 
> >do it for mssql ?
> >
> >regards
> >Manisha
> >
> >
> >
> >
> >
> > 
> >__
> >Start your day with Yahoo! - Make it your home
> page! 
> >http://www.yahoo.com/r/hs
> >
>
>-
> >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]
> 
> 
> 
> 
>   
> -
>  Yahoo! Music Unlimited - Access over 1 million
> songs. Try it free.




__ 
Yahoo! Music Unlimited 
Access over 1 million songs. Try it free. 
http://music.yahoo.com/unlimited/

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



How to test connection pooling

2005-11-29 Thread Manisha Sathe
I am on tomcat 4.1

I am using JDBC connection pooling for MSSQL and
singleton class for JNDI lookup (only once) and get
connection.

Everything is working file. But how to test that
connection pool for 10 (where initial size specified
is 10) has been created ?

I know for mysql it is 'show processlist' and this
gives out initial number of connections at start. Same
thing how can i do it for mssql ?

regards
Manisha






__ 
Start your day with Yahoo! - Make it your home page! 
http://www.yahoo.com/r/hs

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



Connection problem (Too many connections) for MySQL 4.1

2005-10-24 Thread Manisha Sathe
I am on Tomcat 5, MySQL 4.1 and using JNDI. The
context xml is as follows
..



  factory
 
org.apache.commons.dbcp.BasicDataSourceFactory




  initialSize
  10


  maxActive
  100


  maxIdle
  20


  minIdle
  10


  maxWait
  700



After a while i get error from MySQL 'Too Many
connections' When i try 

mysql>show processlist; 

from mysql command it shows me more than 100
processes. But almost all  with 'State' Sleep.

I am properly closing all conneections/reultsets. The
mysql process state also shows the 'Sleep' but then
still why it is not getting reused? 

It seems everytime new connection is taken from mysql
and existing connection is not re-used.

Is there any setting am i missing? 

Thanks in advance,

regards
Manisha






__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

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