josh wrote:
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
restarted.

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.

It's becuase SQL maps does it for you!

You should try it just making connections in SQL maps for now.
Then, if you want move to having container making a DataSourcePool and SQLMaps just using that pool.
.V


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.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to