Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

several ears, GF3, EJB 3 and JPA

 
Andrew Oswald
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic