Doubt ? container-managed entity bean

Discussions

EJB design: Doubt ? container-managed entity bean

  1. Doubt ? container-managed entity bean (1 messages)

    Hi All,
    As i have understood, in Bean-managed entity bean we have option as to how we can access to the database,store and retrieve data; we generally hardcode it in the implementation.

    I have following doubts.....

    1) But what happens in the container managed entity bean?
    Will the container take of it? If yes then when?During deployment ?

    2)What could be there in the container that takes care of database connectivity?

    Thanks in advance
  2. Doubt ? container-managed entity bean[ Go to top ]

    hello Sam,

    In a Container Managed Persistence environment, during deployment all the details like, the attributes that need to be persisted, the primary keys, the transactional attributes for the various methods would be specified by the deployer. The information will be provided to the Deployer by the Bean Provider through the Deployment descriptor ( which is an XML document ). The SQL necessary to access the various persistent attributes as well as the actual database to access is specified by the deployer and this is transparent to the Bean Developer.

    In the latest EJB Spec there is a specification of a Persistence Manager which will be a part of the container and would take care of persistence issues.

    Thanks

    -U