This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Lookup problem for Stateful session EJB with EXTENDED persistance context Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Lookup problem for Stateful session EJB with EXTENDED persistance context" Watch "Lookup problem for Stateful session EJB with EXTENDED persistance context" New topic
Author

Lookup problem for Stateful session EJB with EXTENDED persistance context

Arjun Patil
Greenhorn

Joined: Jun 17, 2010
Posts: 1
Hi,
I'm doing lookup for Stateful session EJB with EXTENDED persistance context from JSP..

code as follows...
<%
BandServiceRemote serviceRemote=null;

try{
InitialContext context=new InitialContext();
serviceRemote=(BandServiceRemote)context.lookup("Band#"+BandServiceRemote.class.getName());
}catch(Exception e){
System.out.println("Error accoured");
e.printStackTrace();
}
%>

i'm getting following exception during lookup...

"Caused by: java.lang.IllegalStateException: Extended Persistence Contexts can only be invoked from within the context of the stateful session bean that declares the Extended Persistence Context."

&, if i remove the Extended persistance context, then look happens successfully...


Can you guys help me in understanding what is going wrong???

thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Lookup problem for Stateful session EJB with EXTENDED persistance context