I have persistence-context.xml in backend jar but all the entities in seperate 
JAR. Inside persistence-context.xml I reference this jar (persistence-unit.jar).


  | <persistence>
  |    <persistence-unit name="smarthome">
  |        <jta-data-source>java:/DefaultDS</jta-data-source>
  | 
<jar-file>C:/tools/jboss/jboss-4.0.4.GA/server/default/deploy/persistence-unit-1.0-SNAPSHOT.jar</jar-file>
 
  |        <properties>
  |             <property name="hibernate.dialect" 
value="org.hibernate.dialect.HSQLDialect"/>
  |             <property name="hibernate.hbm2ddl.auto" value="update"/>
  |        </properties>
  |    </persistence-unit>
  | </persistence>

the problem is that it is absolute which is not acceptable.

I noticed that when I put just the jar name I get exception that this file was 
not found in bin directory of jboss.

The strange thing was that when I tried ../persistence-unit-1.0-SNAPSHOT.jar it 
was not trying to resolve it relativly to bin directory but rather to EAR (my 
backend JAR is packed inside EAR, sorry if it is getting to complicated). So 
this works quite well for me since persistence-unit.jar is inside EAR but I am 
not sure about this solution. Is it documented somewhere?



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3949384#3949384

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3949384


_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to