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
|
<!--
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.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<!-- generateKeywords macro -->
<META name="description" content="Apache Tuscany">
<META name="keywords" content="apache, apache tuscany, tuscany, service, services, fabric, soa, service oriented architecture, sca, service component architecture, das, sdo, csa, ruby, opensource">
<!-- generateKeywords macro end -->
<LINK type="text/css" rel="stylesheet" href="http://tuscany.apache.org/stylesheets/default.css">
<LINK rel="SHORTCUT ICON" href="https://cwiki.apache.org/confluence/display/TUSCANY/$images/favicon.ico">
<TITLE>Apache Tuscany : SCA Java User Guide</TITLE>
<META http-equiv="Content-Type" content="text/html;charset=UTF-8"></HEAD>
<BODY onload="init()">
<!-- topNav macro -->
<TABLE valign="top" border="0" cellspacing="0" cellpadding="0" width="100%" background="http://tuscany.apache.org/images/TuscanyLogoNEW_Text_120px_bg.jpg">
<TR>
<TD valing="top" align="left">
<A href="https://cwiki.apache.org/confluence/pages/viewpage.action?spaceKey=TUSCANY&title=$siteroot"><IMG src="http://tuscany.apache.org/images/TuscanyLogoNEW_Text_120px_bg.jpg" height="91" width="25" border="0"></A>
</TD>
<TD>
<A href="http://tuscany.apache.org/"><IMG src="http://tuscany.apache.org/images/TuscanyLogo.jpg" border="0"></A>
</TD>
<TD width="100%">
</TD>
<!-- Adds the edit page link to the top banner-->
<TD valign="bottom">
<DIV style="padding: 2px 10px; margin: 0px;">
<A href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=44873">
<IMG src="http://tuscany.apache.org/images/notep_16.gif" height="16" width="16" border="0" align="absmiddle" title="Edit Page"></A>
</DIV>
</TD>
</TR>
</TABLE>
<!-- topNav macro end -->
<!-- breadCrumbs macro -->
<TABLE border="0" cellpadding="2" cellspacing="0" width="100%">
<TR class="topBar">
<TD align="left" valign="middle" class="topBarDiv" nowrap="true" width="100%">
<A href="home.html" title="Apache Tuscany">Apache Tuscany</A> > <A href="home.html" title="Home">Home</A> > <A href="sca-overview.html" title="SCA Overview">SCA Overview</A> > <A href="sca-java.html" title="SCA Java">SCA Java</A> > <A href="java-sca-documentation-menu.html" title="Java SCA Documentation Menu">Java SCA Documentation Menu</A> > <A href="" title="SCA Java User Guide">SCA Java User Guide</A>
</TD>
<TD align="right" valign="middle" class="topBarDiv" align="left" nowrap="true">
<A href="http://mail-archives.apache.org/mod_mbox/tuscany-user">User List</A> | <A href="http://mail-archives.apache.org/mod_mbox/tuscany-dev">Dev List</A> | <A href="http://issues.apache.org/jira/browse/Tuscany">Issue Tracker</A>
</TD>
</TR>
</TABLE>
<!-- breadCrumbs macro end -->
<TABLE border="0" cellpadding="0" width="100%" bgcolor="#FFFFFF">
<TR>
<TD align="left" valign="top">
<!-- pageContent macro -->
<DIV id="PageContent">
<DIV class="pagecontent">
<DIV class="wiki-content">
<DIV class="panel" style="background-color: #ECF4D1;border-color: #C3CDA1;border-style: solid;border-width: 1px;"><DIV class="panelHeader" style="border-bottom-width: 1px;border-bottom-style: solid;border-bottom-color: #C3CDA1;background-color: #C3CDA1;"><B>Apache Tuscany SCA User Guide</B></DIV><DIV class="panelContent" style="background-color: #ECF4D1;">
<UL>
<LI><A href="#SCAJavaUserGuide-Intro"><B>About Tuscany User Guide</B></A></LI>
<LI><A href="#SCAJavaUserGuide-CreateYourFirstApplication"><B>Create Your First Application</B></A>
<UL>
<LI>Single node, Tuscany standalone environment</LI>
</UL>
</LI>
<LI><A href="#SCAJavaUserGuide-webservices"><B>Create a Webservices component</B></A>
<UL>
<LI>Webservices as reference, Tuscany standalone envrionment</LI>
</UL>
</LI>
<LI><A href="#SCAJavaUserGuide-distributedapplication"><B>Create a Distributed Application</B></A>
<UL>
<LI>Multiple nodes, Tuscany standalone environment</LI>
</UL>
</LI>
<LI><A href="http://tuscany.apache.org/sca-java-web-applications.html" class="external-link" rel="nofollow"><B>Deploying as Web Application</B></A></LI>
<LI><A href="#SCAJavaUserGuide-CreateAStoreEnterpriseApplication"><B>Create an enterprise Store Application</B></A>
<UL>
<LI>Multi node, presentation tier, web20 binding, web app</LI>
</UL>
</LI>
<LI><A href="#SCAJavaUserGuide-HostEnvironments"><B>Host Environments</B></A></LI>
<LI><A href="#SCAJavaUserGuide-usingExtensions"><B>Using Extensions</B></A></LI>
<LI><A href="#SCAJavaUserGuide-security"><B>Running Tuscany with Java2 Security Enabled</B></A></LI>
<LI><A href="#SCAJavaUserGuide-Tuscanydependencies"><B>Do I need all of Tuscany?</B></A>
<BR class="atl-forced-newline">
</LI>
</UL>
</DIV></DIV>
<DIV class="panelMacro"><TABLE class="noteMacro"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="https://cwiki.apache.org/confluence/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD><DIV class="" align="center">This page is undergoing complete re-write to be more like a user guide than it is today. You are welcome to help review and complete it. </DIV>
</TD></TR></TABLE></DIV>
<H2><A name="SCAJavaUserGuide-"></A><A name="SCAJavaUserGuide-Intro"></A><DIV class="" style="background-color: #C3CDA1;">About Tuscany User Guide</DIV>
</H2>
<P>It is assumed that by now you have browsed through the <A href="http://cwiki.apache.org/confluence/display/TUSCANY/Quick%20Guide%20to%20SCA" class="external-link" rel="nofollow">introduction to SCA</A> section or are familiar with SCA. This user guide helps you learn more about SCA through Tuscany. It starts with building a simple application and progresses into more advanced features through references to samples that reside in Tuscany. </P>
<P>Before we start, let's emphasise that it is Tuscany's goal to provide an implementaiton that avoids imposing rules and requirements on how you write your applications. In fact the goal is to let you write application code without being concerned about the technology you choose or the environment in which it will be used. You focus on your business logic and Tuscany infrastructure will handle the rest. </P>
<H2><A name="SCAJavaUserGuide-"></A><A name="SCAJavaUserGuide-CreateYourFirstApplication"></A><DIV class="" style="background-color: #C3CDA1;">Create Your First Application</DIV>
</H2>
<P>This simple exercise provides you with a hands-on experience for creating an SCA calculator application. Although this is a simple application, it will cover the following items:</P>
<UL>
<LI>Creating SCA POJO-based components</LI>
<LI>Composing an application</LI>
<LI>Deploying the application</LI>
<LI>Modifying the application to use a different binding</LI>
</UL>
<P>Give <A href="getting-started-with-tuscany-using-the-command-line.html" title="Getting Started with Tuscany ( using the Command Line)">create a calculator application</A> a try. </P>
<H2><A name="SCAJavaUserGuide-"></A><A name="SCAJavaUserGuide-webservices"></A><DIV class="" style="background-color: #C3CDA1;">Create a Webservices component</DIV>
</H2>
<P>Learn how to expose your pojo components as webservices. This will cover</P>
<UL>
<LI>Creating SCA POJO-based component and exposing it as a webservice</LI>
</UL>
<P>Give <A href="build-your-first-web-services-with-tuscany.html" title="Build your first Web Services with Tuscany">Building your first web services using Tuscany</A> a try.</P>
<H2><A name="SCAJavaUserGuide-"></A><A name="SCAJavaUserGuide-distributedapplication"></A><DIV class="" style="background-color: #C3CDA1;">Create a Distributed Application</DIV>
</H2>
<P>A Tuscany application can be run in a single or multi-node environment. Here we introduce the Tuscany node and SCA domain and explain how the calculator example can be distributed across multiple nodes. We will cover the following:</P>
<UL>
<LI>What is a node?</LI>
<LI>What is the SCA domain</LI>
<LI>How to create and application that will run across multiple nodes in a domain</LI>
</UL>
<P>Take a look at <A href="distributed-sca-domain.html" title="Distributed SCA Domain">Distributed SCA Domain</A></P>
<H2><A name="SCAJavaUserGuide-"></A><A name="SCAJavaUserGuide-CreateanenterpriseApplication"></A><DIV class="" style="background-color: #C3CDA1;">Create a Store Enterprise Application</DIV>
</H2>
<P>Now that you have created a simple calculator application, let's move on to a more interesting application called store. This application is developed in Eclipse enviromment and uses more advanced features that are offered in Tuscany. You will notice that it is as simple to create this application as it was to create the calculator application.</P>
<P><A href="getting-started-with-tuscany.html" title="Getting Started with Tuscany">Getting Started with Tuscany using a Tuscany Distribution In Eclipse</A><BR>
This is a quick getting started guide that go trough the steps of building the store scenario using the Tuscany SCA distribution manually installed into Eclipse</P>
<P><A href="getting-started-with-tuscany-using-tuscany-eclipse-plugin.html" title="Getting Started with Tuscany (using Tuscany Eclipse Plugin)">Getting Started with Tuscany using the Tuscany Eclipse Plugin</A></P>
<P>This is a quick getting started guide that go trough the steps of building the store scenario using the Tuscany Eclipse plugin.</P>
<H2><A name="SCAJavaUserGuide-"></A><A name="SCAJavaUserGuide-HostEnvironments"></A><DIV class="" style="background-color: #C3CDA1;">Host Environments</DIV>
</H2>
<P>Tusncany applications can be run in a Tuscany standalone environment or in multitude of different host environments. You have seen examples of how to run in standalone environments in the previous sections. Here we cover other platforms.</P>
<H3><A name="SCAJavaUserGuide-Tomcat"></A>Tomcat</H3>
<P>Running a Tuscany SCA Java enabled webapp in Tomcat is as simple as copying the webapp to the Tomcat webapps directory.</P>
<H3><A name="SCAJavaUserGuide-Geronimo"></A>Geronimo</H3>
<P><IMG class="emoticon" src="https://cwiki.apache.org/confluence/images/icons/emoticons/warning.gif" height="16" width="16" align="absmiddle" alt="" border="0"> TODO ... get link from Vamsi</P>
<H3><A name="SCAJavaUserGuide-WebSphere"></A>WebSphere</H3>
<P>Please see this blog entry to learn how to do this: <A href="http://jsdelfino.blogspot.com/2007/10/how-to-use-apache-tuscany-with.html" class="external-link" rel="nofollow">http://jsdelfino.blogspot.com/2007/10/how-to-use-apache-tuscany-with.html</A></P>
<H3><A name="SCAJavaUserGuide-WebLogic"></A>WebLogic</H3>
<P>Please see this user's blog to learn how to do this: <A href="http://davesowerby.blogspot.com/2008/02/using-tuscany-with-weblogic.html" class="external-link" rel="nofollow">http://davesowerby.blogspot.com/2008/02/using-tuscany-with-weblogic.html</A></P>
<H3><A name="SCAJavaUserGuide-Eclipse"></A>Eclipse</H3>
<P>You can develop and run your applications in Eclipse environment.<BR>
<A href="getting-started-with-tuscany.html" title="Getting Started with Tuscany">Getting Started with Tuscany using a Tuscany Distribution In Eclipse</A><BR>
Tuscany also provides a Tuscany Eclipse plug-in to facilitate the development of SCA applications on Tuscany in the Eclipse environment.<BR>
<A href="getting-started-with-tuscany-using-tuscany-eclipse-plugin.html" title="Getting Started with Tuscany (using Tuscany Eclipse Plugin)">Getting Started with Tuscany using the Tuscany Eclipse Plugin</A></P>
<H2><A name="SCAJavaUserGuide-"></A><A name="SCAJavaUserGuide-usingextensions"></A><DIV class="" style="background-color: #C3CDA1;">Using Extensions </DIV>
</H2>
<P>What are extensions? Well, we call these extensions: bindings, implementation types, interface types, policies. Think of SCA Java infrastructure as providing the framework that supports all these pluggable functionality. Bindings provide protocol handling, implementation types provide support for different languages and programming models, interface types allow enable you to define interfaces in different ways for example Java, WSDL and policies enable you to choose which type of policies you want to apply to your application. You can pick and choose what you need based on your requirements and the technologies that you use. For a complete list of available extensions and their documentation please check this link.</P>
<H2><A name="SCAJavaUserGuide-"></A><A name="SCAJavaUserGuide-security"></A><DIV class="" style="background-color: #C3CDA1;">Running Tuscany with Java2 Security Enabled</DIV>
</H2>
<P>Tuscany can be enabled to run with Java2 security on.<BR>
<A href="running-tuscany-with-java-2-security-enabled.html" title="Running Tuscany with Java 2 Security Enabled">Running Tuscany with Java 2 Security Enabled</A></P>
<H2><A name="SCAJavaUserGuide-"></A><A name="SCAJavaUserGuide-Tuscanydependencies"></A><DIV class="" style="background-color: #C3CDA1;">Do I need all of Tuscany?</DIV>
</H2>
<P>Tuscany SCA has a very modular architecture. Think of it as building blocks. You pick what you need for your particular application. In 1.x, there is one binary distribution. you can get to a smaller subset through building the source with the appropriate modules that you need. In 2.x code line, we are aiming to provide smaller distributions. For more information about how you can build a smaller distribution please see this <A href="http://cwiki.apache.org/confluence/display/TUSCANY/Build%20Your%20Own%20Tuscany%20Distribution" class="external-link" rel="nofollow">link</A></P>
</DIV>
</DIV>
</DIV>
<!-- pageContent macro end -->
</TD>
</TR>
</TABLE>
<!-- footer macro -->
<SCRIPT src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</SCRIPT>
<SCRIPT type="text/javascript">
_uacct = "UA-1174707-5";
urchinTracker();
</SCRIPT>
<A href="http://www.statcounter.com/" target="_blank"><IMG src="http://c26.statcounter.com/counter.php?sc_project=2619156&java=0&security=94bd7e7d&invisible=0" alt="website stats" border="0"></A>
<DIV class="footer">
Copyright � 2003-2012, The Apache Software Foundation </BR>
Apache Tuscany and the Apache Tuscany project logo are trademarks of The Apache Software Foundation.
</DIV>
<!-- footer macro end -->
</BODY>
</HTML>
|