Correct, you're using container managed transactions. You cannot call
commit.
On Thu, Oct 9, 2014 at 8:58 AM, joeleclems joelecl...@free.fr wrote:
i tried different kind of transaction within EJB.
Here are results of my tests :
1. Inject a CMT EJB to receive message.
My EJB :
@Stateless
transactionallity is contextual so ensure you are in a transactional
thread like replacing your own thread by an @Asynchronous method of an
EJB
Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau
2014-10-09 15:07 GMT+02:00
John D. Ament wrote
Correct, you're using container managed transactions. You cannot call
commit.
I try with container managed transactions (see #1) and bean managed
transactions (see #2) : what about error with BMT (#2) ?
--
View this message in context:
I try to use an @Asynchronous method... not sure to use it correctly, but
result is an exception.
My Ejb :
@Stateless
public class MyAsyncReceiver {
...
@Asynchronous
@Lock(LockType.READ)
@AccessTimeout(-1)
public void receiveMessage(int pType) {
...
Session.commit();