Get your CodeRanch badge!*
The moose likes EJB and other Java EE Technologies and the fly likes several ears, GF3, EJB 3 and JPA Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "several ears, GF3, EJB 3 and JPA" Watch "several ears, GF3, EJB 3 and JPA" New topic
Author

several ears, GF3, EJB 3 and JPA

Andrew Oswald
Greenhorn

Joined: Nov 15, 2010
Posts: 1
Hi all!
As my project becomes larger and difficult to test, I decided to split my single good-working ear in several ears, some of them running as a standalone "service".
And stucked in cross-ear communication. Please help, what am I doing wrong?
I've simplified everything, only two ears left with no success, going mad

EAR1:
persistence.jar (JPA POJO classes, implementing interfaces from api.jar)
ejb.jar (stateless beans for accessing and managing of persistence units)
api.jar (cross-ear interfaces api, contains also remote interfaces for ejb.jar)

EAR2:
wars, other libraries and ejb's
api.jar (absolutely the same as in EAR1)

EAR1 deploys ok, all classes found and working (tested by scheduled beans inside that ear)
EAR2 deploys ok, JNDI names of EAR1's ejbs resolved, but when war in EAR2 tries to get list of certain serializable JPA instances via EJB remote call I finally get the following root cause:


EAR1: ejb.ar


EAR1, EAR2: api.jar


EAR2: EJB injection in war:


Application descriptors are simple, no GF specific descriptors provided
EAR1: api.jar and persistence.jar placed inside "library-directory"


EAR2: api.jar placed inside "library-directory"


All JPA objects implement interfaces from "api.jar" along with "java.io.Serializable"
Error disappears when I place persistence.jar into EAR2. Looks like EAR1 does not provide proper JPA object stubs or whatever needed by EAR2.
Am I missing something?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: several ears, GF3, EJB 3 and JPA
 
Similar Threads
Not accessing ejb remote interface when use hibernate jpa 2 provider
EJB3.0, mySQL, Queries & Entity Beans?
IOP00810257: (MARSHAL) Could not load class <Class Name>
WARNING: "IOP00810257: (MARSHAL) Could not load class ultimatesoft.Main$1"
EJb3 Glassfish and Netbeans help with entity being passed to remote method