Programming assignment 3

In this assignment you will create a Session Enterprise Java Bean (EJB) to perform the xslt transforms you wrote for P2 and a servlet to invoke the EJB.

Steps

(we recommend doing steps 2-4 iteratively, testing out the HelloWorld bean first, and then moving from there)

1. Follow the example in chapter 3 of your Mastering Enterprise Javabeans book whichs creates a HelloWorld bean.

2. Modify this example to accept an xml message as input, transform the message, and return the xml message as output. The input and output can be handled a number of ways, but a simple string will do for this example. Perform your transforms using the Transform class from the saxon toolkit (api: http://www.stylusstudio.com/api/saxon8/net/sf/saxon/Transform.htm)

3. Install JBoss (www.jboss.org) and deploy your bean to the local server. We recommend using the Jboss 4.0.1 release, which uses JVM 1.4 or higher. Deployment can be accomplished by placing your bean's jar file into the deploy directory of jboss. For more information on deployment, consult the getting started guide: http://docs.jboss.org/jbossas/getting_started/startguide40/ You'll need to register on the jboss site to view their documentation.

4. Create a test program to invoke your EJB, as shown in chapter 3.

5. Create a java servlet out of your test program. Servlets can be tested on the Tomcat server. Examples can be viewed in the $TOMCAT$\webapps\servlets-examples directory (or at http://localhost:8080/servlets-examples/index.html while Tomcat is running).

Deliverables: