Created
August 18, 2015 10:15
-
-
Save rsrini7/d59bf8b733925879f5cf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Properties properties = new Properties(); | |
| properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory"); | |
| properties.put(Context.PROVIDER_URL,"remote://127.0.0.1:4447"); | |
| // username | |
| properties.put(Context.SECURITY_PRINCIPAL, "user"); | |
| // password | |
| properties.put(Context.SECURITY_CREDENTIALS, "password"); | |
| // This is an important property to set if you want to do EJB invocations via the remote-naming project | |
| properties.put("jboss.naming.client.ejb.context", true); | |
| // create a context passing these properties | |
| return new InitialContext(properties); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment