If you use oracle.jdbc.pool.OracleConnectionPoolDataSource, what will be the
url?

Regards,
 
 
PQ
 
"This Guy Thinks He Knows Everything"
"This Guy Thinks He Knows What He Is Doing"

-----Original Message-----
From: Raible, Matt [mailto:[EMAIL PROTECTED]] 
Sent: January 23, 2003 11:53 AM
To: 'Struts Users Mailing List'
Cc: Immel, Richard
Subject: RE: db connection pool question [solved]

Using the following in my DBCP Connection Pool solved my problem:

        <parameter>
            <name>driverClassName</name>
            <value>oracle.jdbc.pool.OracleConnectionPoolDataSource</value>
        </parameter>

However, for the JDBCRealm, I still have to use:

driverName="oracle.jdbc.driver.OracleDriver"

Thanks,

Matt

> -----Original Message-----
> From: mech [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 22, 2003 12:10 PM
> To: 'Struts Users Mailing List'
> Subject: RE: db connection pool question
> 
> 
> I can't tell for Oracle, but for MySQL and the Struts Connection Pool
> you have to set some kind of "autoReconnect=true" for your connection
> url setup. Otherwise your connection pool will contain only stale
> connections after a certain timeout. 
> MySQL kicked me out after 8 hours of inactivity. 
> Without autoreconnect you will just pick a "dead" connection 
> out of this
> pool, get an exception, most likely even close the broken 
> connection in
> your finally-block and put it back into the pool. Next time you grab
> another dead connection and so on and forth.
> 
> By the way... Are the certain pro and cons for the struts connection
> pool vs. the tomcat datasource connection pool?
> As far as I know the tomcat connection pool works only via jndi setup
> whereas struts utilized the "oldfashioned" way. And moreover 
> you have to
> set it up in struts-config.xml which is a bit tricky for deployment.
> 
> Michael
> 
> > -----Original Message-----
> > From: Raible, Matt [mailto:[EMAIL PROTECTED]] 
> > Sent: Mittwoch, 22. Januar 2003 17:18
> > To: 'Struts Users Mailing List'
> > Subject: RE: db connection pool question
> > 
> > 
> > After waiting 24 hours, I'm still experiencing the same 
> > problem with Oracle and a connection pool (DBCP) in Tomcat.  
> > I guess I'll try configuring Oracle's connection pool??
> > 
> > Matt
> > 
> > > -----Original Message-----
> > > From: Raible, Matt
> > > Sent: Tuesday, January 21, 2003 8:22 AM
> > > To: 'Struts Users Mailing List'
> > > Subject: RE: db connection pool question
> > > 
> > > 
> > > Actually, the solution that I had only works for MySQL.  I'm
> > > having the same problem with Oracle.  Funny - I just posted a 
> > > message to the commons-user group asking this same question.  
> > > I'll try adding the validationQuery parameter:
> > > 
> > > <parameter>
> > >            <name>validationQuery</name>
> > >            <value>SELECT 'CRAP' FROM DUAL</value> </parameter>
> > > 
> > > Thanks,
> > > 
> > > Matt
> > > 
> > > > -----Original Message-----
> > > > From: Pani, Gourav [mailto:[EMAIL PROTECTED]]
> > > > Sent: Tuesday, January 21, 2003 7:58 AM
> > > > To: 'Struts Users Mailing List'
> > > > Subject: RE: db connection pool question
> > > > 
> > > > 
> > > > please look at the thread with subject "Problem with JDBC 
> > & Struts 
> > > > Connection Pool (possible to recon nect?)".  Matt Raible had a 
> > > > solution to that by setting autoReconnect=true
> > > > 
> > > > -----Original Message-----
> > > > From: david chan [mailto:[EMAIL PROTECTED]]
> > > > Sent: Tuesday, January 21, 2003 9:56 AM
> > > > To: Struts Users Mailing List
> > > > Subject: db connection pool question
> > > > 
> > > > 
> > > > Hi,
> > > >  I am using a connection pool from 
> > > > org.apache.commons.dbcp.BasicDataSourceFactory and the 
> driver is 
> > > > oracle.jdbc.driver.OracleDriver. It works great until if 
> > the server 
> > > > idle for a few days, then the connection object seems 
> broken with 
> > > > this error: ==== begin error mesg ===
> > > > java.sql.SQLException: Io exception: Software caused
> > > > connection abort: socket wr
> > > > ite error   at
> > > > oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
> > > >   at
> > > > oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
> > > >     at
> > > > oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:323)
> > > >       at
> > > > 
> > oracle.jdbc.driver.OracleStatement.<init>(OracleStatement.java:417)
> > > >    at
> > > > 
> > oracle.jdbc.driver.OracleStatement.<init>(OracleStatement.java:432)
> > > >    at
> > > > 
> > > 
> > 
> oracle.jdbc.driver.OraclePreparedStatement.<init>(OraclePreparedState
> > > > ment.java:182)       at
> > > > 
> > > 
> > 
> oracle.jdbc.driver.OracleConnection.privatePrepareStatement(OracleCon
> > > > nection.java:602)        at
> > > > 
> > > 
> > 
> oracle.jdbc.driver.OracleConnection.prepareStatement(OracleConnection
> > > > .java:538)        at
> > > > org.apache.commons.dbcp.DelegatingConnection.prepareStatement(
> > > > DelegatingConn
> > > > ection.java:197)
> > > > ...
> > > > =====  end of error mesg ====
> > > > 
> > > > What happen and how can I prevent this?
> > > > Thanks.
> > > > David
> > > > 
> > > > 
> > > > 
> > > > __________________________________________________
> > > > Do you Yahoo!?
> > > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now. 
> > > > http://mailplus.yahoo.com
> > > > 
> > > > --
> > > > 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:struts-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]>

Reply via email to