문제

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

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top