Can anyone explain the various steps to be involved in implementing CMR for an entity bean between two tables in Weblogic?

Showing Answers 1 - 2 of 2 Answers

Jack

  • Feb 28th, 2006
 

3 ways:

  • One-to-one
  • One-to-many
  • Many-to-many
  • The EJB 2.0 approach to CMP allows multiple entity beans to have container-managed relationships among themselves. It accomplishes this by introducing a local model which uses local interfaces, in addition to a remote model that uses remote interfaces. The CMP local model can be more tightly coupled than the remote model, and it avoids the performance overhead of the remote model. It is also closer to the Java programming model, particularly in regards to passing parameters between enterprise beans.

    The entity bean uses a Java Collection to represent the "many" side of a relationship. The single side is represented by the local bean object.

    The EJB container maintains the referential integrity of these entity bean relationships. For example, in a one-to-one relationship, if you change one side of the relationship, the container automatically drops the old relationship and replaces it with the newly formed one-to-one relationship. You can also specify a "cascade delete" option, whereby when you delete one object, the container also deletes all of that object's dependent objects.

      Was this answer useful?  Yes

    karthik

    • Apr 13th, 2006
     

    hai tere

    To declare the relationship b/w the beans there are three ways

    1.one-one,2. manyto one or one to many and 3. many to many

    we have to declare the beans informantion in DD(Deployement Descriptor) and we have to declare the relationship b/w beans in separately in that same DD.

    simple way to

    Ex

    <abs schema> beanname </abs schema>

    <multiplicity>one or many</multiplicity>

    <cmr name> another beanname</cmrname>

    <cmr type> returntype if the relationmaking bean's multiplicity is many</cmrtype>

    <cascade delete> if the current bean multiplycity is 1</cascadelete> 

      Was this answer useful?  Yes

    Give your answer:

    If you think the above answer is not correct, Please select a reason and add your answer below.

     

    Related Answered Questions

     

    Related Open Questions