First, thanks so much for getting back to me! I've been struggling
with this for over a month now and have just about given up all hope
of anyone being able to help....
On Tuesday, September 10, 2002, 7:53:32 AM, Rodney wrote:
>> java.sql.SQLException: ORA-01012: not logged on
WR> This isn't a generic "not connected" error, it's an Oracle specific one,
WR> which suggests you are in fact able to connect to the database.
Well, it's interesting. Depending on the pooling used, the error
is all pretty similar. Some pools brings back the sql error "No
session" or something similar.
The problem doesn't occur at all when there is no pooling and
pooling normally works like a charm. It is only when the
connections are manually killed or the database goes down and
comes back up (without Tomcat being restarted).
WR> Do you see this problem when you're not using pooling at all? If not, can
WR> you provide some details on your pooling configuration?
Since I don't have this problem when not using Pooling and it only
occurs when connections are killed or the db goes down and comes
back up, here's how I have things set up:
In my server.xml file I have it set up like:
<Context path="/backoffice" docBase="backoffice" debug="0" reloadable="true"
crossContext="true">>
<Resource name="jdbc/BackofficeDB" auth="Container"
type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/BackofficeDB">
<parameter>
<name>username</name>
<value>pilotuser</value>
</parameter>
<parameter>
<name>password</name>
<value>pilotuser</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>oracle.jdbc.driver.OracleDriver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:oracle:thin:@dr_dev.obs.outback.com:1521:rdev</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>10</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>3</value>
</parameter>
<parameter>
<name>validationQuery</name>
<value>SELECT 'code' FROM RT_STATE</value>
</parameter>
</ResourceParams>
</Context>
I've tried all different types of validationQueries to see if
that would make a difference but it doesn't:(
Then when getting a connection and closing a connection I
would call the following methods in a DB class:
public static Connection getConnection() throws Exception {
Connection conn = null;
try {
conn = ConnPool.getInstance().getConnection( "backoffice" );
}
catch( Exception e ) {
ErrorLogging.println( "DbBean: "+e);
}
return conn;
}
public static void close( Connection dbCon, String msg ) {
if (msg == null )
msg = "";
if (dbCon != null ) {
try {
dbCon.close();
}
catch( Exception e ) {
ErrorLogging.println( "DbBean.java close() error. "+msg + ":"+e);
System.out.println( "DbBean.java close() error. "+msg + ":"+e);
}
}
}
The odd thing is everything above seems to work fine until the
connections are killed manually.
Thanks so much for sharing any ideas or thoughts on what could be
wrong or how I could set things up differently.
--
Rick
mailto:[EMAIL PROTECTED]
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>