-
1. Re: Adding CMR fails
jbm166 Dec 16, 2004 3:58 AM (in response to jbm166)I need a simple testcase that shows the difference. So far I believe you are doing something wrong. If you have enough information for me to reproduce this, please, open a Jira issue on jira.jboss.com.
-
2. Re: Adding CMR fails
aloubyansky Dec 17, 2004 5:06 AM (in response to jbm166)How did it work in 3.2.2?
Try http://www.jboss.org/wiki/Wiki.jsp?page=InsertAfterEjbPostCreate -
3. Re: Adding CMR fails
jbm166 Dec 17, 2004 6:03 AM (in response to jbm166)Hi,
Thanks for your answer.
In JBoss 3.2.2, obviously the getB().add(relation) was commited immediately, since when the loop was iterating the second round the unique constraint was not triggered when creating a new B entity (Meaning that the foreign key had been set)
Where it is clear that in 3.2.5 getB().add() is not commited inside the loop but after, so that the foreign key is not immediately added.
I tried the insertAfterEjbPostCreate and it did not work better.
I don't think it would help anyway, since in this case the A entity already exist. We only create B entities that we map to A.
And this mapping happens in this method, not in the ejbPostCreate method of the B entity.
It is quite a surprising problem, because this code is generated by XDoclet and I found also the same code example of "howto add CMR" in different EJB manuals.
J&B -
4. Re: Adding CMR fails
aloubyansky Dec 19, 2004 11:09 AM (in response to jbm166)Do you have a testcase that I can run on 3.2.2 and 3.2.5 and see what you are talking about? Updates were always committed at the end of the tx in all versions or other times when synchronization is required but not after adding CMR value.
-
5. Re: Adding CMR fails
jbm166 Dec 21, 2004 2:24 AM (in response to jbm166)Hello,
No I don't really have any testcase.
Fact is that I m not an expert concerning transactions and so on, so I m actually wondering if problem comes from something I did wrong. However same code seems to behave differently in 3.2.2 and 3.2.5.
I could maybe send you couple of classes if that's ok ? -
6. Re: Adding CMR fails
aloubyansky Dec 21, 2004 3:25 AM (in response to jbm166)I need a simple testcase that shows the difference. So far I believe you are doing something wrong. If you have enough information for me to reproduce this, please, open a Jira issue on jira.jboss.com.
-
7. Re: Adding CMR fails
jbm166 Dec 21, 2004 5:17 AM (in response to jbm166)Hello,
I added it to jira.
Here is the KEY : JBAS-72 -
8. Re: Adding CMR fails
aloubyansky Dec 28, 2004 3:53 AM (in response to jbm166)I will look at it. Thanks.
It's possible that there was something wrong with 3.2.2 but I need to check. -
9. Re: Adding CMR fails
jbm166 Mar 8, 2005 5:42 AM (in response to jbm166)Hello,
Is this thread still alive ?
Has somebody had time to check this matter ?
Thanks.
Regards.
J&B