-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Mapping joins across jars
PostPosted: Mon Mar 26, 2007 1:06 pm 
Newbie

Joined: Mon Mar 26, 2007 12:57 pm
Posts: 3
Location: Canberra, Australia
I am attempting to deploy an EAR containing two jars.

Common.jar contains a table User.

App.jar contains tables that have createUser and lastUpdateUser columns.

Common.jar contains embeddables (CreateAudit, UpdateAudit) with a many-to-one join on the user id.

These embeddables are used in the entities in App.jar.

Oh: and we are using annotations.

When I deploy the ear to JBoss, it complains that the tables in App.jar refer to a nonexistent entity named User.

Both jars have a persistence.xml that sets the persistence-unit to "DefaultPersistenceUnit". Should I set them to different units and somehow tell the many-to-one join that it always joins to the "common" persistence unit? Is it not do-able at all?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 26, 2007 11:42 pm 
Newbie

Joined: Mon Mar 26, 2007 12:57 pm
Posts: 3
Location: Canberra, Australia
Ok.

I think the way to go is that the persistence.xml needs to contain a jar-file section so that both jars get loaded into the persistence unit.

However, I am coming across a weird bug. When my persistence xml contains
Code:
   <persistence-unit name="DefaultPersistenceUnit">
      <jta-data-source>java:/IngresDS</jta-data-source>
      <jar-file>genesis-common-server.jar</jar-file>
      <properties>



jboss whinge that it cannot find the jar file, and the reason it can't find it is that it is looking in the Jboss bin directory (!!!!).

Let's see if jboss 4.0.5 fixes this.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.