-
1. Re: Commit Option C and ejbLoad()
dsundstrom Jan 29, 2002 1:24 PM (in response to niklaus)You are correct. I would check to see if you are actually in the same transaction (get the transaction from the transaction manager and print the hashcode). My guess is you have not exited the outer most transaction.
Other wise file a bug report at sourceforge. -
2. Re: Commit Option C and ejbLoad()
ddeuchert Feb 6, 2002 12:55 PM (in response to niklaus)We are seeing the same behavior when we invoke a BMP entity bean from a client application (in our test suite). The ejbLoad method seems to be invoked inconsistently. The following assertion results in intermittent failures
{
...
Book book = bookHome.create();
book.setName("");
assertNull(book.getName()); // If we get an ejbLoad this
//value would be null
...
}
We have no user transaction active so each call on the entity is invoked in a separate transaction.
This looks like a defect to me... Has it been logged? -
3. Re: Commit Option C and ejbLoad()
ademelt Apr 30, 2002 11:02 AM (in response to niklaus)We have the same problem. Our commit-option-C entity bean is not ejbLoad()ed when invoking a method outside a transaction context.
This is because jboss removes the entity bean from the cache only after the transaction has completed (as stated by the spec). The case when running without a transaction remains unspecified and unhandled. Thus, the container still treats the bean as valid for the next method invocation.
The same problem should apply to commit-option-B entity beans, but we haven't checked this.
Hey JBoss developer(s): We have implemented a fix for this problem and it seems to work in our case, but I don't have the time and deeper knowledge of JBoss in order to handle this correctly. Please contact me so we can discuss the details. -
4. Re: Commit Option C and ejbLoad()
oravecz May 1, 2002 1:31 PM (in response to niklaus)We are also experiencing intermittent behavior. We use commit option C, and the ejbLoad() method is sometimes not called when the entity is first enlisted into a new transaction.
Using the current head (jBoss 3.1 alpha). -
5. Re: Commit Option C and ejbLoad()
dsundstrom May 1, 2002 3:36 PM (in response to niklaus)If you want this fixed you need to post a bug report with a testcase, otherwise this issue will disappear into the ether.
-
6. Re: Commit Option C and ejbLoad()
oravecz May 1, 2002 4:43 PM (in response to niklaus)Dain, these intermittent problems are the toughest to isolate into a neat test case. Perhaps, it would be easier to isolate a bug in the code by analyzing it. Can you relate the classes that one may look at that control when and under what circumstances ejbLoad() is invoked?
-
7. Re: Commit Option C and ejbLoad()
dsundstrom May 1, 2002 6:23 PM (in response to niklaus)I think this is an interaction between the cache and the EntityInstanceInterceptor, but this is outside of my area of expertise.
I would bet you could just create a couple of clients that set instance variables in a commit option C bean to see interaction.
If you can't create a testcase, just create a detailed bug report.