These are instructions for building and deploying DayTrader 1.2 on Sun Java System Application Server Platform Edition 9.0. All of the necessary Sun vendor specific deployment descriptors and artifacts are included in the source tree. PLEASE NOTE: With the exception of the web services components (web servces proxy and ws appclient), all components of the application function. Before Building the EAR ------------------------- Disable the web services components by... 1) Rename the webservices.xml file under modules/web/src/main/webapp/WEB-INF to webservices.xml.org 2) Open the web.xml file in the same directory and comment out the following section... WSDL Service Trade service/Trade org.apache.geronimo.samples.daytrader.client.ws.Trade WEB-INF/wsdl/TradeServices.wsdl WEB-INF/TradeServicesClient_mapping.xml pfx:Trade org.apache.geronimo.samples.daytrader.client.ws.TradeWSServices 3) Open the application-client.xml file under modules/wsappclient/src/main/resources/META-INF and comment out the following section... WSDL Service Trade service/Trade org.apache.geronimo.samples.daytrader.client.ws.Trade META-INF/wsdl/TradeServices.wsdl META-INF/TradeServices_mapping.xml pfx:Trade org.apache.geronimo.samples.daytrader.client.ws.TradeWSServices Building the EAR with Maven 2 ------------------------------- Build the EAR by changing directories to the top-level project directory and issue the following command... mvn install Assuming the build is successful, the ear will be located under the follwing directory... modules/ear/target Configuring the Application Server ------------------------------------ Add the required libraries (common-logging and database driver) to the servers classpath using Admin Console. 1) Download the latest version of the commons-logging jar from the Apache commons logging website (http://jakarta.apache.org/commons/logging/). 2) Follow the "Application Server" link and click on the "JVM Settings" >> "Path Settings" tab. 3) Add the location of the commons-logging jar to the "Classpath Prefix" section. 4) Also, add the location of the database driver jars to this section. 5) Click the "Save" button. 6) RESTART the server for the changes to take affect!!! Using the Admin Console, create the JMS resources using the following steps... 1) Expand the "Resources" >> "JMS Resources" tree 2) Follow the "Connection Factories" link and click on "New" 3) Enter the following required properties... JNDI Name: jms/QueueConnectionFactory Type: javax.jms.QueueConnectionFactory 4) Delete all properties in the "Additional Properties" list 5) Click on the "OK" button to save the changes 6) Repeat steps 1 through 5 for the TradeStreamTCF using the following properties... JNDI Name: jms/TopicConnectionFactory Type: javax.jms.TopicConnectionFactory 7) Following the "Destination Resources" link and click on "New" 8) Enter the following required properties... JNDI Name: jms/TradeBrokerQueue Type: javax.jms.Queue 9) Under "Additional Properties" enter the following... Name: TradeBrokerQueue 10) Repeat steps 7 through 9 for the TradeStreamerTopic using the following properties... JNDI Name: jms/TradeStreamerTopic Type: javax.jms.Topic Name: TradeStreamerTopic Also create the required JDBC resources using the following steps... 1) Expand the "Resources" >> "JDBC" tree 2) Follow the "Connection Pools" link and click on "New" 3) Enter the appropriate information for your desired backend database (in this example, we are creating a DB2 connection pool). Name: DB2Pool Resource Type: javax.sql.XADataSource Database Vendor: DB2 4) Click on "Next" and modify the "Datasource Classname" Datasource Classname: com.ibm.db2.jcc.DB2XADataSource 5) Under "Additional Properties", ensure that the following properties are set. databaseName: tradedb serverName: localhost portNumber: 50000 driverType: 4 user: password: 6) Click on "Finish" to save the changes. Note: After saving the changes, you can use the "Ping" button at the top of the page to verify connectivity. 7) Follow the "JDBC Resource" link and click on "New" 8) Enter the following requrie properties... JNDI Name: jdbc/TradeDataSource Pool Name: DB2Pool 9) Click on the "OK" button to save the changes Install the EAR ----------------- 1) Expand the "Applications" tree and follow the "Enterprise Applications" link 2) Click on "Deploy" 3) Provide the location of the DayTrader ear file and click "Next" 4) Enable "Java Web Start" and click "Finish" DayTrader Streamer application client --------------------------------------- The Streamer app client requires the commons-logging jar as well. Since we are adding this jar to the servers classpath, this jar is not delivered available to the remote application client when launched via Java WebStart. To enable this, you must update the ear file PRIOR TO DEPLOYMENT as described below... 1) Add the commons-logging jar to the root of the ear archive. 2) Update Classpath entry in the MANIFEST.MF file of the dt-ejb.jar to include the commons logging jar The Streamer client can be accessed at the following URL: http://localhost:8080/daytrader/streamer DayTrader Logging/Tracing --------------------------- To enable logging of the DayTrader components in Sun Server 9, proceed to the logging configuration section of the Admin Console ("Application Server" >> "Logging" >> "Log Levels"). Under "Additional Module Log Level Properties" add the following... org.apache.geronimo.samples.daytrader.util.Log: FINEST This will allow the TRACE messages to show up in the server log file.