The WLInitialContextFactoryDelegate creates initial contexts
for accessing the WebLogic naming service locally or remotely via t3.
It can also be used to create a multitier connection to another naming
service through a WebLogic Server.

To create a WebLogic context from a client, your code must
minimally specify this Factory as the initial context factory, and
the URL of a WebLogic Server in the JNDI environment, as properties
passed to the constructor of InitialContext. Here's an example of
the minimal setup required to establish a context:

Note that here we've depended on the built-in defaults for the
initial context factory and a WebLogic user/password. We've
supplied the provider URL since it doesn't match the default.

Creating a context from within a server-side object is simpler.
You need not specify any properties; those are set for you by
the Server. Here's the same example code written for getting a
context from within a server-side object:

Context ctx = new InitialContext();

There is no need to specify a factory or a URL. By default, the server
will use WLInitialContextFactory and connect to the local naming service.
Use one of the techniques described above to create a context
using special properties on the server.

theOne

getInitialContext

Creates an InitialContext. These properties affect how the context is
created and to what naming service the context refers.

java.naming.provider.url. String that specifies
the URL of the WebLogic server that will provide the name service.
Defaults to t3://localhost:7001 if unset. You can
also set this property with the Environment.setProviderURL()
method.

java.naming.provider.delegate.environment. Optional
java.util.Hashtable object that can be used to specify
the use of a third-party naming service. It contains all the
properties needed to create the third-party InitialContext on the
WebLogic Server. If this property is specified, the WebLogic Server
acts as a router to the third-party name service. Conceptually,
the WebLogic Server creates an InitialContext using these properties
and then provides the caller with a local context that delegates
to this remote context. If this property is specified, the
properties java.naming.security.principal and
java.naming.security.credentials are ignored.

java.naming.security.principal. String that
specifies the identity of the principal (user) for security
purposes. Defaults to "guest".

java.naming.security.credentials. String that specifies
the password for the principal or, alternatively, an Object that
implements the weblogic.security.acl.UserInfo interface.
If it is a UserInfo object, the property
javax.naming.security.principal is ignored. Defaults to
"guest".

Copyright 1996, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.