2 Replies Latest reply on Feb 13, 2007 6:05 AM by bhupesh ravish

    Session Bean -> Entity Bean

    bhupesh ravish Newbie

      How will a session bean look up for an entity bean when both are packed in different jars i:e session bean in *.ejb3 and entity bean in *.par .

      *.ear -> *.par
      -> *.ejb3
      -> *.war

      at time of deployment it is giving error saying that factory manager must not be NULL...

        • 1. Re: Session Bean -> Entity Bean
          Florian Bauer Newbie

          place the persistence.xml into the META-INF of your .ejb3 and refer to the other archiv by noting <jar-file>D:/jboss-4.0.4.GA/server/default/external.jar</jar-file>

          <persistence xmlns="http://java.sun.com/xml/ns/persistence"
           xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
           <persistence-unit name="jta-name" transaction-type="JTA">
          <!-- some properties... -->

          • 2. Re: Session Bean -> Entity Bean
            bhupesh ravish Newbie

            Hey thanx for replying.
            But I dnt think persistence.xml is placed in ejb3 as it is the extension for session beans. I already placed it in my par. I used <entity-manager> tag in it. Nyways its working now. In my case was with war file n is solved now.