Skip to Content
avatar image
Former Member

look up entitiy beans across DCs??

i want to look up entity beans from one Dcs to another DC. i hv written following code for lookup same as we write to look up in case of session beans and entity beans are in same DC. But i am not able to get reference of entity beans in other DC using following code. is there anyother way ??? Here i want look up entity beans from 2 different DC (DC1 appdm and DC2 jobposmg)

@PersistenceContext(unitName = "appdm", type = PersistenceContextType.TRANSACTION)

public EntityManager emappdm;

@PersistenceContext(unitName = "jobposmg", type = PersistenceContextType.TRANSACTION)

public EntityManager emjobposmg;

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    Jun 24, 2008 at 12:59 PM

    According to the specification, persistence units (PUs) are not visible outside the application in which they are defined. So, if DC1 and DC2 above are bundled in EAR DC "A" and the EJB DC with your session bean is wrapped in EAR DC "B", it won't have access to those PUs.

    Regards,

    \-- Vladimir

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Vladimir Pavlov

      Thnx a lot to help me resolve this issue. Actually it was some error in queries. But when i was executing webserivce i used to get stackoverflow error thts why i could not make out reason for this problem. I tested same persistance class in another session bean having single method which returns just string. When i executed tht method from web service navigator i got actual defaultTrace for error in queries. Thnx a lot , again.