1

I have working app1.ear, containing:

  • JPA entity, MyObjectImpl, implementing interface MyObject from api.jar
  • api.jar with MyObject interface and EJB Remote interface
  • ejb.jar with EJBs providing methods to access and modify JPA Entities

Second app2.ear is supposed to communicate with app1.ear using ONLY interfaces in api.jar. Everything works fine when passing Java basic types between ears. But when app2.ear tries to retrieve from app1.ear instance of MyObject - CORBA MARSHAL exception is raised, saying that MyObjectImpl class can not be found:

"IOP00810257: (MARSHAL) Could not load class com.zzz.MyObjectImpl"

Placing MyObjectImpl in app2.ear solves the issue, but I don't want to expose JPA implementation to other ear applications. Am I missing something or my approach is wrong? Please advise what to do or where to dig. Many thanks in advance!

PS: Server GF 3.0.1, no GF-specific deployment descriptors, both ears running on the same JVM

1 Answer 1

1

The impl classes are required during deserialization. Another approach would be to use XML or JSON or protobuff, if you doesn't want to expose the impl classes.

1
  • my main concern is to hide JPA annotations. would it be possible that way: MyObjectImpl implements MyObject, MyObjectJPA extends (just annotates) MyObjectImpl, having MyObject and MyObjectImpl available to other ears? Will container deserialize MyObjectJPA into MyObjectImpl? Cant believe there's no way to hide JPA annotation from clients.
    – andbi
    Nov 15, 2010 at 14:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.