RE: Tomcat 4.0.x JDBC connection pooling

2003-01-17 Thread Roberts, Eric
Yes - We used 4.1.12 and have just migrated to 4.1.18 on a mission critical 24 x 7 app 
and we have had no problems - once we got it working in the first place!!

-Original Message-
From: Luca Cremonini [mailto:[EMAIL PROTECTED]]
Sent: Donnerstag, 16. Jänner 2003 18:00
To: Tomcat Users List
Subject: RE: Tomcat 4.0.x JDBC connection pooling



Thanks Eric!

But with Tomcat 4.0.x I don't have things like MaxActive, MinIdle and other
parameters...
4.0 documentation doesn't tell anything about this.

It seems to me that I have to migrate to 4.1.x to use the pool and such
parameters.
Am I right?

L.C.



   

Roberts,  

EricPer:Tomcat Users List 
[EMAIL PROTECTED]  
Eric.Roberts@   Cc:   

one.at  Oggetto: RE: Tomcat 4.0.x JDBC connection 
pooling 
   

16/01/2003 

17.33  

Per favore,

rispondere a   

Tomcat Users  

List  

   

   





Hi Luca,

The pool is established in the definition of the resource jdbc/EmployeeDB -
where things like MaxActive, MinIdle and other parameters determine how the
pool behaves.

At startup the pool will connect the MinIdle connections to the DB - a new
connection will then only be established if that number are already in use.

It is good practice to always close connections, as otherwise you become
dependent on parameters like RemoveAbandoned and RemoveAbandoned timeout.

All of this is discussed in the JNDI Datasource HOWTO in the documention :
-)

-Original Message-
From: Luca Cremonini [mailto:[EMAIL PROTECTED]]
Sent: Donnerstag, 16. Jänner 2003 17:17
To: [EMAIL PROTECTED]
Subject: Tomcat 4.0.x JDBC connection pooling


I'm using JDBC connection with Tomcat 4.0 as shown in Tomcat4.0 online
documentation
(http://jakarta.apache.org/tomcat/tomcat-4.0-doc/jndi-resources-howto.html
):

---
// Obtain our environment naming context
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup(java:comp/env);

// Look up our data source
DataSource ds = (DataSource)
  envCtx.lookup(jdbc/EmployeeDB);

// Allocate and use a connection from the pool
Connection conn = ds.getConnection();

... use this connection to access the database ...

conn.close();
---

I searched the mailing list and the web,
but coudn't find answer to these questions:

- When I call

 ds.getConnection();

am I getting a connection from a pool or opening a NEW connection every
time?


- If there's a pool why do I have to close the connection with

 conn.close();

instead of releasing it to the pool?

- What are the improvement in Tomcat 1.1.x about JDBC connection pooling?


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


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





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


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




Re: JDBC Connection pooling

2003-01-16 Thread Martin Jacobson
Nathan McMinn wrote:

When trying to get a connection pool set up, tomcat spits this exception
back out.  Nowhere in the code do I reference this class.  Can anyone point
me to a good HOWTO on connection pooling in tomcat 4.0.6?

TyrexDataSourceFactory:  Cannot create DataSource, Exception
java.lang.ClassNotFoundException: org.hsql.jdbcDriver



I had the same experience: it seemed as though Tyrex had the hypersonic 
db hard-coded, so that any attempt to specifiy a different jdbc driver 
was simply ignored.
The solution was to move to TC 4.1.x, which uses the jakarta-commons 
DBCP stuff in place of Tyrex, and which works fine.

HTH,

Martin



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



Re: JDBC Connection pooling

2003-01-16 Thread Nathan McMinn
He he, I'd love to move to 4.1.18, but I get the most bizzare problems when
I try to do it.

see http://www.experts-exchange.com/Web/Web_Languages/JSP/Q_20456477.html
for details if you are interested.

--Nathan McMinn

 Nathan McMinn wrote:
  When trying to get a connection pool set up, tomcat spits this exception
  back out.  Nowhere in the code do I reference this class.  Can anyone
point
  me to a good HOWTO on connection pooling in tomcat 4.0.6?
 
  TyrexDataSourceFactory:  Cannot create DataSource, Exception
  java.lang.ClassNotFoundException: org.hsql.jdbcDriver
 

 I had the same experience: it seemed as though Tyrex had the hypersonic
 db hard-coded, so that any attempt to specifiy a different jdbc driver
 was simply ignored.
 The solution was to move to TC 4.1.x, which uses the jakarta-commons
 DBCP stuff in place of Tyrex, and which works fine.

 HTH,

 Martin



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





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




Tomcat 4.0.x JDBC connection pooling

2003-01-16 Thread Luca Cremonini
I'm using JDBC connection with Tomcat 4.0 as shown in Tomcat4.0 online
documentation
(http://jakarta.apache.org/tomcat/tomcat-4.0-doc/jndi-resources-howto.html):

---
// Obtain our environment naming context
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup(java:comp/env);

// Look up our data source
DataSource ds = (DataSource)
  envCtx.lookup(jdbc/EmployeeDB);

// Allocate and use a connection from the pool
Connection conn = ds.getConnection();

... use this connection to access the database ...

conn.close();
---

I searched the mailing list and the web,
but coudn't find answer to these questions:

- When I call

 ds.getConnection();

am I getting a connection from a pool or opening a NEW connection every
time?


- If there's a pool why do I have to close the connection with

 conn.close();

instead of releasing it to the pool?

- What are the improvement in Tomcat 1.1.x about JDBC connection pooling?


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




RE: Tomcat 4.0.x JDBC connection pooling

2003-01-16 Thread Roberts, Eric
Hi Luca,

The pool is established in the definition of the resource jdbc/EmployeeDB - where 
things like MaxActive, MinIdle and other parameters determine how the pool behaves.

At startup the pool will connect the MinIdle connections to the DB - a new connection 
will then only be established if that number are already in use.

It is good practice to always close connections, as otherwise you become dependent on 
parameters like RemoveAbandoned and RemoveAbandoned timeout.

All of this is discussed in the JNDI Datasource HOWTO in the documention :-)

-Original Message-
From: Luca Cremonini [mailto:[EMAIL PROTECTED]]
Sent: Donnerstag, 16. Jänner 2003 17:17
To: [EMAIL PROTECTED]
Subject: Tomcat 4.0.x JDBC connection pooling


I'm using JDBC connection with Tomcat 4.0 as shown in Tomcat4.0 online
documentation
(http://jakarta.apache.org/tomcat/tomcat-4.0-doc/jndi-resources-howto.html):

---
// Obtain our environment naming context
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup(java:comp/env);

// Look up our data source
DataSource ds = (DataSource)
  envCtx.lookup(jdbc/EmployeeDB);

// Allocate and use a connection from the pool
Connection conn = ds.getConnection();

... use this connection to access the database ...

conn.close();
---

I searched the mailing list and the web,
but coudn't find answer to these questions:

- When I call

 ds.getConnection();

am I getting a connection from a pool or opening a NEW connection every
time?


- If there's a pool why do I have to close the connection with

 conn.close();

instead of releasing it to the pool?

- What are the improvement in Tomcat 1.1.x about JDBC connection pooling?


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


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




RE: Tomcat 4.0.x JDBC connection pooling

2003-01-16 Thread Luca Cremonini

Thanks Eric!

But with Tomcat 4.0.x I don't have things like MaxActive, MinIdle and other
parameters...
4.0 documentation doesn't tell anything about this.

It seems to me that I have to migrate to 4.1.x to use the pool and such
parameters.
Am I right?

L.C.



   

Roberts,  

EricPer:Tomcat Users List 
[EMAIL PROTECTED]  
Eric.Roberts@   Cc:   

one.at  Oggetto: RE: Tomcat 4.0.x JDBC connection 
pooling 
   

16/01/2003 

17.33  

Per favore,

rispondere a   

Tomcat Users  

List  

   

   





Hi Luca,

The pool is established in the definition of the resource jdbc/EmployeeDB -
where things like MaxActive, MinIdle and other parameters determine how the
pool behaves.

At startup the pool will connect the MinIdle connections to the DB - a new
connection will then only be established if that number are already in use.

It is good practice to always close connections, as otherwise you become
dependent on parameters like RemoveAbandoned and RemoveAbandoned timeout.

All of this is discussed in the JNDI Datasource HOWTO in the documention :
-)

-Original Message-
From: Luca Cremonini [mailto:[EMAIL PROTECTED]]
Sent: Donnerstag, 16. Jänner 2003 17:17
To: [EMAIL PROTECTED]
Subject: Tomcat 4.0.x JDBC connection pooling


I'm using JDBC connection with Tomcat 4.0 as shown in Tomcat4.0 online
documentation
(http://jakarta.apache.org/tomcat/tomcat-4.0-doc/jndi-resources-howto.html
):

---
// Obtain our environment naming context
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup(java:comp/env);

// Look up our data source
DataSource ds = (DataSource)
  envCtx.lookup(jdbc/EmployeeDB);

// Allocate and use a connection from the pool
Connection conn = ds.getConnection();

... use this connection to access the database ...

conn.close();
---

I searched the mailing list and the web,
but coudn't find answer to these questions:

- When I call

 ds.getConnection();

am I getting a connection from a pool or opening a NEW connection every
time?


- If there's a pool why do I have to close the connection with

 conn.close();

instead of releasing it to the pool?

- What are the improvement in Tomcat 1.1.x about JDBC connection pooling?


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


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





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




JDBC Connection pooling

2003-01-15 Thread Nathan McMinn
When trying to get a connection pool set up, tomcat spits this exception
back out.  Nowhere in the code do I reference this class.  Can anyone point
me to a good HOWTO on connection pooling in tomcat 4.0.6?

TyrexDataSourceFactory:  Cannot create DataSource, Exception
java.lang.ClassNotFoundException: org.hsql.jdbcDriver



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




Re: JDBC Connection pooling

2003-01-15 Thread David Boyer
For this particular error, the Tomcat classloader documentation would
probably be your best bet.

 [EMAIL PROTECTED] 01/15/03 02:24PM 
When trying to get a connection pool set up, tomcat spits this
exception
back out.  Nowhere in the code do I reference this class.  Can anyone
point
me to a good HOWTO on connection pooling in tomcat 4.0.6?

TyrexDataSourceFactory:  Cannot create DataSource, Exception
java.lang.ClassNotFoundException: org.hsql.jdbcDriver



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




Re: JDBC Connection pooling

2003-01-15 Thread Nathan McMinn
Any suggestions on what in particular to look for?  I know the classloader
that is spitting up on itself is the webapp classloader, because the
exception doesn't occur until I attempt to access this application. Is that
correct?

- Original Message -
From: David Boyer [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, January 15, 2003 2:27 PM
Subject: Re: JDBC Connection pooling


 For this particular error, the Tomcat classloader documentation would
 probably be your best bet.

  [EMAIL PROTECTED] 01/15/03 02:24PM 
 When trying to get a connection pool set up, tomcat spits this
 exception
 back out.  Nowhere in the code do I reference this class.  Can anyone
 point
 me to a good HOWTO on connection pooling in tomcat 4.0.6?

 TyrexDataSourceFactory:  Cannot create DataSource, Exception
 java.lang.ClassNotFoundException: org.hsql.jdbcDriver



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





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




Re: JDBC Connection pooling

2003-01-15 Thread David Boyer
The error you mention suggests Tyrex cannot find the hsql jdbc driver.
The Class Loader How-To would suggest putting the hsql jar(s) in
$TOMCAT_HOME/common/lib to make them available to both Tomcat's JNDI
provider and your web applications. Isn't that where you have the Tyrex
jars?

 [EMAIL PROTECTED] 01/15/03 02:44PM 
Any suggestions on what in particular to look for?  I know the
classloader
that is spitting up on itself is the webapp classloader, because the
exception doesn't occur until I attempt to access this application. Is
that
correct?

- Original Message -
From: David Boyer [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, January 15, 2003 2:27 PM
Subject: Re: JDBC Connection pooling


 For this particular error, the Tomcat classloader documentation
would
 probably be your best bet.

  [EMAIL PROTECTED] 01/15/03 02:24PM 
 When trying to get a connection pool set up, tomcat spits this
 exception
 back out.  Nowhere in the code do I reference this class.  Can
anyone
 point
 me to a good HOWTO on connection pooling in tomcat 4.0.6?

 TyrexDataSourceFactory:  Cannot create DataSource, Exception
 java.lang.ClassNotFoundException: org.hsql.jdbcDriver



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





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





Re: JDBC Connection pooling

2003-01-15 Thread Nathan McMinn
That is where the tyrex jars are, problem is, I don't use HypersonicSQL,
which is the jar file tyrex is looking for.  If I put the hypersonicSQL jars
there, it attempts to connect to a non-existent database.  I found what was
causing that problem, and I have a new one (Progress!!).  Now whenever I
attempt to get a connection from the pool, I get

javax.naming.NamingException: Cannot create resource instance

pretty vague, isn't it?

Below is the XML from the relevant server and web.xml files.  Maybe this
will help.

I have this chunk of xml in the web.xml file for the application

resource-ref
  descriptionwwxchange/description
  res-ref-namejdbc/wwxchange/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
/resource-ref

which is in turn, described by this context

 Context path=/wwxchange docBase=wwxchange
debug=5 reloadable=true crossContext=true

  Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_DBTest_log. suffix=.txt
 timestamp=true/

 Resource name=jdbc/wwxchange scope=Shareable
   type=javax.sql.DataSource/
 ResourceParams name=jdbc/wwxchange

   parameter
 namefactory/name
 valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
   /parameter
   parameter
 nameurl/name
 valuejdbc:odbc:www_ship_2/value
   /parameter
   parameter
 namemaxActive/name
 value10/value
   /parameter
   parameter
 namemaxWait/name
 value5000/value
   /parameter
   parameter
 namedriverClassName/name
 valuesun.jdbc.odbc.JdbcOdbcDriver/value
   /parameter
   parameter
 namemaxIdle/name
 value2/value
   /parameter
 /ResourceParams

  /Context
- Original Message -
From: David Boyer [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, January 15, 2003 3:01 PM
Subject: Re: JDBC Connection pooling


 The error you mention suggests Tyrex cannot find the hsql jdbc driver.
 The Class Loader How-To would suggest putting the hsql jar(s) in
 $TOMCAT_HOME/common/lib to make them available to both Tomcat's JNDI
 provider and your web applications. Isn't that where you have the Tyrex
 jars?

  [EMAIL PROTECTED] 01/15/03 02:44PM 
 Any suggestions on what in particular to look for?  I know the
 classloader
 that is spitting up on itself is the webapp classloader, because the
 exception doesn't occur until I attempt to access this application. Is
 that
 correct?

 - Original Message -
 From: David Boyer [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, January 15, 2003 2:27 PM
 Subject: Re: JDBC Connection pooling


  For this particular error, the Tomcat classloader documentation
 would
  probably be your best bet.
 
   [EMAIL PROTECTED] 01/15/03 02:24PM 
  When trying to get a connection pool set up, tomcat spits this
  exception
  back out.  Nowhere in the code do I reference this class.  Can
 anyone
  point
  me to a good HOWTO on connection pooling in tomcat 4.0.6?
 
  TyrexDataSourceFactory:  Cannot create DataSource, Exception
  java.lang.ClassNotFoundException: org.hsql.jdbcDriver
 
 
 
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 
 



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






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




Re: JDBC Connection pooling

2003-01-15 Thread Nathan McMinn
Here is a complete stack trace of the exception

javax.naming.NamingException: Cannot create resource instance
at
org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.
java:167)
at
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:311)
at org.apache.naming.NamingContext.lookup(NamingContext.java:834)
at org.apache.naming.NamingContext.lookup(NamingContext.java:181)
at org.apache.naming.NamingContext.lookup(NamingContext.java:822)
at org.apache.naming.NamingContext.lookup(NamingContext.java:181)
at org.apache.naming.NamingContext.lookup(NamingContext.java:822)
at org.apache.naming.NamingContext.lookup(NamingContext.java:181)
at org.apache.naming.NamingContext.lookup(NamingContext.java:822)
at org.apache.naming.NamingContext.lookup(NamingContext.java:194)
at
org.apache.naming.SelectorContext.lookup(SelectorContext.java:183)
at javax.naming.InitialContext.lookup(InitialContext.java:354)
at wwxchange.utility.DBPoolAccess.init(DBPoolAccess.java:28)
at wwxchange.beans.UserAcctBean.loadProfile(UserAcctBean.java:103)
at org.apache.jsp.Login$jsp._jspService(Login$jsp.java:149)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:201)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)

at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:190)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:531)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1027)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125
)
at java.lang.Thread.run(Thread.java:536)

- Original Message -
From: Nathan McMinn [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, January 15, 2003 3:19 PM
Subject: Re: JDBC Connection pooling


 That is where the tyrex jars are, problem is, I don't use HypersonicSQL,
 which is the jar file tyrex is looking for.  If I put the hypersonicSQL
jars
 there, it attempts to connect to a non-existent database

JDBC connection pooling, update

2003-01-15 Thread Nathan McMinn
First, thanks to those that pointed me in the right direction.  I just have
one more problem with connection pooling. Now when I request a connection
from the connection pool, I get the following exception:

java.sql.SQLException: No suitable driver

pretty standard exception, not really that confusing.  What IS confusing, is
why this exception kicks out, when I clearly define the driver to use in the
server.xml file.  It is supposed to be defined in the driverClassName
parameter, correct?

  ResourceParams name=jdbc/wwxchange

parameter
  namedriverClassName/name
  valuesun.jdbc.odbc.JdbcOdbcDriver/value
/parameter
parameter
  nameurl/name
  valuejdbc:odbc:www_ship_2/value
/parameter
parameter
  namemaxActive/name
  value10/value
/parameter
parameter
  namemaxWait/name
   value5000/value
/parameter
parameter
  namemaxIdle/name
  value2/value
/parameter
  /ResourceParams



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




RE: JNDI JDBC COnnection pooling problem...

2002-08-13 Thread Alexander Wallace

I changed to username, it didn't work either.

Thanks.


On Tue, 2002-08-13 at 04:05, Andrew wrote:
 Try changing the name of your parameter from 'user' to 'username'
 
 
 That worked for me with another driver (MSSQL Server JDBC Driver)
 
 
 - Andrew
 
  -Original Message-
  From: Alexander Wallace [mailto:[EMAIL PROTECTED]] 
  Sent: Monday, August 12, 2002 11:33 AM
  To: [EMAIL PROTECTED]
  Subject: JNDI JDBC COnnection pooling problem...
  
  
  Hello. This has to be a very simple one for those who know.
  
  I'm getting a java.lang.NullPointerException in my app, in 
  the second line here:
  
  Context ctx = (Context) new InitialContext().lookup(java:comp/env);
  conn = ((DataSource) 
  ctx.lookup(jdbc/pgsql)).getConnection(); **Error happens here**
  
  And have the following in my server.xml (I put my whole 
  context in case my error is there) 
  
  Context path=/lto docBase=lto debug=0 
  reloadable=true crossContext=true
Logger className=org.apache.catalina.logger.FileLogger
   prefix=localhost_lto_log. suffix=.txt
timestamp=true/
Environment name=maxExemptions type=java.lang.Integer
value=15/
Parameter name=context.param.name 
  value=context.param.value override=false/
  
  Resource name=jdbc/pgsql auth=Container
  type=javax.sql.DataSource/
ResourceParams name=jdbc/pgsql
 
  parameternameuser/namevalueawallace/value/parameter
 
  parameternamepassword/namevaluepasswd/value/parameter
  parameternamedriverClassName/name
valueorg.postgresql.Driver/value/parameter
  parameternamedriverName/name
   
  valuejdbc:postgresql://10.100.101.1/awallace/value/parameter
/ResourceParams
Resource name=mail/Session auth=Container
  type=javax.mail.Session/
ResourceParams name=mail/Session
  parameter
namemail.smtp.host/name
valuelocalhost/value
  /parameter
/ResourceParams
  
  Realm className=org.apache.catalina.realm.JDBCRealm
  debug=99
  driverName=org.postgresql.Driver
 
  connectionURL=jdbc:postgresql://10.100.101.1/awallace?user=aw
  allace;password=passwd
  userTable=tbl_users 
  userNameCol=user_name userCredCol=password
  userRoleTable=user_roles 
  roleNameCol=role_name
  digest=MD5/
  /Context
  
  
  
  Thank you in advance.
  
  
  
  
  --
  To unsubscribe, e-mail:   
  mailto:tomcat-user- [EMAIL PROTECTED]
  For 
  additional commands, 
  e-mail: mailto:[EMAIL PROTECTED]
  
  
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 



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




JNDI JDBC COnnection pooling problem...

2002-08-12 Thread Alexander Wallace

Hello. This has to be a very simple one for those who know.

I'm getting a java.lang.NullPointerException in my app, in the second
line here:

Context ctx = (Context) new InitialContext().lookup(java:comp/env);
conn = ((DataSource) ctx.lookup(jdbc/pgsql)).getConnection(); **Error
happens here**

And have the following in my server.xml (I put my whole context in case
my error is there) 

Context path=/lto docBase=lto debug=0 
reloadable=true crossContext=true
  Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_lto_log. suffix=.txt
  timestamp=true/
  Environment name=maxExemptions type=java.lang.Integer
  value=15/
  Parameter name=context.param.name
value=context.param.value override=false/

Resource name=jdbc/pgsql auth=Container
type=javax.sql.DataSource/
  ResourceParams name=jdbc/pgsql
   
parameternameuser/namevalueawallace/value/parameter
   
parameternamepassword/namevaluepasswd/value/parameter
parameternamedriverClassName/name
  valueorg.postgresql.Driver/value/parameter
parameternamedriverName/name
 
valuejdbc:postgresql://10.100.101.1/awallace/value/parameter
  /ResourceParams
  Resource name=mail/Session auth=Container
type=javax.mail.Session/
  ResourceParams name=mail/Session
parameter
  namemail.smtp.host/name
  valuelocalhost/value
/parameter
  /ResourceParams

Realm className=org.apache.catalina.realm.JDBCRealm
debug=99
driverName=org.postgresql.Driver
   
connectionURL=jdbc:postgresql://10.100.101.1/awallace?user=awallace;password=passwd
userTable=tbl_users userNameCol=user_name
userCredCol=password
userRoleTable=user_roles
roleNameCol=role_name
digest=MD5/
/Context



Thank you in advance.




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




RE: JNDI JDBC COnnection pooling problem...

2002-08-12 Thread Andrew

Try changing the name of your parameter from 'user' to 'username'


That worked for me with another driver (MSSQL Server JDBC Driver)


- Andrew

 -Original Message-
 From: Alexander Wallace [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, August 12, 2002 11:33 AM
 To: [EMAIL PROTECTED]
 Subject: JNDI JDBC COnnection pooling problem...
 
 
 Hello. This has to be a very simple one for those who know.
 
 I'm getting a java.lang.NullPointerException in my app, in 
 the second line here:
 
 Context ctx = (Context) new InitialContext().lookup(java:comp/env);
 conn = ((DataSource) 
 ctx.lookup(jdbc/pgsql)).getConnection(); **Error happens here**
 
 And have the following in my server.xml (I put my whole 
 context in case my error is there) 
 
 Context path=/lto docBase=lto debug=0 
 reloadable=true crossContext=true
   Logger className=org.apache.catalina.logger.FileLogger
  prefix=localhost_lto_log. suffix=.txt
   timestamp=true/
   Environment name=maxExemptions type=java.lang.Integer
   value=15/
   Parameter name=context.param.name 
 value=context.param.value override=false/
 
 Resource name=jdbc/pgsql auth=Container
 type=javax.sql.DataSource/
   ResourceParams name=jdbc/pgsql

 parameternameuser/namevalueawallace/value/parameter

 parameternamepassword/namevaluepasswd/value/parameter
 parameternamedriverClassName/name
   valueorg.postgresql.Driver/value/parameter
 parameternamedriverName/name
  
 valuejdbc:postgresql://10.100.101.1/awallace/value/parameter
   /ResourceParams
   Resource name=mail/Session auth=Container
 type=javax.mail.Session/
   ResourceParams name=mail/Session
 parameter
   namemail.smtp.host/name
   valuelocalhost/value
 /parameter
   /ResourceParams
 
 Realm className=org.apache.catalina.realm.JDBCRealm
 debug=99
 driverName=org.postgresql.Driver

 connectionURL=jdbc:postgresql://10.100.101.1/awallace?user=aw
 allace;password=passwd
 userTable=tbl_users 
 userNameCol=user_name userCredCol=password
 userRoleTable=user_roles 
 roleNameCol=role_name
 digest=MD5/
 /Context
 
 
 
 Thank you in advance.
 
 
 
 
 --
 To unsubscribe, e-mail:   
 mailto:tomcat-user- [EMAIL PROTECTED]
 For 
 additional commands, 
 e-mail: mailto:[EMAIL PROTECTED]
 
 


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




JNDI InitialContext JDBC connection pooling not working

2001-11-25 Thread Marko Asplund


i've configured Tomcat 4 to use a JDBC data source obtained via the JNDI
InitialContext following the instruction in the JNDI Resources HOW-TO. the
database connections are working properly but connection pooling doesn't
seem to be working. in my tests establishing and closing database
connections a 1000 times takes about 60 seconds using unpooled connections
and it takes about the same time using a data source obtained via JNDI API
whereas using OracleConnectionPoolDataSource it takes about 1 second.

does Tomcat 4 implement JDBC connection pooling by itself or do i have to
configure TC to use a connection pool implementation provided by the JDBC
driver vendor? how is the configuration done?

-- 
aspa



--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




JDBC Connection Pooling

2001-02-19 Thread Nazzaro, Mark (Mark)

Does anyone know if Tomcat supports JDBC connection Pooling similar to
WebSphere?
Any information would be appreciated.

Thank you,

Mark Nazzaro
eAssociate
Lucent Technologies
(908) 559-6105
[EMAIL PROTECTED]


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




Re: JDBC Connection Pooling

2001-02-19 Thread Corey A. Johnson

sure does.  you need a pool manager i believe though.

check out:

http://www.codestudio.com/PoolMan/index.shtml

Cj

"Nazzaro, Mark (Mark)" wrote:

 Does anyone know if Tomcat supports JDBC connection Pooling similar to
 WebSphere?
 Any information would be appreciated.

 Thank you,

 Mark Nazzaro
 eAssociate
 Lucent Technologies
 (908) 559-6105
 [EMAIL PROTECTED]

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

--
Corey A. Johnson
Creative Network Innovations
http://www.cniweb.net/
1-800-CNi-5547 ** 1-321-259-1984



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




Re: JDBC Connection Pooling

2001-02-19 Thread Shahed Ali

Not that I know of, but if you need a good db connection pool,
look at the one from javaexchange.com

I think its called DBconnectionBroker.
Seems to be better than poolman.

Regards
Shahed.


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




RE: JDBC Connection Pooling

2001-02-19 Thread Michel Lehon

Two projects under Apache provide JDBC Connection pooling:
Turbine
Struts.

I think you can use the one from Turbine outside the framwork without any
problems.

Michel.

 -Original Message-
 From: Shahed Ali [mailto:[EMAIL PROTECTED]]
 Sent: Monday, 19 February, 2001 16:35
 To: [EMAIL PROTECTED]
 Subject: Re: JDBC Connection Pooling


 Not that I know of, but if you need a good db connection pool,
 look at the one from javaexchange.com

 I think its called DBconnectionBroker.
 Seems to be better than poolman.

 Regards
 Shahed.


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





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




RE: JDBC Connection Pooling

2001-02-19 Thread Etienne Baert

Please, have a look on Turbine at http://java.apache.org
there were a lot of discussions in the related groups
about JDBC connection pooling.

Etienne

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: lundi 19 fevrier 2001 16:49
To: [EMAIL PROTECTED]
Cc: '[EMAIL PROTECTED]'
Subject: Re: JDBC Connection Pooling



JDBC connection pooling !

Tomcat do not provide resource pooling ? I think ?

I know that some JDBC driver support pooling in native !!! Or you can use
your own pooling mechanism, use minerva, poolman, jpool 

Christophe




"Nazzaro,
Mark (Mark)" To:
"'[EMAIL PROTECTED]'"
mnazzaro@luc[EMAIL PROTECTED]
ent.com cc:
     Subject: JDBC Connection
Pooling
02/19/01
04:34 PM
Please
respond to
tomcat-user





Does anyone know if Tomcat supports JDBC connection Pooling similar to
WebSphere?
Any information would be appreciated.

Thank you,

Mark Nazzaro
eAssociate
Lucent Technologies
(908) 559-6105
[EMAIL PROTECTED]


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






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


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




Re: JDBC Connection Pooling

2001-02-19 Thread Alex Fernández

There are some other Jakarta products that provide Connection Pooling. You can use
Struts, you can use Turbine. Not part of Tomcat, but nice dressings (I haven't used
them though).

Right now the Jakarta folks are deciding if it's feasible to provide some sort of
general utility library, so each feature can be used on its own. If you want to watch
it live, tune it to [EMAIL PROTECTED]

Un saludo,

Alex.

[EMAIL PROTECTED] wrote:

 JDBC connection pooling !

 Tomcat do not provide resource pooling ? I think ?

 I know that some JDBC driver support pooling in native !!! Or you can use
 your own pooling mechanism, use minerva, poolman, jpool 

 Christophe


 "Nazzaro,
 Mark (Mark)" To: "'[EMAIL PROTECTED]'"
 mnazzaro@luc[EMAIL PROTECTED]
 ent.com cc:
      Subject: JDBC Connection Pooling
 02/19/01
 04:34 PM
 Please
 respond to
 tomcat-user



 Does anyone know if Tomcat supports JDBC connection Pooling similar to
 WebSphere?
 Any information would be appreciated.

 Thank you,

 Mark Nazzaro
 eAssociate
 Lucent Technologies
 (908) 559-6105
 [EMAIL PROTECTED]

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

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


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




RE: JDBC Connection Pooling

2001-02-19 Thread Cato, Christopher

In the book "Java Server Pages" by Hans Bergstedt, O'Reilly - ISBN
1-56592-746-X it says that it is possible through using the following
interfaces:

javax.sql.DataSource
javax.sql.ConnectionPoolDataSource
javax.sql.PooledConnection

This is all part of JDBC 2.0 or rather the JDBC 2.0 Optional Package.

So, you don't really need TomCat to manage this, just set it up in your
database tool class (if you have one) and let all other db-hungry classes
get it's connection from that one. This should be database-independent
AFAIK.

/christopher cato

 -Original Message-
 From: Nazzaro, Mark (Mark) [mailto:[EMAIL PROTECTED]]
 Sent: den 19 februari 2001 16:35
 To: '[EMAIL PROTECTED]'
 Subject: JDBC Connection Pooling
 
 
 Does anyone know if Tomcat supports JDBC connection Pooling similar to
 WebSphere?
 Any information would be appreciated.
 
 Thank you,
 
 Mark Nazzaro
 eAssociate
 Lucent Technologies
 (908) 559-6105
 [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, email: [EMAIL PROTECTED]
 

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