开发者

Where can I learn about JNDI strings?

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.开发者_StackOverflow 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


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>.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜