I am doing all of the object creation inside a single transaction as far as I know, by running inside a SLSB with RequiresNew as the Transaction type. The transaction type of ejbCreate is Requires, which won't create a new transaction will it? I suppose I could change it to Supports?
I've never been forced to use ejbPostCreate for CMR setting before, although I have done it that way in the past. I'm currently using androMDA to do code generation, and I generally leave the CMRs out of my EJB create methods. I'll be putting a bug in on this one as soon as I get a spare moment and can write a very small program that demonstrates the bug. -Neal On January 22, 2004 05:19 am, Jonathan.O'[EMAIL PROTECTED] wrote: > 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 ------------------------------------------------------- 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