...
WebAppJDBCAccessAnnotations.war
includes a Servlet, a JSP and a JSPbasic web.xml. The following excerpt shows the annotation part the wizard has identified and will likely be prompting for additional information while deploying the application.
...
WebAppEjbAccessAnnotations.war
includes a Servlet, a JSP and a JSPbasic web.xml. The following excerpt shows the annotation part the wizard has identified and will likely be prompting for additional information while deploying the application.
...
WebAppJMSAccessAnnotations.war
includes the two Servlets mentioned above, a JSP and a JSPbasic web.xml. The following excerpts show the annotation part the wizard has identified and will likely be prompting for additional information while deploying the application.
...
WebAppEjbAccess.war
includes a Servlet and the web.xml
. In the annotations example we provided a servlet as well but for this sample all the processing is done directly by the JSP. The following sample illustrates the web.xml
, in this example the Plan Creator wizard will look into the <resource<ejb-ref>
section.
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<?xml version="1.0" encoding="UTF-8"?> <web-app id="WebApp_ID" version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> <ejb-ref> <ejb-ref-name>ejb/Converter</ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> <remote>myPackage.Converter</remote> </ejb-ref> </web-app> |
...
Section | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
JMS access
Anchor | ||||
---|---|---|---|---|
|
Once again we are basing this sample application from the one we used in the annotations section. There is a Producer servlet that sends 5 messages to a JMS queue and a Consumer servlet that synchronously receives messages from the same queue.
The noAnnotations-TestJMSAccess.zip file provides the WebAppJMSAccess.war
which is the WAR we will be deploying and a sample of the generated deployment plan generatedPlan.xml
. Download and extract the zip file to a directory of your convenience.
WebAppJMSAccess.war
includes the two Servlets mentioned above, a JSP and the web.xml
. The following sample illustrates the web.xml
, in this example the Plan Creator wizard will look into the <resource-ref>
,<message-destination-ref>
and <message-destination>
sections.
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>
WebAppJMSAccess</display-name>
<servlet>
<description>
</description>
<display-name>
ProducerServlet</display-name>
<servlet-name>ProducerServlet</servlet-name>
<servlet-class>
com.apache.geronimo.samples.webAppJMSacess.ProducerServlet</servlet-class>
</servlet>
<servlet>
<description>
</description>
<display-name>
ConsumerServlet</display-name>
<servlet-name>ConsumerServlet</servlet-name>
<servlet-class>
com.apache.geronimo.samples.webAppJMSacess.ConsumerServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ProducerServlet</servlet-name>
<url-pattern>/producer</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ConsumerServlet</servlet-name>
<url-pattern>/consumer</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<resource-ref>
<res-ref-name>jms/TestConnectionFactory</res-ref-name>
<res-type>javax.jms.ConnectionFactory</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
<message-destination-ref>
<message-destination-ref-name>jms/TestQueue</message-destination-ref-name>
<message-destination-type>javax.jms.Queue</message-destination-type>
<message-destination-usage>ConsumesProduces</message-destination-usage>
<message-destination-link>TestQueue</message-destination-link>
</message-destination-ref>
<message-destination>
<message-destination-name>TestQueue</message-destination-name>
</message-destination>
</web-app>
|
With the server up and running access the Geronimo Administration Console with a web browser and click on Plan Creator on the left menu. Browse to the WebAppJMSAccess.war
you just extracted and click on Configure. The subsequent configuration pages are nearly identical to what we described in the Sample with annotations section so we will skip the step-by-steps details. The end result is the same, the Plan Creator wizard has generated the deployment plan directly from the provided web.xml.
Once again we are providing both generated deployment plans side-by-side to facilitate comparison. These two sample applications are slightly different so you can see some additional variations in the generated deployment plan.
Section | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Security configuration
Anchor | ||||
---|---|---|---|---|
|
...