For this post, we are going to use the sample-calculator-ws-webapp sample that is available from a Tuscany Release.
Issues with META-INF\sca-contribution.xml
Tuscany/SCA uses the META-INF\sca-contribution.xml to identify the deployable composites of a given contribution (application). The WebSphere server is failing deployment of web applications that have a META-INF\sca-contribution.xml. To workaround this issue, rename sca-contribution.xml to sca-contribution-generated.xml, which is treated the same by the Tuscany runtime, but ignored by WebSphere.
Classloader configuration issues
Now that we have successfully deployed our sample-calculator-ws-webapp, we need to modify the classloader configuration. This is necessary to allow Tuscany to find all its dependencies in the webapp itself instead of the WebSphere lib directory (as some of the Tuscany dependency JARs are newer than the ones that come with WebSphere). You will need to perform the following steps:
- Open the "sample-calculator-ws-webapp" from the in the Enterprise Applications list
- Click on the Class loading and update detection link
- Select "Classes loaded with application class loader first"
- Select "Single class loader for application"
- Select OK and save
- Start the application from the Enterprise Applications list
Check detailed steps on how to change the classloader configuration in this article from Jean-Sebastien Delfino.
Properly configuring WebServices ports
The last issue we need to deal is to fixup the ports used by webservice binding. By default, the Calculator.composite is configured to use port 8080. In order to this sample work, you need to modify the calculator.composite and update to the same port used by your WebSphere application server (e.g 9080)
Now you should be good to go, and ready to have your Tuscany webapp deployed in a WebSphere Applicatoin Server 7.0.0.1 with SCA FeP.
No comments:
Post a Comment