On Apr 11, 2006, at 5:54 AM, Jason Woollard wrote:
Hi,
I'm very new to EJBs in general and am trying to replace some POJO
classes
used to access mySQL in a tomcat webapp. I've had a very interesting
journey configuring all the relevant xml files and so forth but
have hit
against the following error message:
11-Apr-2006 00:50:25 org.exolab.castor.jdo.engine.DatabaseImpl
finalize
WARNING: An open database instance
([EMAIL PROTECTED]:Local_TX_Database)
against database: Local_TX_Database has been encountered. This
instance
will be closed now to release system resources. Please consider
changing
your code as well to enforce that all database connections are closed
after use.SQL executed, but not closed:null
11-Apr-2006 00:50:25 org.castor.jdo.engine.DatabaseRegistry
loadDatabase
I'm using mySQL 5, Tomcat 5 and the stable release of openEJB 1.0
I was curious as to whether the fact tomcat is still connecting to
mySQL
via a JDCB declaration in its server.xml could cause this error -
although
surely mySQL can handle simultaneous connections. I saw this was
recorded
as a bug (http://www.mail-archive.com/[email protected]/
msg00595.html) and
its apparently resolved so I'm really stuck as to what to try next.
I can provide all my relevant source and conf files if it helps, in
this
instance I'm trying to retreive a pre-existing users details via their
logon id (primary key integer in the db) using a findByUserID(int id)
method - perhaps its just me doing something wrong with the remote,
home,
object classes.
Hi Jason,
Your app is fine. That's a very nasty and false warning. I did work
this out with the Castor guys, here is the jira for reference:
http://jira.codehaus.org/browse/CASTOR-1356
It's fixed in Castor 1.0-M4 and Castor 1.0 final. Our OpenEJB 1.0
pre-dates either of those, so if you replace the castor 1.0-M1 jar
with either the castor-1.0-M4 or castor-1.0 jar the false error
message should go away.
A side note on the Castor config files, in the 3.0 branch of OpenEJB
you only need a cmp.mapping.xml file next to the ejb-jar.xml your ejb
jar archive and no longer need to supply all those other database
files (e.g local tx database and global tx database).
If you or anyone wanted to contribute, backporting that fix from 3.0
to 1.0 would be excellent. I'd be happy to release an OpenEJB 1.1
immediately with that fix and as well as including the final 1.0 of
Castor.
-David