resource-ref元素
resource-ref元素声明了与一个资源工厂结合使用的外部资源。它包含一个可选的description元素、一个res-ref- name元素(资源管理连接工厂引用名)、一个res-type元素(工厂类型的完全限定类名)、一个res-auth元素(验证类型 Application或Container)和一个可选的res-sharing-scope元素(从资源中获得的连接共享说明--Shareable 或Unshareable)。下面是一个示例:
- <resource-ref>
- <res-ref-name>jdbc/EmployeeAppDB</res-ref-name>
- <res-type>javax.sql.DataSource</res-type>
- <res-auth>Container</res-auth>
- <res-sharing-scope>Shareable</res-sharing-scope>
- </resource-ref>