6 Replies Latest reply on Nov 4, 2015 5:18 AM by Jay SenSharma

    How to list all the EJB deployed in jboss server 7.1.1 and transaction manager through remote client jndi lookup ?

    mansoor ahamad Newbie

      Hi I have application which supports remote look up and invocation EJBs deployed on Jboss server. I would like extend this support for JBoss 7.1.1 too. In this regard, I have a few following questions


      1)I am getting below exception when trying to get user transaction using context.lookup("java:jboss/UserTransaction"), Although remote EJB look up and invocation works well


      Exception in thread "main" 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

        at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)

        at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)

        at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)

        at javax.naming.InitialContext.lookup(Unknown Source)

        at org.jboss.as.quickstarts.ejb.remote.client.RemoteEJBClient.lookupRemoteStatefulCounter(RemoteEJBClient.java:217)

        at org.jboss.as.quickstarts.ejb.remote.client.RemoteEJBClient.invokeStatefulBean(RemoteEJBClient.java:101)

        at org.jboss.as.quickstarts.ejb.remote.client.RemoteEJBClient.main(RemoteEJBClient.java:45)



      2)How to list all the deployed EJBs in the server through JNDI lookup ?


      context.list("") is throwing not supported exception.



      Could some one help me out in solving these problems ?