[jboss-user] [EJB 3.0] - Jsp call EJB3.0

thuck44b do-not-reply at jboss.com
Thu May 28 05:13:21 EDT 2009


Hi all,
I'm learning EJB3.0 and Jboss4.0.5, Jbuilder2008. When I lookup EJB in jsp file, I receive error:
 javax.naming.NameNotFoundException: Name SessionBean is not bound in this Context
	at org.apache.naming.NamingContext.lookup(NamingContext.java:770)
	at org.apache.naming.NamingContext.lookup(NamingContext.java:153)

I lookup:

try{
	    Context context = new InitialContext(System.getProperties());
	    String name="SessionBean/remote";
	    ISessionBeanRemote bean=(ISessionBeanRemote)context.lookup(name2);
	    		
	    		System.out.println(" Display Message Using EJB");
	    		System.out.println(" name : "+ bean.GetName("abc"));
	    		
	    	}
	    	catch(NamingException e){
	    		e.printStackTrace();
	    	}
SessionBean is ejbName is deployed by Jboss4.0.5.
I spent more time for fix bug but not complete. So can You help me.

Thanks very much.
ThucHP

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4233830#4233830

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4233830



More information about the jboss-user mailing list