I've got a problem in my Java EE app - in general, I persist one object, send a JMS, and on MDB I'm trying to find that object - sometimes it works, but sometimes I receive null on JPA find. I suspect that transaction didn't finish, but I can't find solution for this.
I'm not sure if I understand correctly - in CMT, transaction starts in the moment of invocation a method of Session Bean from @Local or @Remote interface? What if I have a chain of methods in this Session Bean and only one of them persist my object - does all chained methods will be invoked in one transaction? What if some of them are also exposed in interface?
Sending JMS is one of the chained methods - should I rather also expose this method in interface and call it after method that persist my object? What if I wouldn't want to expose that method in interface?
Sorry for any lack of EJB knowledge. Thanks for any help :)