0 Replies Latest reply on Dec 30, 2005 5:38 AM by stanislav

    calling one jboss from another

      Hello everybody !
      I have such problem.
      My code:
      System.out.println("sendSms");
      java.util.Properties p = new java.util.Properties();

      p.put(Context.INITIAL_CONTEXT_FACTORY,
      "org.jnp.interfaces.NamingContextFactory");
      p.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces");
      p.put(Context.PROVIDER_URL, "111.111.1.111:1199");
      Context context;
      try {
      context = new javax.naming.InitialContext(p);
      Object ref = context.lookup("PrSmsRouterHomeRemote");
      RouterHomeRemote home = (RouterHomeRemote)
      PortableRemoteObject.narrow(ref,RouterHomeRemote.class);
      RouterRemote router = home.create();
      String serv_tel = "1111111";
      String serv_dest = "TestABonus";
      String text = "???? 11";
      router.send(serv_dest,serv_tel,text);
      } catch (NamingException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      } catch (RemoteException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      } catch (CreateException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      }
      which is in session bean - and i try to call another jboss version -
      but i dont' know where I must take a library for remote jboss ? (withh
      libraries :jbossall-client.jar of local jboss is not work ). And my
      current version of jboss is last and works under jdk1.5 - remote under
      1.4/

      With best regards.
      Thanks before !
      Stanislav.