users@glassfish.java.net

RE: ‘TimeToLiveTimeout’ property for SJAS JDBC Connection pool

From: Martin Gainty <mgainty_at_hotmail.com>
Date: Fri, 5 Jun 2009 08:45:01 -0400

you're looking to set parameter
ypu eant to set the m_timeOutThread attribute
of oracle.jdbc.pool.OracleConnectionCacheImpl extends OracleDataSource implements Serializable
http://www.orindasoft.com/public/Oracle_JDBC_JavaDoc/javadoc1010/serialized-form.html

so the configuration would look something like:
 <Resource name="jdbc/myDataSource" auth="SERVLET"
   type="oracle.jdbc.pool.OracleConnectionCacheImpl"/>
 <ResourceParams name="jdbc/myDataSource">
   <parameter>
   <timeOutThread>
        5
   </timeOutThread
   </parameter>
   <parameter>
     <name>factory</name>
     <value>org.apache.naming.factory.BeanFactory</value>
   </parameter>
   <parameter>
     <name>driverType</name>
     <value>thin</value>
   </parameter>
   <parameter>
     <name>serverName</name>
     <value>hue</value>
   </parameter>
   <parameter>
     <name>networkProtocol</name>
     <value>tcp</value>
   </parameter>
   <parameter>
     <name>databaseName</name>
     <value>XXXX</value>
   </parameter>
   <parameter>
     <name>portNumber</name>
     <value>NNNN</value>
   </parameter>
   <parameter>
     <name>user</name>
     <value>XXXX</value>
   </parameter>
   <parameter>
     <name>password</name>
     <value>XXXX</value>
   </parameter>
   <parameter>
     <name>maxLimit</name>
     <value>5</value>
   </parameter>
 </ResourceParams>
if none of that works you can always specify the parameter on your connection string
//in code you would acquire the connection
Connection objConnection = DriverManager.getConnection(
"jdbc:thin_at_localhost:7001/DBName;timeOutThread=5;
logFile=c:\output.txt; ", <username>, <password>);other suggestions?
Martin
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




> Date: Fri, 5 Jun 2009 02:08:25 -0700
> From: glassfish_at_javadesktop.org
> To: users_at_glassfish.dev.java.net
> Subject: ‘TimeToLiveTimeout’ property for SJAS JDBC Connection pool
>
> My application runs on Sun Java Application server v8.1 and it connects to an 0racle(10g) DB using the application server's jdbc connection pool. The datasource class name used in the pool is 'oracle.jdbc.pool.OracleDataSource'.
> I have enabled connection caching and I want to use the 'TimeToLiveTimeout' property for this DataSource.'TimeToLiveTimeout' property and its value is set using the OracleDataSource's setConnectionCacheProperties(Properties prop) method. But I could not find a property in the pool that could set the ConnectionCacheProperties for this datasource.
> How can I configure this value in application server's connection pool?
> [Message sent by forum member 'java_doubts' (java_doubts)]
>
> http://forums.java.net/jive/thread.jspa?messageID=349268
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>

_________________________________________________________________
Lauren found her dream laptop. Find the PC that’s right for you.
http://www.microsoft.com/windows/choosepc/?ocid=ftp_val_wl_290