> DAIN,
>
> try this thread, online, there were changes done to the tx interceptor by
anatoly akkerman, maybe I missed > something when I ok'ed it
>
> regards
>
> marcf
I'm not sure which forum you are talking about. There is a discussion about
JXM transactions in the JMX forum, but this is not a JMX issue. I'll
continue here, unless you can suggest a better forum.
I have done much more debugging on the relationship test code and have come
to the conclusion that Bean managed transactions are broken. What I did was
to change the TX type of my entities to mandatory, which should be ok
because the entities are only called from inside of a bean managed
transaction. With that change in place, I am getting an exception
(Transaction Required, read the spec!) when I call the bean.
I think I just figured out the problem, but I don't know how to solve it.
When you start user transaction (ctx.getUserTransaction().begin()) it is not
associated with the Invocation object (this is in
EnterpriseContext.UserTransactionImpl). Therefore, when I call my entity it
does not find an existing TX in mi, thus an exception is thrown.
The runTestCase method from my SLSB and part of the stack trace follows
after this message.
-dain
runTestCase method from my EJBTestRunnerBean:
----------------------------------------------------
private void runTestCase(EJBTestCase testCase) throws RemoteTestException {
try {
System.out.println("BEGIN TRANSACTION runTestCase");
ctx.getUserTransaction().begin();
try {
testCase.runBare();
} catch(Throwable e) {
throw new RemoteTestException(e);
}
if(ctx.getUserTransaction().getStatus() == Status.STATUS_ACTIVE) {
System.out.println("COMMIT TRANSACTION runTestCase");
ctx.getUserTransaction().commit();
}
} catch(Throwable e) {
try {
System.out.println("ROLLBACK TRANSACTION runTestCase");
ctx.getUserTransaction().rollback();
} catch(SystemException unused) {
// eat the exception we are exceptioning out anyway
}
if(e instanceof RemoteTestException) {
throw (RemoteTestException) e;
}
throw new RemoteTestException(e);
}
}
Part of the stack trace:
----------------------------------------------------
<error message="Transaction Required, read the spec!"
type="net.sourceforge.junitejb.RemoteTestException">
javax.ejb.TransactionRequiredLocalException: Transaction Required, read the
spec!
at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invokeHome
(BaseLocalContainerInvoker.java:290)
at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker$HomeProxy.invoke
(BaseLocalContainerInvoker.java:428)
at $Proxy11.findAll(Unknown Source)
at org.jboss.test.cmp2.relationship.oneToManyUnidirectional.ABTest.
deleteAllAsAndBs(ABTest.java:304)
at org.jboss.test.cmp2.relationship.oneToManyUnidirectional.ABTest.
setUpEJB(ABTest.java:292)
at
net.sourceforge.junitejb.EJBTestRunnerBean.setUpEJB(EJBTestRunnerBean.java
:72)
...
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development