----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------

I have a question about an odd problem I'm seeing.

Is there a difference in the way a servlet gets launched if started by JServ
using the servlets.startup parm versus what happens if the servlet is
initialized because a request has been made against it?

I have a servlet that manages a pool of db connections that is used by other
servlets (say DBManager).  When the zone is configured to launch this
servlet at startup (via servlets.startup=DBManager parm in properties file)
it connects to the Oracle database, reads some config tables, and is fine.
When another servlet grabs a connection from the pool, the reserve method of
the DBManager servlet first tries to execute a simple query to check that
the connection is good, and the startup servlet takes an segment violation
trying to create a jdbc statement object, which is weird since the DBManager
actually uses the same reserve method to call the database during
initialization (and works just fine). 

However....if I do not launch the DBManager servlet at startup, but let it
get initialized by JServ once another servlet accesses it...then everything
is just fine.

We also see the same kind of behavior when launching  another applicaiton
server from the command line that works similar to the DBManager
servlet....as soon as a client calls the reserve method to get a database
connection, the thing takes a segment violation trying to create a statement
object.  It could be something flakey with the Oracle 8.1.5 client
libraries, as we never saw this happen with the 8.0.5 client libs.  It seems
bizare  though that the servlets work fine as long as I don't launch the
DBManager at JServ startup.  There must be a difference in how it starts.
Is there a thread issue maybe?

Thanks,
Cary Mader     
[EMAIL PROTECTED]




--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to