private void getInitialContext(String url) throws Exception
{
try
{
Properties properties = new Properties();
if (isWeblogicVersion)
{
properties.setProperty(Context.INITIAL_CONTEXT_FACTORY,
this.INITIAL_CONTEXT_FACTORY_WEBLOGIC);
properties.setProperty(Context.PROVIDER_URL, url);
}
else
{
properties.setProperty(Context.INITIAL_CONTEXT_FACTORY,
this.INITIAL_CONTEXT_FACTORY_WEBSPHERE);
properties.setProperty(Context.PROVIDER_URL, url);
properties.setProperty("com.ibm.ws.orb.transport.ConnectionInterceptorName",
"com.ibm.ws.orb.transport.DefaultConnectionInterceptor");
}
initContext = new InitialContext(properties);
}
catch (Exception e)
{
e.printStackTrace();
throw new Exception(e);
}
}
EJBFactory3
最新推荐文章于 2018-04-17 16:09:55 发布