0 Replies Latest reply on Dec 4, 2013 4:50 PM by Jose Alvarez de Lara

    Channel (inbound) of remoting connection closed during execution

    Jose Alvarez de Lara Novice

      Hi,

       

      I am trying roster application from Java EE 7 tutorial. Having problems on deployment in NetBeans against glassfish

      I decided to migrate to JBDS an JBoss EAP 6.1.

       

      Roster is a maven EJB 3 app configured with the remote interface in a separate application. It is as follows,

       

      • roster-common where the remote interface is defined
      • roster-ejb where the ejb is implemented
      • roster-appclient is the client
      • roster-ear where all is integrated

       

      And when I try to execute the app I get the following message,

       

      21:52:37,276 INFO  [org.jboss.as.naming] (Remoting "localhost" task-1) JBAS011806: Notificación del final del canal recibida, cerrando el canal Channel ID 186958c8 (inbound) of Remoting connection 0024d831 to /127.0.0.1:55686

       

      Here is the appclient,

       

              try {

                  Context ctx = getInitialContext();

                  traverseJndiNode("/", ctx);

               

                  request = (Request)

                          //ctx.lookup("java:global/roster-ear/roster-ejb-7.0.1/RequestBean!javaeetutorial.roster.request.Request");

                          ctx.lookup("roster-ear/roster-ejb-7.0.1/RequestBean!" + Request.class.getName());

       

                  client.insertInfo();

                  client.getSomeInfo();

                  client.getMoreInfo();

                  client.removeInfo();

       

                  System.exit(0);

       

              } catch (Exception ex) {

                  ex.printStackTrace();

                  System.err.println("Caught an exception:");

              }

       

      being this way I get that message. But if I try

             

            request = (Request)

                          ctx.lookup("java:global/roster-ear/roster-ejb-7.0.1/RequestBean!javaeetutorial.roster.request.Request");

       

      I get the same message with a different port.

       

      Here are the remaining code

       

          private static Context getInitialContext() throws NamingException {

            

              Hashtable<Object, Object> jndiProperties = new Hashtable<Object, Object>();

       

              jndiProperties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");

              //jndiProperties.put("jboss.naming.client.connect.options.org.xnio.Options.SASL_POLICY_NOPLAINTEXT", "false"); // needed for a login module that requires the password in plaintext

              jndiProperties.put(Context.PROVIDER_URL, "remote://localhost:4447");

              jndiProperties.put(Context.SECURITY_PRINCIPAL, "myuser");

              jndiProperties.put(Context.SECURITY_CREDENTIALS, "mypass");

              jndiProperties.put("jboss.naming.client.ejb.context", true);

            

              Context jndiCtx = new InitialContext(jndiProperties);

              return jndiCtx;

          }

        

          private static void traverseJndiNode(String nodeName, Context context) {

              try {

                  NamingEnumeration<NameClassPair> list = context.list(nodeName);

                  while (list.hasMore()) {

                      String childName = nodeName + "/" + list.next().getName();

                      System.out.println(childName);

                      traverseJndiNode(childName, context);

                  }

              } catch (NamingException ex) {

              // We reached a leaf

              }

          }

       

      and the jboss-deployment-structure.xml file,

       

      <jboss-deployment-structure xmlns:xsd="http://www.w3.org/2001/XMLSchema"

          xmlns:ex="http://www.w3.org/2001/XMLSchema" xmlns="urn:jboss:deployment-structure:1.2">

        

          <sub-deployment name="roster-ejb-7.0.1.jar">

              <dependencies>

                  <module name="org.jboss.xnio" />

              </dependencies>

          </sub-deployment>

        

      </jboss-deployment-structure>

       

      What can be happening?

       

      Kind regards,

       

      Thanks,

      jose

       

      Mensaje editado por: Jose Alvarez de Lara