在哪里可以了解 JNDI 字符串?
你怎么知道如何形成 JNDI 字符串?我知道必须有一种格式,并且这些划分必须有意义,但我无法找到解释它们的好资源。例如:java:comp/env/wm/default
。这应该连接到 Websphere 中名称为 default 的 WorkManager。但是“java”、“comp”、“env”是什么意思?我知道 wm/default 的含义,因为这是放入 WorkManager 中的 JNDI 名称,但其余的含义是什么?
谢谢
How do you know how to form a JNDI string? I know there must be a format and that the divisions must mean something but I haven't been able to find a good resource that explains them. For example: java:comp/env/wm/default
. This is supposed to connect to a WorkManager in Websphere with the name of default. But what does the "java", "comp", "env" mean? I know what the wm/default mean because that's the JNDI name put in the WorkManager, but what does the rest mean?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
J2EE 中引入了“java:”方案来访问进程本地数据。 “comp”上下文是“组件”的缩写;它包含当前线程上活动的 J2EE 组件(Web 模块或 EJB 类型)的本地数据。 “env”子上下文是“environment”的缩写;它是绑定 EJB 引用、资源引用和环境条目的上下文。 “wm/default”是任意名称。 “wm”子上下文名称是工作管理器的约定,但全名也可能是“java:comp/env/myDefaultWM”,其中 web.xml/ejb-jar.xml 使用myDefaultWM。
The "java:" scheme was introduced in J2EE for accessing process-local data. The "comp" context is short for "component"; it contains data that is local to the J2EE component (web module or EJB type) that is active on the current thread. The "env" subcontext is short for "environment"; it is the context under which EJB references, resource references, and environment entries are bound. The "wm/default" is an arbitrary name. The "wm" subcontext name is the convention for work managers, but the full name could have also been "java:comp/env/myDefaultWM", where web.xml/ejb-jar.xml defined a resource-ref with <res-ref-name>myDefaultWM<res-ref-name>.
这个怎么样-> http://www.javaworld.com/javaworld/ jw-01-2000/jw-01-howto.html
或者这个-> http://www.javaworld.com/javaworld/ jw-04-2002/jw-0419-jndi.html
How about this -> http://www.javaworld.com/javaworld/jw-01-2000/jw-01-howto.html
or this -> http://www.javaworld.com/javaworld/jw-04-2002/jw-0419-jndi.html