Neal,
What are the transaction types for the ejbCreate(), the 
ejb.setRelatedItem(item) and the calling method? You must be creating 
multiple transactions, and with commit-option A, its caching the value. 
Still doesn't make sense though. Also, why can't you move setting the CMRs 
into ejbPostCreate?
Ciao,
Jonathan O'Connor
XCOM Dublin



Neal Sanche <[EMAIL PROTECTED]> 
Sent by: [EMAIL PROTECTED]
21.01.2004 22:55
Please respond to
[EMAIL PROTECTED]


To
jboss-user <[EMAIL PROTECTED]>
cc

Subject
[JBoss-user] Commit Option A and ejbCreate [auf Viren geprüft]






Hi All,

I have recently been experimenting with Commit Option A and have 
noticed on rare occasions that creation of an EJB and subsequent 
setting of some of its CMRs will fail with an EJB spec violation in 
JBoss 3.2.4RC1. The exception mentions that the CMR should only be 
set in the ejbPostCreate. However, I am not actually setting any CMRs 
in the ejbCreate, I am doing so in subsequent lines of the code. For 
example:

  MYEJBLocal ejb = myhome.create();
  ejb.setRelatedItem(item);

The exception will occur on the call to setRelatedItem() which is a 
CMR method, which is in this case a one to one relation. I am also 
using the unknown-pk functionality with mysql to have 
auto-incrementing primary keys, if that makes a difference.

So far, this doesn't ever happen when the commit option is B, which is 
the default in the Entity container.

Any ideas?

-Neal



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user




-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to