I have found another way to get the INSERTING AN ALREADY EXISTING BEAN 
bug to appear.  The following code you would add to LineItem (in an 
Order-LineItem relationship):

    public String ejbCreate(Long id, Order order) {
       setId(id);
       return null;
    }

    public void ejbPostCreate(Long id, Order order) {
       order.getLineItems().add((LineItem)ctx.getEJBLocalObject());
    }

I think the problem is because ejbCreate and ejbPostCreate being 
combined into the same invokeHome.  When ejbCreate is being invoked the 
entity is an a special state, but ejbPostCreate should be treated as 
just a standard method invocation after ejbCreate completes (back to the 
EntityContainer).

Unless someone has a better idea, or a good bug fix for this problem, 
I'm going to start looking in breaking ejbCreate and ejbPostCreate into 
two steps.

-dain


_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to