[jboss-user] [Installation, Configuration & Deployment] - how to call the session bean after deployed
darrencnz1976
do-not-reply at jboss.com
Fri Oct 27 06:13:23 EDT 2006
hi, i have deployed a sample session bean into jboss as, (java:comp namespace of the JSP.war application:) . the deployment is successfull.
but i having problem to call it for testing. the structure is:
Project: JSP
Package: bean
files: Hello.java, HelloBean.java, HelloHome.java, HelloLocal.java, HelloLocalHome.java,
I calling from HelloClient.java , coding as follow:
Properties props = System.getProperties();
Context ctx = new InitialContext(props);
Object obj = ctx.lookup("HelloBean");
and i have this error msg: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
what's the right name i should lookup? I have made this file under "META-INF" folder:
<!DOCTYPE ejb-jar PUBLIC ?-//Sun Microsystems, Inc.//DTD Enterprise Æ
JavaBeans 2.0//EN? ? http://java.sun.com/dtd/ejb-jar_2_0.dtd?>
<ejb-jar>
<enterprise-beans>
<ejb-name>HelloBean</ejb-name>
bean.HelloHome
bean.Hello
<local-home>bean.HelloLocalHome</local-home>
bean.HelloLocal
<ejb-class>bean.HelloBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</enterprise-beans>
</ejb-jar>
can anyone answer my question. thanks alot
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981260#3981260
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981260
More information about the jboss-user
mailing list