ear deployed successfully but context missing in jboss as 7

124 views Asked by At

I am migrating application from oc4j app server to jboss as7 app server, ear involves 3 ejb jars in which one consist persistence.xml and using eclipse link. 2 jars which does not contain persistence.xml are showing when i am trying to get context using below code:

    final Hashtable<String, Object> jndiProperties = new Hashtable<String, Object>();
    jndiProperties.put(Context.URL_PKG_PREFIXES,
            "org.jboss.ejb.client.naming");
    jndiProperties.put(Context.INITIAL_CONTEXT_FACTORY,
            InitialContextFactory.class.getName());
    jndiProperties.put(Context.PROVIDER_URL, "remote://127.0.0.1:4447");
    jndiProperties.put(InitialContext.SECURITY_PRINCIPAL, "admin");
    jndiProperties.put(InitialContext.SECURITY_CREDENTIALS, "password-1234");
    jndiProperties
            .put("jboss.naming.client.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS",
                    false);
    jndiProperties
            .put("jboss.naming.client.connect.options.org.xnio.Options.SASL_POLICY_NOPLAINTEXT",
                    false);
    jndiProperties
            .put("jboss.naming.client.connect.options.org.xnio.Options.SASL_DISALLOWED_MECHANISMS",
                    "JBOSS-LOCAL-USER");
     InitialContext context = new InitialContext( jndiProperties);
     NamingEnumeration contextList = context.list("testApp");
     while (contextList.hasMore())
     {
        NameClassPair cont=(NameClassPair) contextList.next();
        System.out.println(cont);

     }

However I am not getting context of jar file which contains persistance.xml. Here all session beans in 3 jars are defined in ejb-jar.xml.

What could be the possible reasons of not getting context of 3rd jar?

0

There are 0 answers