SHARE
TWEET

Untitled

a guest Jan 16th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top