当前位置: 技术问答>java相关
请教j2ee的一点问题
来源: 互联网 发布时间:2015-03-12
本文导语: 请看如下代码: ...... Properties p = new Properties(); p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory"); h.put(Context.PROVIDER_URL, "t3://localhost:7001"); return new InitialContext(p); ...... 上面是j2ee的客户程序寻找ejb服务...
请看如下代码:
......
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
h.put(Context.PROVIDER_URL, "t3://localhost:7001");
return new InitialContext(p);
......
上面是j2ee的客户程序寻找ejb服务器的一段程序,令我觉得奇怪的是,在jdk1.3的 api说明中,Context类并没有INITIAL_CONTEXT_FACTORY,PROVIDER_URL等静态常量的属性,请明白其中原因的高手指点小弟一下迷津,谢谢!
......
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
h.put(Context.PROVIDER_URL, "t3://localhost:7001");
return new InitialContext(p);
......
上面是j2ee的客户程序寻找ejb服务器的一段程序,令我觉得奇怪的是,在jdk1.3的 api说明中,Context类并没有INITIAL_CONTEXT_FACTORY,PROVIDER_URL等静态常量的属性,请明白其中原因的高手指点小弟一下迷津,谢谢!
|
avax.naming
Interface Context
All Known Subinterfaces:
DirContext, EventContext, EventDirContext, LdapContext
Field Summary
static String APPLET
Constant that holds the name of the environment property for specifying an applet for the initial context constructor to use when searching for other properties.
static String AUTHORITATIVE
Constant that holds the name of the environment property for specifying the authoritativeness of the service requested.
static String BATCHSIZE
Constant that holds the name of the environment property for specifying the batch size to use when returning data via the service's protocol.
static String DNS_URL
Constant that holds the name of the environment property for specifying the DNS host and domain names to use for the JNDI URL context (for example, "dns://somehost/wiz.com").
static String INITIAL_CONTEXT_FACTORY
Constant that holds the name of the environment property for specifying the initial context factory to use.
static String LANGUAGE
Constant that holds the name of the environment property for specifying the preferred language to use with the service.
static String OBJECT_FACTORIES
Constant that holds the name of the environment property for specifying the list of object factories to use.
static String PROVIDER_URL
Constant that holds the name of the environment property for specifying configuration information for the service provider to use.
static String REFERRAL
Constant that holds the name of the environment property for specifying how referrals encountered by the service provider are to be processed.
static String SECURITY_AUTHENTICATION
Constant that holds the name of the environment property for specifying the security level to use.
static String SECURITY_CREDENTIALS
Constant that holds the name of the environment property for specifying the credentials of the principal for authenticating the caller to the service.
static String SECURITY_PRINCIPAL
Constant that holds the name of the environment property for specifying the identity of the principal for authenticating the caller to the service.
static String SECURITY_PROTOCOL
Constant that holds the name of the environment property for specifying the security protocol to use.
static String STATE_FACTORIES
Constant that holds the name of the environment property for specifying the list of state factories to use.
static String URL_PKG_PREFIXES
Constant that holds the name of the environment property for specifying the list of package prefixes to use when loading in URL context factories.
Interface Context
All Known Subinterfaces:
DirContext, EventContext, EventDirContext, LdapContext
Field Summary
static String APPLET
Constant that holds the name of the environment property for specifying an applet for the initial context constructor to use when searching for other properties.
static String AUTHORITATIVE
Constant that holds the name of the environment property for specifying the authoritativeness of the service requested.
static String BATCHSIZE
Constant that holds the name of the environment property for specifying the batch size to use when returning data via the service's protocol.
static String DNS_URL
Constant that holds the name of the environment property for specifying the DNS host and domain names to use for the JNDI URL context (for example, "dns://somehost/wiz.com").
static String INITIAL_CONTEXT_FACTORY
Constant that holds the name of the environment property for specifying the initial context factory to use.
static String LANGUAGE
Constant that holds the name of the environment property for specifying the preferred language to use with the service.
static String OBJECT_FACTORIES
Constant that holds the name of the environment property for specifying the list of object factories to use.
static String PROVIDER_URL
Constant that holds the name of the environment property for specifying configuration information for the service provider to use.
static String REFERRAL
Constant that holds the name of the environment property for specifying how referrals encountered by the service provider are to be processed.
static String SECURITY_AUTHENTICATION
Constant that holds the name of the environment property for specifying the security level to use.
static String SECURITY_CREDENTIALS
Constant that holds the name of the environment property for specifying the credentials of the principal for authenticating the caller to the service.
static String SECURITY_PRINCIPAL
Constant that holds the name of the environment property for specifying the identity of the principal for authenticating the caller to the service.
static String SECURITY_PROTOCOL
Constant that holds the name of the environment property for specifying the security protocol to use.
static String STATE_FACTORIES
Constant that holds the name of the environment property for specifying the list of state factories to use.
static String URL_PKG_PREFIXES
Constant that holds the name of the environment property for specifying the list of package prefixes to use when loading in URL context factories.