Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic


Arundhathi Menon
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i'm having a problem with my servlet which invokes my session bean.My architecture is as follows:
1)Servlet invokes the session bean(performs a look up)
2)the entity beans look up is done in the session's client
3)The servlet calls the session client and hence the enity is to be invoked..
My problem is that when the session is invoked by the servlet except for the lookup all other functions are invoked properly..cld u hepl me
My session client code..
// System.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
// System.setProperty("java.naming.provider.url", "localhost:1099");
// System.setProperty("java.naming.factory.url.pkgs","org.jboss.naming rg.jnp.interfaces");
//Now use those properties to create
//a JNDI InitialContext with the server.
InitialContext ctx = new InitialContext();
//Lookup the bean using it's deployment id
Object obj = ctx.lookup("products");
//Be good and use RMI remote object narrowing
//as required by the EJB specification.
CMPProductHome home = (CMPProductHome) PortableRemoteObject.narrow(obj ,
CMPProduct product;
Collection allProducts = home.findAll();
Iterator iterator = allProducts.iterator();
while (iterator.hasNext())
product = (CMPProduct);
recor="Id: " + product.getProductId();
This client works properly when invoked separately ie not from the why is there a problem with the servlet...
pls help me...
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic