Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //In Class body
- final static Properties jndiProperties = new Properties();
- static
- {
- jndiProperties.put("java.naming.factory.initial", "org.wildfly.naming.client.WildFlyInitialContextFactory");
- jndiProperties.put("java.naming.provider.url", "http-remoting://localhost:8080");
- //jndiProperties.put(Context.SECURITY_PRINCIPAL, "root");
- //jndiProperties.put(Context.SECURITY_CREDENTIALS, "");
- }
- ///Inside DoGet function
- FacadeR insert = null;
- try {
- insert = (FacadeR) new InitialContext(jndiProperties).lookup("testing/InsertBean!javaInterfaces.FacadeR");
- } catch (NamingException e) {
- e.printStackTrace();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement