• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

several ears, GF3, EJB 3 and JPA

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
See ya later boys, I think I'm in love. Oh wait, she's just a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic