[英]Accessing a JNDI DataSource without the java:comp/env prefix
I've noticed that both ways of looking up a DataSource
using JNDI work: 我注意到使用JNDI工作查找
DataSource
两种方式:
With the added bonus that the first one doesn't seem to anger Websphere when used from an unmanaged thread ( started by Quartz ). 有了额外的好处,第一个似乎没有从一个非托管线程(由Quartz启动)使用时愤怒Websphere。
Are there any pitfalls from accessing JNDI objects without the prefix? 访问没有前缀的JNDI对象是否有任何陷阱?
This should be OK, since java:comp/env
is the global JNDI namespace. 这应该没问题,因为
java:comp/env
是全局JNDI名称空间。 It may depend on the application server where such configurations also appear in the JNDI tree. 它可能取决于应用程序服务器,此类配置也出现在JNDI树中。
Locate your JDBC DataSource in WebSphere Application Server using JNDI 使用JNDI在WebSphere Application Server中找到JDBC DataSource
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.