8 Replies Latest reply on Apr 3, 2006 12:46 PM by Emmanuel Bernard

    Attaching and dettaching EJB3 Entities

    dparrilla Newbie

      Hi,
      we are trying to build an app using the new EJB3 specification on JBoss, and we have the following scenario:
      1) A JBoss Server running the PAR component and several SLSB as a facade to the POJOs.
      2) Several TOMCAT instances running remotely.
      3) We don't want to build new Transfer Objects: we just want to recycle the already created POJOs in the PAR component.
      4) The POJOs are transfered from the JBOSS server to the remote TOMCAT server and viceversa.

      We have found that the POJOs Entitities have (strong) dependencies with Hibernate libraries, due to the lazy intialization, I suppose. Even using EAGER initialization of dependendencies between POJOs, the dependendencies are still there. So, we need to put several Hibernate libraries in the remote TOMCAT server (hibernate3, asm, asm-attr, cglib...) that should never be there.

      I think I need some way to 'dettach' the Hibernate infrastructure from the POJOs when transfering to the TOMCAT server.

      Anybody knows how to do this? Is this the right forum?

      Thank you in advance
      Diego