// Configure EJB Client properties for the InitialContext
Properties ejbClientContextProps = new Properties();
ejbClientContextProps.put(“remote.connections”,”name1”);
ejbClientContextProps.put(“remote.connection.name1.host”,”localhost”);
ejbClientContextProps.put(“remote.connection.name1.port”,”4447”);
// Property to enable scoped EJB client context which will be tied to the JNDI context
ejbClientContextProps.put("org.jboss.ejb.client.scoped.context", “true”);