Hi Chris,
Sorry.. I had mistyped when posting my message. The create method does return a remote interface object. The narrow method throws a class cast exception before the create method is called. I am reposting my code again :-
-----------------------
public class CartServlet extends HttpServlet {
private CartHome home; //CartHome is the home interface
private Cart cart; // Cart is the remote interface
public void init(ServletConfig config)throws ServletException{
try
{
Context context = new InitialContext();
Object ref = context.lookup("java:/comp/env/ejb/Cart");
//***Code fails with a class cast exception below
home = (CartHome) PortableRemoteObject.narrow(ref, CartHome.class);
//** As a result cart is never initialized
cart = home.create();
}catch(Exception e){
System.out.println("Exception caught in init: "+e);
}
}
}
----------------------
I have a feeling, it may be some simple configuration issue...but am not sure what else I need to do. I have used the following website as a reference
http://docs.jboss.com/jbosside/tutorial/build/en/html/index.html I would appreciate any suggestions that anyone may have.
Thanks in advance!