i'm not sure how you're exactly accessing the various beans n methods, but you mention something that will point to the solution:
Calling the CMR method getAddenda() that returns the Set works
perfectly from another bean, but I would like to call it from custom
JSP tags in the web tier of the same server. When I try this, I get the
The act of instantiating a collection of related objects and then retrieving the value objects from that collection must be done in the same transaction.
I suspect that when you call the 'getAddenda()' method from another bean, the methods on that bean require a transaction. You can check your configuration for this.
However, I'm not sure, but I suspect that servlets (e.g., JSP pages) do not wrap entire methods in a transaction. You'll have to do this yourself.
I was running into the same sort of problem running JunitEE tests. I had to augment my JunitEE tests with something like the following (code example not complete):
Context ic = new InitialContext(); tx = (UserTransaction) ic.lookup ("java:comp/UserTransaction"); tx.begin(); AccountLocal lObj = home.findByPrimaryKey(objKey); AccountValue vObj = lObj.getAccountValue(); tx.commit();
this is because I had created value objects for another bean (1:n) related to Account. sooo, the 'getAccountValue()' method also retrieves value objects for the Account children, all in one method call.
Thank you for your reply, except that I haven't deployed my application yet :(.
I am just tring to get JBoss up w/o exceptions.
Ignore above, wrong thread.