summaryrefslogtreecommitdiffstats
path: root/das-java/tags/1.0-incubating-beta1/samples/customer/readme.htm
blob: 3e7fbe7752a31ac7a6b8e36d939ecd3478568e90 (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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252">
	<TITLE>Tuscany RDB DAS Sample</TITLE>
	<META NAME="GENERATOR" CONTENT="BrOffice.org 2.0  (Win32)">
	<META NAME="CREATED" CONTENT="20070704;1002817">
	<META NAME="CHANGEDBY" CONTENT="a a">
	<META NAME="CHANGED" CONTENT="20070704;2123396">
	<!-- <pre><a name="header-text">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
&quot;License&quot;); 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
&quot;AS IS&quot; 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.   </a></pre>

-->
</HEAD>
<BODY LANG="en-US" DIR="LTR">
<H1 LANG="pt-BR">RDB DAS Customer Sample</H1>
<H2 LANG="pt-BR">Introduction</H2>
<P LANG="pt-BR">This stand-alone sample demonstrates the RDB Data
Access Service in the context of a simple java application.</P>
<H2 LANG="pt-BR">Building and Running</H2>
<UL>
	<LI><P LANG="pt-BR">Apache Ant latest version installed.</P>
	<UL>
		<UL>
			<LI><P LANG="pt-BR">Download Apache Ant latest version on and
			extract into folder &lt;apache_ant_folder&gt;. You can find it
			here: <A HREF="http://ant.apache.org/bindownload.cgi">http://ant.apache.org/bindownload.cgi</A>.</P>
			<LI><P LANG="pt-BR">Add &lt;apache_ant_folder&gt;/bin directory to
			your OS path variable.</P>
		</UL>
	</UL>
	<LI><P LANG="pt-BR">On console change the actual directory to
	&lt;tuscany_das_java_distribution&gt;/samples/customer/ and execute
	ant application:</P>
	<UL>
		<P LANG="pt-BR">&lt;tuscany_das_java_distribution&gt;/samples/customer/
		&gt; ant</P>
	</UL>
</UL>
<P LANG="pt-BR">The sample will run and output the following:</P>
<P LANG="pt-BR" STYLE="margin-left: 2cm; margin-bottom: 0cm"><FONT SIZE=2>Buildfile:
build.xml</FONT> <BR><BR><FONT SIZE=2>run:</FONT><BR><FONT SIZE=2>[java]
connection info from config***************</FONT><BR><FONT SIZE=2>[java]
dbName:jdbc:derby:target/dastest; create = true user:
password:</FONT><BR><FONT SIZE=2>[java]
******************************************</FONT><BR><FONT SIZE=2>[java]
Setting up for derby run!</FONT><BR><FONT SIZE=2>[java] Dropping
tables</FONT><BR><FONT SIZE=2>[java] Dropping procedures</FONT><BR><FONT SIZE=2>[java]
Creating tables</FONT><BR><FONT SIZE=2>[java] Creating
procedures</FONT><BR><FONT SIZE=2>[java] Inserting data in
tables</FONT><BR><FONT SIZE=2>[java] Database setup complete!</FONT><BR><FONT SIZE=2>[java]
log4j:WARN No appenders could be found for logger
(org.apache.tuscan</FONT><BR><FONT SIZE=2>y.das.rdb.impl.Parameters).</FONT><BR><FONT SIZE=2>[java]
log4j:WARN Please initialize the log4j system properly.</FONT><BR><FONT SIZE=2>[java]
Result:select all customers</FONT><BR><FONT SIZE=2>[java] ID:1
LASTNAME:John ADDRESS:USA</FONT><BR><FONT SIZE=2>[java] ID:2
LASTNAME:Amita ADDRESS:INDIA</FONT><BR><FONT SIZE=2>[java] ID:3
LASTNAME:Patrick ADDRESS:UK</FONT><BR><FONT SIZE=2>[java] ID:4
LASTNAME:Jane ADDRESS:UN</FONT><BR><FONT SIZE=2>[java] Result:insert
new customer</FONT><BR><FONT SIZE=2>[java] ID:1 LASTNAME:John
ADDRESS:USA</FONT><BR><FONT SIZE=2>[java] ID:2 LASTNAME:Amita
ADDRESS:INDIA</FONT><BR><FONT SIZE=2>[java] ID:3 LASTNAME:Patrick
ADDRESS:UK</FONT><BR><FONT SIZE=2>[java] ID:4 LASTNAME:Jane
ADDRESS:UN</FONT><BR><FONT SIZE=2>[java] ID:5 LASTNAME:Jenny
ADDRESS:USA</FONT><BR><FONT SIZE=2>[java] Result:update first
customer</FONT><BR><FONT SIZE=2>[java] ID:1 LASTNAME:BlueBerry
ADDRESS:USA</FONT><BR><FONT SIZE=2>[java] ID:2 LASTNAME:Amita
ADDRESS:INDIA</FONT><BR><FONT SIZE=2>[java] ID:3 LASTNAME:Patrick
ADDRESS:UK</FONT><BR><FONT SIZE=2>[java] ID:4 LASTNAME:Jane
ADDRESS:UN</FONT><BR><FONT SIZE=2>[java] ID:5 LASTNAME:Jenny
ADDRESS:USA</FONT><BR><FONT SIZE=2>[java] Result:delete last
customer</FONT><BR><FONT SIZE=2>[java] Deleting customer named:
Jenny</FONT><BR><FONT SIZE=2>[java] ID:1 LASTNAME:BlueBerry
ADDRESS:USA</FONT><BR><FONT SIZE=2>[java] ID:2 LASTNAME:Amita
ADDRESS:INDIA</FONT><BR><FONT SIZE=2>[java] ID:3 LASTNAME:Patrick
ADDRESS:UK</FONT><BR><FONT SIZE=2>[java] ID:4 LASTNAME:Jane
ADDRESS:UN</FONT><BR><BR><FONT SIZE=2>BUILD SUCCESSFUL</FONT><BR><FONT SIZE=2>Total
time: 29 seconds</FONT></P>

<P LANG="pt-BR" STYLE="margin-bottom: 0cm"><FONT SIZE=3>Observation:
The build.xml ant file only works on DAS Java binary distribution.</FONT></P>
</BODY>
</HTML>