Binding local EJB Client to any non existent JNDI name does not cause any exception in EAP 6

Solution Unverified - Updated -

Issue

  • After Specifying ic.bind("java:global/a/b/c/d/e/f", "foobar"); in EJB JAR as follows does not generate an exception:-
@Startup
@Singleton
public class AbcPqr
{
    @PostConstruct
    @SuppressWarnings("rawtypes")
    public void onStartup() throws IOException
    {
        Context ic = new InitialContext();

        ic.bind("java:global/a/b/c/d/e/f", "foobar");

    }

However, with regards to JavaDoc, it is specified that it Binds a name to an object. All intermediate contexts and the target context (that named by all but terminal atomic component of the name) must already exist.

Environment

  • Red Hat Enterprise Application Platform (EAP)
    • 6.1.1

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content