简体   繁体   English

在哪里可以了解JNDI字符串?

[英]Where can I learn about JNDI strings?

How do you know how to form a JNDI string? 您如何知道如何形成JNDI字符串? 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 . 例如: java:comp/env/wm/default This is supposed to connect to a WorkManager in Websphere with the name of default. 这应该以默认名称连接到Websphere中的WorkManager。 But what does the "java", "comp", "env" mean? 但是“ java”,“ comp”,“ env”是什么意思? I know what the wm/default mean because that's the JNDI name put in the WorkManager, but what does the rest mean? 我知道wm / default的含义,因为这是WorkManager中放置的JNDI名称,但是其余的含义是什么?

Thanks 谢谢

The "java:" scheme was introduced in J2EE for accessing process-local data. J2EE中引入了“ java:”方案来访问本地进程数据。 The "comp" context is short for "component"; “ comp”上下文是“ component”的缩写; it contains data that is local to the J2EE component (web module or EJB type) that is active on the current thread. 它包含在当前线程上处于活动状态的J2EE组件(Web模块或EJB类型)本地数据。 The "env" subcontext is short for "environment"; “ env”子上下文是“环境”的缩写; it is the context under which EJB references, resource references, and environment entries are bound. 它是绑定EJB引用,资源引用和环境条目的上下文。 The "wm/default" is an arbitrary name. “ wm / default”是一个任意名称。 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>. “ wm”子上下文名称是工作管理者的约定,但全名也可以是“ java:comp / env / myDefaultWM”,其中web.xml / ejb-jar.xml用<res-引用名称> myDefaultWM <res-ref-name>。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM