產生第二個SCA Domain的方法
步驟如下:
1 Create a directory structure to reflect a WAR files requirement (META-INF, WEBINF).
Creating a directory structure that mirrors the layout of a WAR file simplifies the Ant script needed to assemble the WAR file. This entails creating a webapp folder under the src/main location. Then, under webapp, add a META-INF and a WEB-INF folder.
Once this directory structure is in place, we can move forward to populate it with the required files, starting with the sca-contribution. xml file.
2 Create an sca-contribution.xml file that defines which domain and composite
to use.
Create a new file called sca-contribution.xml and place it under the META-INF directory. We
use this file to define which composite will be deployed within the WAR application.
3 Create a web.xml file that configures Tuscany as a servlet filter to intercept requests targeted to the SCA domain.
4 Create an Ant task to assemble the WAR file.
All WAR files require a web.xml file. Tuscany’s SCA implementation requires a servlet to
be configured in order to field the inbound requests and route them properly to their endpoint destination.
留言列表