| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<web-app |
| 3 |
xmlns="http://java.sun.com/xml/ns/javaee" |
| 4 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 5 |
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_1.xsd" |
| 6 |
metadata-complete="true" |
| 7 |
version="3.1"> |
| 8 |
|
| 9 |
<display-name>EE9 Demo JNDI WebApp</display-name> |
| 10 |
|
| 11 |
<servlet> |
| 12 |
<servlet-name>JNDITest</servlet-name> |
| 13 |
<servlet-class>org.example.JNDITest</servlet-class> |
| 14 |
<load-on-startup>1</load-on-startup> |
| 15 |
</servlet> |
| 16 |
|
| 17 |
<servlet-mapping> |
| 18 |
<servlet-name>JNDITest</servlet-name> |
| 19 |
<url-pattern>/test/*</url-pattern> |
| 20 |
</servlet-mapping> |
| 21 |
|
| 22 |
<env-entry> |
| 23 |
<env-entry-name>wiggle</env-entry-name> |
| 24 |
<env-entry-type>java.lang.Double</env-entry-type> |
| 25 |
<env-entry-value>99.99</env-entry-value> |
| 26 |
<injection-target> |
| 27 |
<injection-target-class>org.example.JNDITest</injection-target-class> |
| 28 |
<injection-target-name>wiggle</injection-target-name> |
| 29 |
</injection-target> |
| 30 |
</env-entry> |
| 31 |
|
| 32 |
<resource-ref> |
| 33 |
<res-ref-name>jdbc/mydatasource1</res-ref-name> |
| 34 |
<res-type>javax.sql.DataSource</res-type> |
| 35 |
<res-auth>Container</res-auth> |
| 36 |
<injection-target> |
| 37 |
<injection-target-class>org.example.JNDITest</injection-target-class> |
| 38 |
<injection-target-name>myDatasource</injection-target-name> |
| 39 |
</injection-target> |
| 40 |
</resource-ref> |
| 41 |
|
| 42 |
<post-construct> |
| 43 |
<lifecycle-callback-class>org.example.JNDITest</lifecycle-callback-class> |
| 44 |
<lifecycle-callback-method>postConstruct</lifecycle-callback-method> |
| 45 |
</post-construct> |
| 46 |
|
| 47 |
<pre-destroy> |
| 48 |
<lifecycle-callback-class>org.example.JNDITest</lifecycle-callback-class> |
| 49 |
<lifecycle-callback-method>preDestroy</lifecycle-callback-method> |
| 50 |
</pre-destroy> |
| 51 |
|
| 52 |
</web-app> |
| 53 |
|
| 54 |
|