0 Replies Latest reply on Aug 9, 2005 12:01 PM by Scott Jones

    New security context to call out, not reverting back to old

    Scott Jones Newbie

      I have an EJB that needs to call out to a remote system:

      properties.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
       properties.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces"); ;
       properties.put("java.naming.provider.url", "jnp://" + _idConfig.getHost() + ":" + _idConfig.getPort());
       org.jboss.security.SecurityAssociation.setPrincipal(new SimplePrincipal(_id));
       org.jboss.security.SecurityAssociation.setCredential(new SimplePrincipal(_password));
       InitialContext ic = new InitialContext(properties);

      The code then does lookup and works fine. But my local EJB is keeping the Security Assoication. How can I do this and when I get making my external call be reverted back