jndi调用时,各种应用服务器InitialContext的写法[转]

转:http://www.blogjava.net/mashiguang/archive/2008/07/14/214758.html

 

调用ejb时,如果客户端和ejb不在同一个jvm,就要设置InitialContext,不同的应用服务器InitialContext写法也不同.
Context.INITIAL_CONTEXT_FACTORY:指定到目录服务的连接工厂
Context.PROVIDER_URL:目录服务提供者URL

//jboss:
Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"
Context.URL_PKG_PREFIXES, "org.jboss.naming"
Context.PROVIDER_URL, "localhost:1099"

//weblogic:
Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory"
Context.PROVIDER_URL, "t3://localhost:7001"

//apusic(金蝶):
Context.INITIAL_CONTEXT_FACTORY, "com.apusic.jndi.InitialContextFactory"
Context.PROVIDER_URL, "rmi://localhost:6888"

//WebSphere:
Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory"
Context.PROVIDER_URL, "iiop://localhost:900"


//J2EE  SDK(J2EE  RI):
Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory"
Context.PROVIDER_URL, "iiop://127.0.0.1:1050"

//SilverStream:
Context.INITIAL_CONTEXT_FACTORY, "com.sssw.rt.jndi.AgInitCtxFactory"
Context.PROVIDER_URL, "sssw://localhost:80"

//OC4J:
Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory"
Context.PROVIDER_URL, "ormi://127.0.0.1/"

//WAS5:
Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory"
Context.PROVIDER_URL, "iiop://localhost:2809"

 

常用JNDI服务提供者连接工厂:
Filesystem:  Com.sun.jndi.fscontext.FSContextFactory或者com.sun.jndi.fscontext.RefFSContextFactory
LDAPv3:    Com.sun.jndi.ldap.LdapCtxFactory
NDS:     com.novell.naming.service.nds.NdsInitialContextFactory
NIS:     com.sun.jndi.nis.NISCtxFactory
RMI registry: com.sun.jndi.rmi.registry.RegistryContextFactory
IBM LDAP服务提供者:   com.ibm.jndi.LDAPCtxFactory
BEA 名字服务提供者:   weblogic.jndi.WLInitialContextFactory
JBOSS名字服务提供者:  org.jnp.interfaces.NamingContextFactory

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值