Perhaps not the most elegant solution, but you could try: 1) getting the db connection first in b(), 2) passing the db connection to a() from b(), not closing the db connection in a(), but 3) closing the db connection in b() after the call to a() returns...



At 08:48 03/11/12 +0100, you wrote:
I 've got a serious transaction related problem with castor 0.9.5.2 and
JBOSS 3.2.2. I am working with
stateless session beans using CMT and castor. Usually  a method like

method a() {

db =_jdo.getDatabase()

// do something

db.close();
}

works fine.

If a() is called within a second method b(), for example,

method b() {

this.a();

db = _jdo.getDatabase()

// do something

db.close();

}


which is also CMT, the db.close() of a() closes my connection and I receive an exception "Database not open". If I leave out the db.close() everything works, beside i get now a container warning, that i left open a connection. Is there a solution?


regards


Eike

----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev




Reply via email to