[jboss-user] [EJB/JBoss] - Exception : Throwable while attempt to get a new connection
murthy_j2ee
do-not-reply at jboss.com
Tue Feb 13 05:36:24 EST 2007
Hi All,
Can any body please tell me how to call ejb from a java bean. I have done it it as below.
Here is the client calling an EJB..............
{
Context ctx = new InitialContext();
Object obj = ctx.lookup("UserAuthentication_Session");
UserAuthentication_SessionHome home=(UserAuthentication_SessionHome)javax.rmi.PortableRemoteObject.narrow(obj,UserAuthentication_SessionHome.class);
UserAuthentication_Session rem = home.create();
loginValue=rem.validateLoginDetails(username,password);
}
Here is ejb-jar.xml..............................
UserAuthentication_Session
<ejb-name>UserAuthentication_Session</ejb-name>
com.prospecta.WSOProject.User_Authentication.ejb.UserAuthentication_SessionHome
com.prospecta.WSOProject.User_Authentication.ejb.UserAuthentication_Session
<ejb-class>com.prospecta.WSOProject.User_Authentication.ejb.UserAuthentication_SessionBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
Here is jboss.xml to specify the jndi name for my EJB.......................................
<ejb-name>UserAuthentication_Session</ejb-name>
<jndi-name>UserAuthentication_Session</jndi-name>
Here is the error trace....................................
Throwable while attempt to get a new connection..
please tell me what was the problem, and also please tell me how to configure it in jboss.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4015702#4015702
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4015702
More information about the jboss-user
mailing list