View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3821315#3821315

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3821315

Hi,



Thanks for response but cannot work:



I insert :

<container-configurations>

  <container-configuration extends="Standard CMP 2.x EntityBean">

  <container-name>foobar</container-name>

  <insert-after-ejb-post-create>true</insert-after-ejb-post-create>

  </container-configuration>

</container-configurations>

in my jboss.xml and I threw the exception:

"Primary key for created instance is null" when I returned from ejbCreate. It's 
because JBOSS wants to gets the primary key just after the ejbCreate method.



Another problem is that I dont know how to generate the container configuration with 
XDoclet. So I have to patch the file jboss.xml each time the file is regenerated.



In fact, I saw one solution on other forums: I create CMP fields for foreign keys and 
I initialize them in ejbCreate, then I initialize CMR fields in ejbPostCreate. This 
solution work, even if it is not in the state of the art.








-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to