0 Replies Latest reply on Feb 13, 2007 5:36 AM by narasimha murthy

    Exception : Throwable while attempt to get a new connection

    narasimha murthy Newbie

      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.