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>
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.