spent a hard day on this and seem to have discovered some things.

1.  I need to build an ear project, and set the j2ee dependencies to include 
the projects i want in the ear.  This is the only way i can see to set the J2EE 
dependencies on the individual projects themselves.

2. create the various projects and set their respective dependencies.

3. I tried to create the domainModel entity project as a utility jar (they are 
after all POJOs) - however, the persistence unit if using  entity.class wont 
recognise the class with an @entity tag unless its in the same module - 

what this means is that that i had to define the persistence unit in the same 
project as the entity classes themselve.

however whilst this compiles - I cant get the Ear to load in the server it says 
it cant start my persistence unit.

4.   Instead i had to rebuild the domainModel as an ejb file (not a utility) 
with its persistence unit - and include this into the EAR instead.  

This seemed to make it happy and it loads the EAR and my code seems to work.

However I now have ejb projects not util projects for my pojo entities.  This 
does feel kinda counter intuitive.

5.  I re read chapter 11 in "EJB in action" where it talks about peristence 
unit scoping - but i dont quite get it.  It implies i can create an persistence 
unit in a JAR - but i have to put the jar in the /lib directory in the EAR. 

 not sure how do do this - as my eclipse EAR project has an EARContent and 
META-INF dir but no lib - and how would put any jar file (with persistence.xml) 
into that /lib dir?

do i have to create it by hand ? tried and tried to link to util project and 
got all messed up.

All in all a hard day - Is it just me or does any else find the dearth of 
material on how to use eclipse for large persistence projects something 
frustracting?

how any one focuses on code writing without getting stuck in build structure 
problems to distract one is a bit of a mystery.

Would still appreciate anyone with a little more knowledeg than me explaining 
whether you can use utility projects for POJO entities and if so how.



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4115994
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to