This content has been marked as final.
Show 6 replies
-
1. Re: Remove problem
marcosjara Dec 19, 2003 6:25 AM (in response to radl01)I have the same problem!!!
Can any body explain why Jboss do it! -
2. Re: Remove problem
marcosjara Dec 19, 2003 10:30 AM (in response to radl01)I found an option in standarjboss.xml configuration file <sync-on-commit-only>
I set this option to true but nothing happen. -
3. Re: Remove problem
juha Dec 19, 2003 6:24 PM (in response to radl01)Looks like a spec requirement:
10.5.3
The container synchronizes the instanceÂ’s state before it invokes the ejbRemove method.
This means that the persistent state of the instance at the beginning of the ejbRemove
method is the same as it would be at the beginning of a business method -
4. Re: Remove problem
vprise Dec 20, 2003 7:53 AM (in response to radl01)"juha@jboss.org" wrote:
Looks like a spec requirement:
<blockquote>
<b>10.5.3</b>
<br>
The container synchronizes the instance’s state before it invokes the ejbRemove method.
This means that the persistent state of the instance at the beginning of the ejbRemove
method is the same as it would be at the beginning of a business method
</blockquote>
I'm sorry but I don't see how setting a CMR value to null which is illegal and undermining relational integrity of the database can be understood from that statement.
Maybe I'm dense but it just says that you need to synchronize the instance state so everything will be updated in memory, but IMO ejbRemove should just fail if a CMR pointing at it has a foreign key and it should not try to second guess the programmer by setting it to NULL!
Even if the spec somehow demands this behaviour it is just plain stupid and a REAL workaround should exist, right now people in the forms are setting fields to "NOT NULL" and using insert after post create which is REALLY not according to the spec in order to get the behaviour that makes sense.
IMO this bug makes CMR almost useless, without the patchy workaround mentioned above you would have a serious race condition on your hands which could cause database corruption. -
5. Re: Remove problem
juha Dec 20, 2003 12:09 PM (in response to radl01)So file a bug report, if there's a workaround you'll hear about it.
-
6. Re: Remove problem
vprise Dec 24, 2003 4:22 AM (in response to radl01)"juha@jboss.org" wrote:
So file a bug report, if there's a workaround you'll hear about it.
I searched back then and there is a bug report.
It was claimed that this is intended functionality which IMO is just ridiculous and huge missinterpretation of the spec.
As I have specifically stated I have a workaround but its patchy and it is NOT what I am interested in. Sure I can solve this in code but then I will have my own forked version of JBoss which again is not what I need.
I just don't understand how something like this can be considered a "feature"? Who could possibly be interested in functionality that corrupts your database layer?