File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Spring in Action this week in the Spring 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