WebLogic 10 T3InitialContextFactory

May 2, 2008 at 10:25 am (Uncategorized)

In order to invoke an EJB client, we need to invoke it through a context. As of following snippet
static public Context getInitialContext() throws Exception {
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY, “weblogic.jndi.T3InitialContextFactory”);
p.put(“java.naming.security.credentials”, “weblogic”);
p.put(Context.PROVIDER_URL, url);
return new InitialContext(p);

In order to use T3InitialContextFactory ${WL_Home}\server\lib\weblogic.jar should be added to the classpath for smooth working of the InitialContext

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: