Advertisement
Guest User

Untitled

a guest
Jan 16th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. //In Class body
  2. final static Properties jndiProperties = new Properties();
  3. static
  4. {
  5. jndiProperties.put("java.naming.factory.initial", "org.wildfly.naming.client.WildFlyInitialContextFactory");
  6. jndiProperties.put("java.naming.provider.url", "http-remoting://localhost:8080");
  7. //jndiProperties.put(Context.SECURITY_PRINCIPAL, "root");
  8. //jndiProperties.put(Context.SECURITY_CREDENTIALS, "");
  9. }
  10.  
  11.  
  12. ///Inside DoGet function
  13. FacadeR insert = null;
  14. try {
  15. insert = (FacadeR) new InitialContext(jndiProperties).lookup("testing/InsertBean!javaInterfaces.FacadeR");
  16. } catch (NamingException e) {
  17. e.printStackTrace();
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement