I was looking for something standard about the DataSource configuration for a Java EE application, but all I found on the Internet was container specific (example : context.xml with Tomcat).
I found this very rare subject about the <data-source>
tag. See the links inside, it's very interesting. I couldn't find more information in the Sun/Oracle documentation.
So I have a few questions :
Does the <data-source>
tag work with all web servers ? (Tomcat, JBoss)
Multiple resources : Can we have more than one <data-source>
tag in the web.xml ?
Do we have to use the <resource-ref>
tag (for @Resource annotation) in the web.xml when we use <data-source>
tag, or is it unnecessary ?
When we call the DataSource with "InitialContext" or "@Resource", is it the same instance for each call ? If yes, is it more like EJB Session Bean @Stateless (which could possibly be the same instance), or more like EJB Session Bean @Singleton (must be the same instance) ?
I understand that the <data-source>
tag appeared with the Java EE 6 standards, but where can I found more informations about it ? Which JSR ?
Thanks
您可以使用JSR88 API查看包含Java EE 6数据源的应用程序。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.