Glad you found the culprit. If you are using an EJB 3 container, the use of an AroundInvoke interceptor may provide a means to handle runtime exceptions and maintain the state of the transaction. -Jeremy
On Thu, Jan 22, 2009 at 1:39 PM, is_maximum <[email protected]> wrote: > > Thanks Jeremy > > I just found that persist() method has thrown a runtime exception and there > was no log to see and because I hadn't handled the exception to rollback > the > transaction, the next begin-transaction encounters an undecided transaction > and of course the message was true. > > but now my question is I cant put a try-catch to catch all the runtime > exceptions and rollback the tx. is there any other way to manage this? > > thanks anyway > > > > Jeremy Bauer wrote: > > > > Hi, > > If you are using UserTransaction, does your SLSB use bean managed > > transactions? In EJB 3.0, container managed transactions are the > default, > > so TX configuration is very easy to overlook. Depending on the app > > server, > > using UserTransaction within a container managed tx bean will likely have > > ill effects. If you are certain that transactions are bean managed, are > > there any places where you may be starting a global TX but not completing > > it > > (in a web module, perhaps)? There are many other possibilities as well, > > but I'd start with these. If everything looks good, please send more > > details - such as the app server you are using, OpenJPA version, and more > > details about your app - and if possible, test code. > > > > -Jeremy > > > > On Wed, Jan 21, 2009 at 2:33 AM, is_maximum <[email protected]> wrote: > > > >> > >> Hi > >> I am using UserTransaction in my stateless session bean and got this > >> error > >> and all the process will stop > >> > >> ERROR - The stateless session bean started a transaction but did not > >> complete it. > >> > >> there is a method in which some other private methods is being called. > >> > >> can anyone help me out > >> -- > >> View this message in context: > >> > http://n2.nabble.com/using-UserTransaction-problem-tp2191081p2191081.html > >> Sent from the OpenJPA Users mailing list archive at Nabble.com. > >> > >> > > > > > > -- > View this message in context: > http://n2.nabble.com/using-UserTransaction-problem-tp2191081p2199698.html > Sent from the OpenJPA Users mailing list archive at Nabble.com. > >
