1 Reply Latest reply on Dec 17, 2007 6:58 AM by Pete Muir

    HotelSearchingAction in booking example

    Madhav Inamti Novice

      HotelSearchingAction ( a stateful session ejb ) uses a non SMPC and the PersistenceContext is not extended. Is this correct ? I was thinking if it was a stateful session bean, an extended PC is better.

      How is the HotelSearchingAction destroyed and does the entityManager need to be closed ?

      Thanks,
      M

        • 1. Re: HotelSearchingAction in booking example
          Pete Muir Master

          You need to make design decisions for your particular app. Certainly using a extended SMPC in the booking example would have been possible, but just not how it was designed. Instead entities become detached and have to be merged to become managed again.

          It's destroyed at the end of the session. The container managed the entity manager lifecycle, so no, it doesn't need to be closed.