4 Replies Latest reply on Jun 4, 2009 4:51 AM by Vinay Kumar

    Problem with CMP

    Vinay Kumar Newbie


      My Scenario is as follows,
      - I'm haivng a main SLSB, which is placing a call to child SLSB
      - I'm getting some entities from child SLSB
      - I'm changing those entities
      - And, assuming that CMP will persist those entities

      - Sometimes entities get perisisted
      - And, sometimes it doesn't

      I'm not making use of merge(), as you can see from the dummy code shown below; I'm just changing the properties & leaving it to the container for persistence.

      Please suggest.


      public class ProductBean
       private ComponentBean mComponentBean;
       public void renameMyEntity(String anOldName, String aNewName)
       MyEntity entity = mComponentBean.findMyEntity(anOldName);
       // change properties of MyEntity
      public class ComponentBean
       public MyEntity findMyEntity(String aName)
       return ..;