This content has been marked as final.
Show 3 replies
-
1. Re: JGroups Configuration With XML Element
juha Oct 15, 2003 6:49 AM (in response to joostdenboer)Your XMLConfigurator changes added a bug, and it makes your changes unlikely to work.
The try block at line 323 in the parse method that takes an Element as a parameter starts like this:try { Node root=null; NodeList roots=root_element.getChildNodes(); for(int i =0; i < roots.getLength(); i++) { root=roots.item(i); if(root.getNodeType() != Node.ELEMENT_NODE) continue; } String root_name=root.getNodeName();
Considering that the Element passed is likely the "config" element, this code would not work, and since the root node is always assigned regardless of its node type in the for loop, who knows what node you will end up with.
I made the following changes in order to get the expected behavior:try { Node root=root_element; // NodeList roots=root_element.getChildNodes(); // for(int i =0; i < roots.getLength(); i++) { // root=roots.item(i); // if(root.getNodeType() != Node.ELEMENT_NODE) // continue; // } String root_name=root.getNodeName();
Can you commit this change (or something like it) to CVS? -
2. Re: No new transaction started with RequiresNew
joostdenboer Oct 16, 2003 6:18 AM (in response to joostdenboer)"joostdenboer" wrote:
"joostdenboer" wrote:
I've checked them multiple times. What could I have done wrong ? I only expect that I could have made a mistake in the ejb-jar.xml , but that one is correct.
I modified the code so that the method which I want in a seperate transaction is in another sessionbean. This 2nd bean also has container managed transactions and I put the transaction attribute of the method also to RequiresNew.
Now suddenly it works. The transaction started by bean1 is suspended, a new transaction is started before the method of bean2 is called, the transaction is commited after the method ends and the original transaction is resumed.
So, in 2 different beans it works, but in 1 single bean it doesn't.
Any idea why ?
Joost -
3. Re: No new transaction started with RequiresNew
juha Oct 16, 2003 6:34 AM (in response to joostdenboer)"juha@jboss.org" wrote:
"juha@jboss.org" wrote:
Yes, you must not call bean's own remote methods directly from your bean implementation, rather you need to call context.getEJBObject() and invoke on the returned proxy. This guarantees the proper transaction and security propagation, etc.
Calling the bean's other business methods directly from within implementation is incorrect.
-- Juha