Version 3

    Article is in development so I will put just the bullets what to do. Thanks go to Tomaž Cerar for extensive support on this.

     

    • Should create a folder \modules\org\jboss\client\legacy
    • put there files module.xml and jbossall_client jar from 4.2.3
    • In maven  pom.xml maven-war-plugin entry declare
              <archive>
                      <manifestEntries>
                          <Dependencies>org.jboss.client.legacy</Dependencies>
                      </manifestEntries>
              </archive>
    
    • Do the usual magic for ejb call

     

    Properties properties = new Properties();

    properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");

    properties.put(Context.PROVIDER_URL, jnpurl);

    properties.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces");

    properties.put(Context.SECURITY_PRINCIPAL, username);

    properties.put(Context.SECURITY_CREDENTIALS, pswd);

    Context context = new InitialContext(properties);

    Object o = context.lookup(jndi);

     

    Thats about it, no .properties file for call on 4.2.3, probably works also for legacy calls on version 5.x,6.x, but haven't tested it yet