struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From josh <>
Subject ibatis and jndi pooling
Date Tue, 27 Jul 2004 18:47:04 GMT
I am trying to figure out how to use sqlmaps and struts.  Before sqlMaps
I would create a connection to the database using a plugin.  In my
init() I did something like this

this.ds = (DataSource) context.lookup("java:comp/env/" + lookupString);

This gave me a datasource object that I could use for my app, and I
could close the connection in the destroy() method of the plugin to be
sure that my connections would get closed up if tomcat were to be

Now that I use sqlMaps I still use a plugin, but there is no equivalent
close function to use in the destroy() method of the plugin.  This means
that if I remove my app from the server or restart it the old DB
connection gets orphaned but doesn't die.  And meanwhile my app gets a
new connection to the DB.  How do other people deal with this?  Am I
doing this completely wrong?  I can't find anything in the sqlMaps
documentation about this.

Joshua Cronemeyer
accessKansas - a service of the Information Network of Kansas, Inc. <>
785-296-2816 (phone)
785-296-5563 (fax) <>

This E-mail and any attachments are confidential.  If you are not the
intended recipient, you do not have permission to disclose, copy,
distribute, or open any attachments.  If you have received this E-mail
error, please notify us immediately by returning it to the sender and
this copy from your system.

Thank you.

View raw message