<!--
  JBoss, Home of Professional Open Source
  Copyright 2006, Red Hat Middleware LLC, and individual contributors
  as indicated by the @author tags. 
  See the copyright.txt in the distribution for a full listing 
  of individual contributors.
  This copyrighted material is made available to anyone wishing to use,
  modify, copy, or redistribute it subject to the terms and conditions
  of the GNU Lesser General Public License, v. 2.1.
  This program is distributed in the hope that it will be useful, but WITHOUT A
  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
  You should have received a copy of the GNU Lesser General Public License,
  v.2.1 along with this distribution; if not, write to the Free Software
  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  MA  02110-1301, USA.

  
  (C) 2005-2008,
  @author JBoss Inc.
-->
<page title="XML Transaction Service Demonstration Application: Source code overview" rootpath="../..">
    <header>
        XML Transaction Service Demonstration Application: Source code overview
    </header>
    <content>
        <navigation>
            <links include="includes/trailmap_navigation.xml"/>
            <links title="Navigation">
                <link ref="index.html">Start Trailmap</link>
                <link ref="businessactivity.html">Previous</link>
                <link ref="wherenext.html">Next</link>
            </links>
        </navigation>

        <area title="Source code overview">
            <html>
                <p>
                    You can begin experimenting with the XML Transaction component of JBoss 4.4.0 by editing the sample application source code, which is heavily commented to assist your understanding.
                    The source code can be found in the &lt;jbossts 4.4.0 xts&gt;/xts-install/demo/src directory. Deployment descriptors for the application can be found iin directory &lt;jbossts 4.4.0 xtsl&gt;/xts-install/demo/dd.
                    (corresponding files for the JaxRPC implementation are in directories &lt;jbossts 4.4.0 xts&gt;/xts-install/demo/srcrpc and &lt;jbossts 4.4.0 xts&gt;/xts-install/demo/ddrpc). 
                </p>
                <p>
                    It is structured as follows:
                </p>
                <p>
                    <ul>
                        <li>
                            <p>
                                com/jboss/jbosstm/xts/demo/
                            </p>
                            <ul>
                                <li>
                                    <p>
                                        client/BasicClient.java:
                                    </p>
                                    <p>
                                        A servlet that processes the form input and runs either an Atomic Transaction (AT) or Business Activity (BA) to make the bookings.
                                    </p>
                                    <p>
                                        This servlet uses the JBossWS JaxWS implementation as the SOAP transport library.
                                    </p>
                                    <p>
                                        Method configureClientHandler installs the JBoss handler on the JaxWS service endpoint proxies. This ensurs that the client's AT or BA transaction
                                        context is propagated to the web services when their remote methods are invoked.
                                    </p>
                                </li>
                                <li>
                                    <p>
                                        restaurant/* :
                                    </p>
                                    <p>
                                        JaxWS client interfaces for accessing the remote restaurant web services via JaxWS service proxies.
                                    </p>
                                </li>
                                <li>
                                    <p>
                                        taxi/* :
                                    </p>
                                    <p>
                                        JaxWS client interfaces for accessing the remote taxi web services via JaxWS service proxies.
                                    </p>
                                </li>
                                <li>
                                    <p>
                                        theatre/* :
                                    </p>
                                    <p>
                                        JaxWS client interfaces for accessing the remote theatre web services via JaxWS service proxies.
                                    </p>
                                </li>
                                <li>
                                    <p>
                                        services/[restuarant|taxi|theatre]/* :
                                    </p>
                                    <p>
                                        JaxWS service endpoint implementation classes
                                    </p>
                                    <p>Each of these three Web services has similar structure, featuring a *Manager.java class (the transactional business logic, knowing nothing of Web services),
                                    a *View.java file (the GUI component, largely tool generated), and the files that expose the business logic as transactional JaxWS Web services.
                                    </p>
                                    <p>
                                    In the filenames, AT denotes Atomic Transaction, whilst BA is for Business Activities.
                                    </p>
                                    <p>
                                    The *ServiceAT/BA.java file is the business interface, whilst the *Participant.java file has the transaction management code.
                                    </p>
                                    <p>
                                    The *ServiceAT/BA classes expose their JaxWS SEI methods using '<code>javax.jws.WebService</code>' and '<code>javax.jws.WebMethod</code>' annotations.
                                    </p>
                                    <p>
                                    A '<code>javax.jws.HandlerChain</code>' annotation identifies a handler chain deployment descriptor file deployed with the demo applciation. This decriptor configures
                                    the services with handlers that run SEI method invocations in the transaction context propagated from the client.
                                    </p>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </p>
            </html>
        </area>
    </content>
    <footer/>
</page>
