Skip to Content
author's profile photo Former Member
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 a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on 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.


    \-- Vladimir

    Add a 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.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.