summaryrefslogtreecommitdiffstats
path: root/sca-java-1.x/branches/sca-java-M2/samples/applications/bigbank/readme.html
blob: b5e90bb08f8df8baca1f78d1fea1b91041cea6de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!--
    * Licensed to the Apache Software Foundation (ASF) under one
    * or more contributor license agreements.  See the NOTICE file
    * distributed with this work for additional information
    * regarding copyright ownership.  The ASF licenses this file
    * to you under the Apache License, Version 2.0 (the
    * "License"); you may not use this file except in compliance
    * with the License.  You may obtain a copy of the License at
    *
    *   http://www.apache.org/licenses/LICENSE-2.0
    *
    * Unless required by applicable law or agreed to in writing,
    * software distributed under the License is distributed on an
    * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    * KIND, either express or implied.  See the License for the
    * specific language governing permissions and limitations
    * under the License.
-->
<html>
<head>
<script type="text/javascript">
function expandImage(img,height,width) {
window.open(img,"Image","menubar=no,resizable=no,status=no,toolbar=no,location=no,height=" + height + ",width=" + width);
}
function goURL(url) {
window.location = url;
}
</script>
  <meta http-equiv="Content-Type" content=
  "text/html; charset=us-ascii">
  <meta http-equiv="Content-Style-Type" content="text/css">

  <title>Tuscany BigBank Sample Application</title>
  <link rel="stylesheet" href="../../css/base.css" type="text/css">
<style type="text/css" media="all">
</style>
</head>

<body>

  <h3>Tuscany BigBank Sample Application</h3>

  <h4>Overview</h4>

  <p>The Tuscany BigBank&nbsp;sample application&nbsp; shows using
  the Tuscany SCA runtime to build a&nbsp; financial application.
  There are two modules: webclient provides the front-end user
  interface and account provides the back-end business services.
  These are deployed as separate web applications</p>

  <h4>Location</h4>
  <p>This sample is located&nbsp;in the&nbsp;
  <a href=".">samples\applications\bigbank</a> directory. There are two
  subdirectories in that for the two modules <a href="account"
  target="_blank">account</a> and <a href="webclient" target=
  "_blank">webclient.</a></p>


  <h4>Prerequisites</h4>

  <p>Obtain the following prerequisites and install according to
  their documentation.</p>

  <ul>
    <li><a href="http://java.sun.com/javase/downloads/index.jsp"
    target="_blank">JDK 5.0</a></li>

    <li><a href="http://maven.apache.org/download.html" target=
    "_blank">Maven 2.0.4</a></li>

    <li><a href="http://tomcat.apache.org/download-55.cgi" target=
    "_blank">Apache Tomcat 5.xx</a> latest version binary core
    distribution.&nbsp;</li>
  </ul>

  <h4><a name="Building" id="Building"></a>Building</h4>
  <p>This sample
  can be built from the bigbank directory using Maven 2.0.4 with
  the following command:</p>
  <p>
  <code>&nbsp;mvn<br></code>
  </p>

  <h4>Setup</h4>
  <p>If you have enabled remote deployment in Tomcat by
  adding the line:<br>
  <code>&nbsp; &lt;user username="admin" password=""
  roles="manager"/&gt;</code><br>
  into&nbsp; <span style="font-style: italic;">&lt;tomcat
  dir&gt;</span>\conf\tomcat-users.xml&nbsp; you can deploy the
  WARs to Tomcat using the tomcat-maven-plugin:<br>
  <code>mvn tomcat:deploy</code></p>
  <p>Alternatively you can copy the WAR files to Tomcat's&nbsp;
  webapps directory.<br>
  
  <code>copy account\target\sample-bigbank-account.war <span style=
  "font-style: italic;">&lt;tomcat dir&gt;</span>\webapps</code><br>
  <code>copy&nbsp;
  webclient\target\sample-bigbank-webclient.war&nbsp;<span style=
  "font-style: italic;">&lt;tomcat dir&gt;</span>\webapps</code><br>
  </p>

  <h4>Running</h4>
  <p>Once you've started your web server, use your web
  browser to view the following URL <a href=
  "http://localhost:8080/sample-bigbank-webclient/" target=
  "_blank">http://localhost:8080/sample-bigbank-webclient/</a><br>
  You can either use an already pre configured&nbsp; account with
  <span style="font-weight: bold;">Login</span> as <span style=
  "color: rgb(204, 0, 0); font-weight: bold;">test</span> and
  <span style="font-weight: bold;">Password</span> as <span style=
  "color: rgb(204, 0, 0); font-weight: bold;">password,</span> or
  you can &nbsp;create a new account.<br>
  The demo is first configured to use a local mock stock quote
  service that returns random stock data. &nbsp;If you want to use
  an actual stock quote provider follow these steps:</p>

  <ul>
    <li>Stop your server by issuing in the&nbsp; <span style=
    "font-style: italic;">&lt;tomcat dir&gt;</span><span style=
    "font-weight: bold;">\bin</span> directory</li>

    <li>Issue <span style="font-weight: bold;">shutdown</span>
    command to stop your web application server<span style=
    "font-weight: bold;">.</span></li>

    <li>Edit the account SCDL file <span style=
    "font-style: italic;">&lt;tomcat dir&gt;</span><span style=
    "font-weight: bold;">\webapps\sample-bigbank-account\WEB-INF\default.scdl</span></li>

    <li>Change the SCDL wiring to remove the mock stock quote
    service by commenting it out as follows:<br>
    &lt;!--<br>
    &nbsp;&nbsp;&nbsp; &lt;component
    name="StockQuoteServiceComponent"&gt;<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    &lt;implementation.java
    class="bigbank.account.services.stockquote.StockQuoteServiceImpl"
    /&gt;<br>
    &nbsp;&nbsp;&nbsp; &lt;/component&gt;<br>
    --&gt;</li>

    <li>Uncomment the real stockquote service section in lines 68
    to 80.<br></li>

    <li>Change to the directory &nbsp;<span style=
    "font-weight: bold;">apache-tomcat-5.5.17\bin&nbsp;</span></li>

    <li>issue <span style="font-weight: bold;">startup
    &nbsp;</span> command to start up the server in the
    <span style="font-style: italic;">&lt;tomcat dir&gt;</span>\bin
    directory<span style="font-weight: bold;">.</span></li>
  </ul>
  <p>The sample should now be using the real stock quote
  provider.&nbsp;</p>

  <h4>Summary</h4><p>This example illustrates using Tuscany runtime
  in building a financial Web application&nbsp;using SCA programing
  model. &nbsp;The following key concepts are covered:</p>

  <ul>
    <li><b><i>Component implementations</i></b>. that provide web
    based&nbsp; HTML&nbsp;user interface</li>

    <li><b><i>Component implementations</i></b> that provide
    <b><i>local services</i></b> in Java. Local services implement
    internal application business logic such as tracking user state
    and are not exposed remotely.</li>

    <li><b><i>Component implementations</i></b> that have
    <b><i>configuration properties</i></b> and <b><i>service
    references</i></b> to other services</li>

    <li><b><i>Components</i></b> that use and
    <b><i>configure</i></b> <b><i>the properties and
    references</i></b> of component implementations</li>

    <li><b><i>SCA Services</i></b> to publish remotable services
    via a <b><i>Web Service binding</i></b>.</li>

    <li><b><i>SCA References&nbsp;</i></b> to consume remotable
    services via a <b><i>Web Service binding</i></b></li>

    <li>Assembling implementation, components, entry points and
    external service into composite components.</li>

    <li>Creating a module and all of its artifacts as part of a
    <b><i>web application</i></b> to show a front-end access to SCA
    services</li>

    <li>The use of Data Access services to persist and retrieve
    Service Data Objects from Apache Derby.</li>

    <li style="text-align: left;">The use of &nbsp;existing Web
    services in&nbsp; SCA.</li>
  </ul><p>BigBank sample provides the following user services: account
  balance,&nbsp;making deposits and withdrawals&nbsp; to purchase
  and sell stock, and to view current stock value.<br>
  The sample is organized into two SCA modules: webclient and
  account. The webclient module functionality is to provide user
  information and obtain user input. The account module is used to
  retrieve and store user information, account information, current
  stock information and the purchasing and selling of stock. The
  two modules interact via web services through SCA references and
  services.</p>
  <br>

  <div style="text-align: center;">
    <img style="width: 381px; height: 169px;" alt=
    "Overview of modules." title="Overview of modules." src=
    "docs/modualoverview.png" align="middle">

    <h5>Webclient</h5><br>
    <a href=
    "javascript:expandImage('docs/Show.Image.html?url=webclientmodule.png',1000,1100)">
    <img style="width: 300px; height: 200px;" alt="Webclient files"
    title="Click to expand" src="docs/webclientmodule.png"></a><br>

    <p>&nbsp;</p>

    <table style="text-align: left; width: 100%;" border="0"
    cellpadding="1" cellspacing="0" width="100%">
      <tbody>
        <tr>
          <td align="left" valign="top" width="*">
            <a href=
            "javascript:expandImage('docs/Show.Image.html?url=webclientfiles.png',850,500)">
            <img style="width: 262px; height: 360px;" alt=
            "Webclient files" title="Click to expand" src=
            "docs/webclientfiles.png"></a>&nbsp;<br>

            <div style="text-align: center;">
              <small><span style="font-style: italic;">click to
              enlarge</span></small>
            </div>
          </td>

          <td style="text-align: left;" align="left" valign="top"
          width="80%">
            <table style="text-align: left; width: 100%;" border=
            "0" cellpadding="1" cellspacing="0">
              <tbody>
                <tr>
                  <td style="text-align: center;" colspan="3">
                  <span style=
                  "font-weight: bold; text-decoration: underline;">Java
                  source files implementing SCA components and
                  interfaces.</span></td>
                </tr>

                <tr>
                  <td style="width: 10%;">
                  AccountServiceComponentImpl.java</td>

                  <td>&nbsp;</td>

                  <td>Implements the account service.</td>
                </tr>

                <tr>
                  <td>AccountLoginServiceImpl.java</td>

                  <td></td>

                  <td>Implements the Login service.</td>
                </tr>

                <tr>
                  <td>LoginService.java</td>

                  <td></td>

                  <td>Interface for a services provided by a
                  login&nbsp; service component.</td>
                </tr>

                <tr>
                  <td>ProfileService.java</td>

                  <td></td>

                  <td>Interface for a service provided by a profile
                  component.</td>
                </tr>

                <tr>
                  <td>ProfileServiceImpl.java</td>

                  <td></td>

                  <td>Implements the profile component.</td>
                </tr>

                <tr>
                  <td>SimpleLoginServiceImpl.java</td>

                  <td></td>

                  <td>A simple in memory login service.</td>
                </tr>

                <tr>
                  <td style="text-align: center;" colspan="3">
                  <span style=
                  "font-weight: bold; text-decoration: underline;">Java
                  source files implementing Web HTML
                  interface.</span></td>
                </tr>

                <tr>
                  <td>AccountStatusTag.java</td>

                  <td></td>

                  <td>Implements a jsp tag that&nbsp;displays the
                  account information</td>
                </tr>

                <tr>
                  <td>StockStatusTag.java</td>

                  <td></td>

                  <td>Implements a jsp tag that displays the stock
                  information.</td>
                </tr>

                <tr>
                  <td>LoginBarrierTag.java</td>

                  <td></td>

                  <td>Implements a jsp tag that ensures the user is
                  logged in.</td>
                </tr>

                <tr>
                  <td>ServiceTag.java</td>

                  <td></td>

                  <td>Places an SCA service in the JSP page
                  context.</td>
                </tr>

                <tr>
                  <td>FormServlet.java</td>

                  <td></td>

                  <td>Process user input and uses the
                  AccountService component.</td>
                </tr>

                <tr>
                  <td>LoginServlet.java</td>

                  <td></td>

                  <td>Processes logging in and logout.</td>
                </tr>

                <tr>
                  <td style="text-align: center;" colspan="3">
                  <span style=
                  "font-weight: bold; text-decoration: underline;">Files
                  that will be loaded as resources along
                  classpath.</span></td>
                </tr>

                <tr>
                  <td>AccountService.wsdl</td>

                  <td></td>

                  <td>WSDL that &nbsp;defines the account
                  service.</td>
                </tr>

                <tr>
                  <td>bigbank-tags.tld</td>

                  <td></td>

                  <td>Defines the tag libs for the user
                  interface.</td>
                </tr>

                <tr align="center">
                  <td colspan="3"><span style=
                  "font-weight: bold; text-decoration: underline;">Files
                  located in WEB-INF directory.</span></td>
                </tr>

                <tr>
                  <td><a href="#SCDL">default.scdl</a></td>

                  <td></td>

                  <td>Application's SCA SCDL file.</td>
                </tr>

                <tr>
                  <td><a href="#Web.xml">web.xml</a></td>

                  <td></td>

                  <td>Application's web.xml file.</td>
                </tr>

                <tr align="center">
                  <td colspan="3"><span style=
                  "font-weight: bold; text-decoration: underline;">Generated
                  Files.</span></td>
                </tr>

                <tr>
                  <td>sdo source</td>

                  <td></td>

                  <td>Generated SDO. Created by <a href=
                  "#tuscany-sdo-plugin"><code><span style=
                  "font-weight: bold;">tuscany-sdo-plugin</span></code></a>
                  maven plugin.</td>
                </tr>

                <tr>
                  <td>wsdl2java-source</td>

                  <td></td>

                  <td>Generated SDO interface. Created by <a href=
                  "#tuscany-plugin-wsdl2java"><code><span style=
                  "font-weight: bold;">tuscany-plugin-wsdl2java</span></code></a>
                  maven &nbsp;plugin.</td>
                </tr>

                <tr align="center">
                  <td colspan="3"><span style=
                  "font-weight: bold; text-decoration: underline;">Build
                  files.</span></td>
                </tr>

                <tr>
                  <td><a href="#pom.xml">pom.xml</a></td>

                  <td></td>

                  <td>Maven build file.</td>
                </tr>
              </tbody>
            </table>
          </td>
        </tr>
      </tbody>
    </table>

    <p>&nbsp;</p><!-- account -->

    <h5>Account</h5><br>
    <a href=
    "javascript:expandImage('docs/Show.Image.html?url=accountmodule.png',830,1400)">
    <img style="width: 300px; height: 200px;" alt="Account module"
    title="Click to expand" src="docs/accountmodule.png"></a><br>

    <p>&nbsp;</p>

    <table style="text-align: left; width: 100%;" border="0"
    cellpadding="1" cellspacing="0" width="100%">
      <tbody>
        <tr>
          <td align="left" valign="top" width="*">
            <a href=
            "javascript:expandImage('docs/Show.Image.html?url=accountfiles.png',850,500)">
            <img style="width: 262px; height: 360px;" alt=
            "Webclient files" title="Click to expand" src=
            "docs/accountfiles.png"></a>&nbsp;<br>

            <div style="text-align: center;">
              <small><span style="font-style: italic;">click to
              enlarge</span></small>
            </div>
          </td>

          <td style="text-align: left;" align="left" valign="top"
          width="80%">
            <table style="text-align: left; width: 100%;" border=
            "0" cellpadding="1" cellspacing="0">
              <tbody>
                <tr>
                  <td style="text-align: center;" colspan="3">
                  <span style=
                  "font-weight: bold; text-decoration: underline;">Java
                  source files implementing SCA components and
                  interfaces.</span></td>
                </tr>

                <tr>
                  <td style="width: 10%;">
                  AccountServiceImpl.java</td>

                  <td>&nbsp;</td>

                  <td>Implements the account service
                  component.</td>
                </tr>

                <tr>
                  <td>AccountDataService.java</td>

                  <td></td>

                  <td>Interface defined for component implementing
                  &nbsp;an account's data service.</td>
                </tr>

                <tr>
                  <td>AccountDataServiceDASImpl.java</td>

                  <td></td>

                  <td>A Data Access Service (DAS) implementation of
                  of the Account Data Service.</td>
                </tr>

                <tr>
                  <td>AccountDataServiceImpl.java</td>

                  <td></td>

                  <td>A Data Service implementation not using
                  DAS.</td>
                </tr>

                <tr>
                  <td>AccountDBInit.java</td>

                  <td></td>

                  <td>A utility to just create the database and it
                  table and fill in some initial data.</td>
                </tr>

                <tr>
                  <td>StockQuote.java</td>

                  <td></td>

                  <td>A class to hold the StockQuote
                  information.</td>
                </tr>

                <tr>
                  <td>StockQuoteService.java</td>

                  <td></td>

                  <td>Interface defined for a component
                  implementing a stock quote service.</td>
                </tr>

                <tr>
                  <td>StockQuoteServiceImpl.java</td>

                  <td></td>

                  <td>Implements a fake stock quote service.</td>
                </tr>

                <tr>
                  <td>StockQuoteWebservicexServiceImpl.java</td>

                  <td></td>

                  <td>Implements an actual stock quote
                  service.</td>
                </tr>

                <tr>
                  <td style="text-align: center;" colspan="3">
                  <span style=
                  "font-weight: bold; text-decoration: underline;">Files
                  that will be loaded as resources along
                  classpath.</span></td>
                </tr>

                <tr>
                  <td>AccountService.wsdl</td>

                  <td></td>

                  <td>WSDL that &nbsp;defines the account
                  service</td>
                </tr>

                <tr>
                  <td>stockquotes.webservicex.wsdl</td>

                  <td></td>

                  <td>Actual stock quote service WSDL.</td>
                </tr>

                <tr>
                  <td><a href=
                  "#DAS_">DasAccountConfiguration.xml</a></td>

                  <td></td>

                  <td>Provides any needed configuration info
                  including datasource properties, table
                  definitions,</td>
                </tr>

                <tr align="center">
                  <td colspan="3"><span style=
                  "font-weight: bold; text-decoration: underline;">Files
                  located in WEB-INF directory.</span></td>
                </tr>

                <tr>
                  <td><a href="#SCDL">default.scdl</a></td>

                  <td></td>

                  <td>Application's SCA SCDL file.</td>
                </tr>

                <tr>
                  <td><a href="#Web.xml">web.xml</a></td>

                  <td></td>

                  <td>Application's web.xml file.</td>
                </tr>

                <tr align="center">
                  <td colspan="3"><span style=
                  "font-weight: bold; text-decoration: underline;">Generated
                  Files.</span></td>
                </tr>

                <tr>
                  <td>sdo source</td>

                  <td></td>

                  <td>Generated SDO. Created by&nbsp;<a href=
                  "#tuscany-sdo-plugin"><code><span style=
                  "font-weight: bold;">tuscany-sdo-plugin</span></code></a>
                  maven plugin.</td>
                </tr>

                <tr>
                  <td>wsdl2java-source</td>

                  <td></td>

                  <td>Generated SDO interface. Created
                  by&nbsp;<a href=
                  "#tuscany-plugin-wsdl2java"><code><span style=
                  "font-weight: bold;">tuscany-plugin-wsdl2java</span></code></a>
                  maven &nbsp;plugin.</td>
                </tr>

                <tr align="center">
                  <td colspan="3"><span style=
                  "font-weight: bold; text-decoration: underline;">Build
                  files.</span></td>
                </tr>

                <tr>
                  <td><a href="#pom.xml">pom.xml</a></td>

                  <td></td>

                  <td>Maven build file.</td>
                </tr>
              </tbody>
            </table>
          </td>
        </tr>
      </tbody>
    </table>
  </div><br>
  <br>


  <h5><a name="pom.xml" id="pom.xml"></a>Pom.xml</h5>
  <p>The directions
  for maven&nbsp; how&nbsp; to build the each module is located in
  each module's directory in the&nbsp;pom.xml file. &nbsp;The
  application uses Java 1.5 and thus in the build &nbsp;plugin
  section needs the following compiler directives:</p>
  &nbsp;&nbsp;<code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  &lt;plugin&gt;<br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;<br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;<br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  &lt;configuration&gt;<br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  &lt;source&gt;<span style=
  "color: rgb(255, 0, 0); font-weight: bold;">1.5</span>&lt;/source&gt;<br>

  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  &lt;target&gt;<span style=
  "color: rgb(255, 0, 0); font-weight: bold;">1.5</span>&lt;/target&gt;<br>

  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  &lt;/configuration&gt;<br>
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  &lt;/plugin&gt;</code><br>
  <p>Both webclient and account uses three maven
  plugins:&nbsp;<code style=
  "font-weight: bold;">tuscany-sdo-plugin</code>,&nbsp;<code style=
  "font-weight: bold;">tuscany-plugin-wsdl2java</code>,
  and&nbsp;<code style=
  "font-weight: bold;">tuscany-war-plugin</code>.
  The&nbsp;tuscany-sdo-plugin is provided by Tuscany 's SDO project
  while the other two are provided by the Tuscany SCA project.</p>
  <p>The <code style="font-weight: bold;"><a name="tuscany-sdo-plugin"
  id="tuscany-sdo-plugin"></a>tuscany-sdo-plugin</code>
  &nbsp;references the WSDL's schema and generates all the files
  located in target/sdo_source directory. &nbsp;The application
  uses these classes as a databinding instead of having to deal
  directly with XML that &nbsp;represents form as defined in the
  WSDL's schema.</p>
  <p>The <code style="font-weight: bold;"><a name=
  "tuscany-plugin-wsdl2java" id=
  "tuscany-plugin-wsdl2java"></a>tuscany-plugin-wsdl2java</code>
  plugin generates a Java interface in the target/wsdl2java-source
  directory that is used to define the inteface (prottype) in the
  wsdl.</p>
  <p>The <code style="font-weight: bold;">tuscany-war-plugin</code> is
  used to add both the Tuscany runtime and any Tuscany&nbsp;
  extensions required by the application in the war file.. Looking
  at the pom.xml and search for &nbsp;"<code style=
  "font-weight: bold;">tuscany-war-plugin"</code> you'll find the
  plugin. &nbsp;Which extension you want loaded are specified in
  the <code><span style=
  "font-weight: bold;">extensions</span></code> section. The format
  for this&nbsp; closely follows Maven's artifact naming. &nbsp;The
  boolean <code><span style=
  "font-weight: bold;">loadExtensionDependencies</span></code>
  option if true will &nbsp;resolve all dependencies for each
  extension listed here and also include them in the war file.
  &nbsp;<br>
  <br>

  <h4>Application</h4>

  <h5><a name="Web.xml" id="Web.xml"></a>Web.xml</h5><p>The web.xml
  file in each module adds necessary "hooks" to initiate and
  maintain the Tuscany SCA runtime in a web application host.<br>
  &nbsp;</p>

  <table style="text-align: left; width: 100%;" border="1"
  cellpadding="2" cellspacing="2">
    <tbody>
      <tr>
        <td>
          <pre>
<small>&lt;listener&gt;<br>
&lt;listener-class&gt;org.apache.tuscany.runtime.webapp.TuscanyContextListener&lt;/listener-class&gt;<br>
&lt;/listener&gt;</small>
</pre>
        </td>

        <td>This class initializes the Tuscany runtime when the
        applications is started and helps finalize the Tuscany
        runtime when the application has ended.</td>
      </tr>

      <tr>
        <td>
          <pre>
<small>&lt;servlet&gt;<br>
&lt;servlet-name&gt;TuscanyServlet&lt;/servlet-name&gt;<br>
&lt;display-name&gt;Tuscany Servlet&lt;/display-name&gt;<br>
&lt;servlet-class&gt;org.apache.tuscany.runtime.webapp.TuscanyServlet&lt;/servlet-class&gt;<br>
&lt;/servlet&gt;</small>
</pre>
        </td>

        <td>This class provides the web applications servlet
        interface to SCA components. &nbsp;The Axis websevices
        binding extension requires this.</td>
      </tr>

      <tr>
        <td>
          <pre>
<small>&lt;listener&gt;<br>
&lt;listener-class&gt;org.apache.tuscany.runtime.webapp.TuscanySessionListener&lt;/listener-class&gt;<br>
&lt;/listener&gt;</small>
</pre>
        </td>

        <td>This listener helps provide SCA session support .</td>
      </tr>
    </tbody>
  </table><br>
  <p>The web application can be run in offline or online when
  resolving dependencies required by the application or it's
  required extensions. This is configured in the web.xml with the
  context-param element with a parameter name <code><span style=
  "font-weight: bold;">tuscany.online</span></code>. If&nbsp; not
  specified or set to true, dependencies are resolved by searching
  the local war repository, the local Maven repository, and remote
  repositories. If specified and set to false, the remote
  repositories will not be searched.</p>

  <h5><a name="SCDL" id="SCDL"></a>SCDL</h5>
  <p>Each module's SCA
  application SCDL is located in the web application&nbsp;
  WEB-INF/default.scdl file. &nbsp;This is the default location,
  but within the web.xml it is possible to override this with a
  context-param element &nbsp;with the name <code><span style=
  "font-weight: bold;">tuscany.applicationScdlPath</span></code>.
  &nbsp;The Tuscany System SCDL can also be overridden with another
  context-param element with the name <code><span style=
  "font-weight: bold;">tuscany.systemScdlPath</span></code>.<br>
  The SCDL&nbsp; used by the BigBank application is defined by
  <a href=
  "http://www.osoa.org/download/attachments/35/SCA_AssemblyModel_V096.pdf?version=1"
  target="_blank">SCA Assembly Model V0.96</a> , <a href=
  "http://www.osoa.org/download/attachments/35/SCA_ClientAndImplementationModelforJava_v0.95.pdf?version=3"
  target="_blank">SCA Client and Implementation Model for Java
  (V0.95)</a> &nbsp;and the <a href=
  "http://www.osoa.org/download/attachments/35/SCA_WebServiceBindings_V096-draft1.pdf?version=3"
  target="_blank">SCA Web Service bindings</a> specifications.<br>
  There is one extension to SCDL used by BigBank that is specific
  to Tuscany that is used by SDO databinding extension.
  &nbsp;The&nbsp;<code>import.sdo</code> element in the SCDL
  specifies which&nbsp; SDO factories to register the SDO types.
  &nbsp;In the case of BigBank the factory is the class generated
  by the&nbsp;<code style=
  "font-weight: bold;">tuscany-sdo-plugin</code> maven plugin. An
  example of this follows:</p>
  <pre>
 <code>&lt;dbsdo:import.sdo xmlns:dbsdo="http://incubator.apache.org/tuscany/xmlns/databinding/sdo/1.0-incubator-M2"
factory="com.bigbank.account.AccountFactory"/&gt; <br>
</code>
</pre>

  <h5>Code</h5><p>The Java code for the most part just implements the
  Web interface and the SCA components necessary to implement the
  business logic. The code uses Java 5.0 annotations as documented
  by the <a href=
  "http://www.osoa.org/download/attachments/35/SCA_ClientAndImplementationModelforJava_v0.95.pdf?version=3"
  target="_blank">SCA Client and Implementation Model for Java
  (V0.95)</a> specifications. The samples uses one annotation that
  is an Tuscany extension that is used by the databinding framework
  to identify that the components expect to SDO s for complex data
  types. An example of this is seen in the AccountService interface
  which has the <code style=
  "font-weight: bold;">@DataType(name="commonj.sdo.DataObject")</code>
  annotation.</p>

  <h4><a name="DAS_" id="DAS_"></a><span style=
  "font-family: monospace;">RDB DAS</span></h4>

   <p>The Relational Database DAS (RDB DAS) is used in this sample to access relational data in terms
   of SDOs.  All the code pertaining to this usage is contained to two one files: 
   AccountDataServiceDASImpl.java and DasAccountConfiguration.xml.  The java file provides code that 
   instantiates and invokes the DAS and the XML file provides RDB DAS configuration.</p>

   <p>The sample demonstrates a few of the RDB DAS capabilities including:</p>

   <ul>

   <li>reading a graph of SDOs based on a select query provided inline </li>
   <li>reading a graph of SDOs based on a named select query defined in the config file </li>
   <li>executing a named command to manually insert data</li>
   <li>leveraging SDO Change Summary to by utilizing the DAS "applyChanges" method to flush graph modifications </li>
   <li>utilizing the DAS column-converter framework </li>
   <li>using the column/property name mapping (aliasing)</li>

   </ul>

   <p>This sample does not currently demonstrate a few other key DAS features including Object relationships, optimistic 
   concurrency control, and the use of convention over configuration.  User level documentation for the RDB DAS can
   be found in the <a href=
  "http://wiki.apache.org/ws/Tuscany/TuscanyJava/DAS_Java_Overview/RDBDAS_Java_User_Guide"target="_blank">RDBDAS User's Guide</a>.
  </p>
   <p>This sample uses the RDB DAS as a utility.  A future version of this sample will access the DAS as an SCA service.
   </p>

</body>
</html>