On Tue, 2 May 2006, Anshuman Srivastava wrote: > Thanks Kenny for your reply.I am not using <packaging>par</packaging>.I am > using <packaging>jar</packaging> as I thought that building jar is > sufficient for my final deployable war file.
well, that depends. You don't need par, jar works fine too. For a war, you need packaging war but you already knew that. If you want to use persistence archives from a WAR you'll need to add a dependency from the war to the par, and you need to separately deploy the par (or put it in an ear). > > And you are correct that every ejb module has its own persistence manager,I > have 2 persistence.xml in 2 ejb modules. Ah ok, I misunderstood your mail then. > Do I need to change packaging as "par" ?Any other changes required i > pom.xmlfor depenedncy on > persitsence.xml?I am a first time user of Maven and dont know much about > EJB. No you don't need packaging par, since a par is just a jar. The par plugin is still in the sandbox anyway. If you need to automagically get your persistence.xml in the archive, then just put it in src/main/resources/META-INF/persistence.xml and it'll end up in the correct place. You don't need a dependency to do that. -- Kenney > > Anshuman > > > On 5/2/06, Kenney Westerhof <[EMAIL PROTECTED]> wrote: > > > > On Tue, 2 May 2006, Anshuman Srivastava wrote: > > > > Hi, > > > > Every ejb module has its own persistence manager, so you really need > > 2 persistence.xml files (unless I'm wrong..) > > > > I've got one in src/main/par/META-INF/persistence.xml - you're using the > > <packaging>par</packaging>, right? > > > > -- Kenney > > > > > Hi > > > > > > I have a multi module project.My problem is that 2 of my ejb modules > > have > > > the depedency upon peristence.xml, which is at the same location as > > pom.xml. > > > > > > How to define the dependency in pom.xml for peristence.xml?? > > > > > > My persistence.xml is like-- > > > > > > <?xml version="1.0" encoding="UTF-8"?> > > > > > > <persistence> > > > <persistence-unit name="dms" transaction-type="JTA"> > > > <provider>org.hibernate.ejb.HibernatePersistence > > </provider> > > > <jta-data-source>java:/OracleDS</jta-data-source> > > > <class>com.dms.dao.RepositoryDAO </class> > > > <properties> > > > <property name="hibernate.dialect" > > > value="org.hibernate.dialect.SQLServerDialect" /> > > > <property name=" hibernate.hbm2ddl.auto" > > value="none" /> > > > <property name="hibernate.show_sql" value="false" > > /> > > > </properties> > > > </persistence-unit> > > > > > > </persistence> > > > > > > Pleasehelp. > > > > > > Thanks in advance > > > Anshuman > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > > Kenney Westerhof > > http://www.neonics.com > > GPG public key: http://www.gods.nl/~forge/kenneyw.key > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > -- Kenney Westerhof http://www.neonics.com GPG public key: http://www.gods.nl/~forge/kenneyw.key --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]