0 Replies Latest reply on Nov 6, 2002 11:15 AM by robbiest

    BMP entity beans - some very basic questions.

    robbiest

      Thanks in advance for any replies. Here are some very simple questions about BMP that keep me awake at night. Because tutorial examples on the web and in textbooks are often so trivial, I can't find concrete answers and solutions to these questions.

      1. Are entity beans ever automatically removed from the container? I don't necessarily want to call remove if the call is going to delete a db entry. What happens if 10,000 people log into a site? Do we end up with say 9,500 passivated references?

      2. How can I safely passivate a BMP entity bean? Currently unsetEntityContext is automatically called by JBoss during passivation. This is especially driving me nuts.

      3. Are entity beans' EntityContext serialized anyway or do you have to lazy load them from a SFSB? Currently I am storing PKs of entities in the SFSB to regenerate entities but this is my own hack.

      4. I understand (from Monson-Haefel) and I may be wrong about this is that entity variables are never serialized. Should variables be set as transient or does it even matter?

      5. With respect to BMP, Monsol-Haefel keeps his integer primary key as a variable of his entity and doesn't use the EntityContext to refer to it in ejbStore. Why might he refer to the PK in this manner?

      6. Regarding ejbActivate and ejbPassivate, apart from resource managing is there any special code which needs to go into these methods for BMP.

      7. Does anyone know of a simple example which demonstrates a simple passivation / activation cycle?

      Again many many thanks for anyone who can answer these questions.