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

    Session Bean -> Entity Bean

      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
          florian79

          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"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
           version="1.0">
           <persistence-unit name="jta-name" transaction-type="JTA">
           <jta-data-source>java:/DB</jta-data-source>
           <jar-file>D:/jboss-4.0.4.GA/server/default/external.jar</jar-file>
           <properties>
          <!-- some properties... -->
           </properties>
           </persistence-unit>
          </persistence>
          


          • 2. Re: Session Bean -> Entity Bean

            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.