Added: 
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/readme.htm
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/readme.htm?view=auto&rev=464412
==============================================================================
--- 
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/readme.htm
 (added)
+++ 
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/readme.htm
 Mon Oct 16 01:10:01 2006
@@ -0,0 +1,183 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head>
+<!--  * 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.    
+  -->
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><meta 
http-equiv="Content-Style-Type" content="text/css"><title>Tuscany
+Hello World Web Service Sample</title><!-- LINK rel="stylesheet" 
href="ait.css" type="text/css" --><!-- maven -->
+<style type="text/css" media="all">
[EMAIL PROTECTED] url("../../../../css/maven-base.css");
[EMAIL PROTECTED] url("../../../../css/maven-theme.css");
[EMAIL PROTECTED] url("../../../../css/site.css");
+</style><link rel="stylesheet" href="./css/print.css" type="text/css" 
media="print"><!-- end maven --></head>
+<body>
+<H1>Tuscany HelloWorld - RMI Service &amp; RMI Reference Samples</H1>
+<H2>Overview</H2>
+<TABLE border="0">
+       <TBODY>
+               <TR>
+                       <TD width="100%" valign="top" align="left">This is a 
two part sample - RMI Service and RMI Reference. The RMI Service sample 
demonstrates how the Tuscany Runtime can be used to host service components as 
RMI Services. The RMI Reference sample demonstrates how the Tuscany Runtime 
provides RMI client bindings for service components that would like to refer 
RMI Servcies.</TD>
+               </TR>
+       </TBODY>
+</TABLE>
+<H2>Location</H2>
+<P>This sample is located &nbsp;in the samples\sca\helloworld.rmiSevice
+and samples\sca\helloworld.rmiSevice directories in the source
+distribution.</P>
+<P>In the binary distribution the samples are available as
+<I> sample-helloworld-rmiService-1.0-incubator-M2-SNAPSHOT.jar and
+sample-helloworld-rmiReference-1.0-incubator-M2-SNAPSHOT.jar</I>
+ 
+ . If you have downloaded the source and have built Tuscany Java SCA then 
these jars would be found in the
+<I>target</I>
+sub-directory of the
+<I>samples/sca/helloworld.rmiSevice</I>
+and
+<I>samples/sca/helloworld.rmiReference</I>
+project directories respectively and also in your Local Maven Repository under 
the path
+<I>org/apache/tuscany/samples/sca</I>/
+<I>/helloworld.rmiSevice</I>
+and
+<I>org/apache/tuscany/samples/sca</I>
+/
+<I>/helloworld.rmiReference </I>respectively.<BR></P>
+<H2>Setup<BR>
+</H2>
+<P>1) Download the Tuscany SCA Standalone Host distribution. The standalone 
distribution comes in two forms: -<BR>    
+   <I>   standalone-1.0-incubator-M2-SNAPSHOT-bin.zip </I> and 
<I>standalone-1.0-incubator-M2-SNAPSHOT-bin.tar.gz<BR> 
+</I>Choose the one that best suits your platform.<BR>
+<BR>2) Extract the contents of this archive file into a local directory say 
<I>&lt;tuscany
+samples&gt;</I>. This will create the following subdirectories with contents 
in each: -<BR>
+<I><BR>
+&lt;tuscany samples&gt;</I>/boot<I> <BR>&lt;tuscany samples&gt;</I>/bin<BR>
+<I>&lt;tuscany samples&gt;</I>/lib
+</P>
+<P>3) Create a sub-directory called 'extension' under <I>&lt;tuscany
+samples&gt;</I><BR>
+<BR>4) Copy the SCA RMI Extension jar into this sub-directory named 
'extension'. This jar can be found in the binary distribution as 
<I>rmi-1.0-incubator-M2-SNAPSHOT.jar</I>. Alternative if you have built the 
source yourself, then you may find this jar in your local Maven Repository, in 
the path 
<I>org/apache/tuscany/sca/services/bindings/rmi/1.0-incubator-M2-SNAPSHOT/rmi-1.0-incubator-M2-SNAPSHOT.jar</I>
 and also in the <I>target </I>directory of the project 
<I>sca/services/bindings/binding.rmi</I>.<BR>
+<BR>5) Create a sub-directory called 'rmiSample' under <I>&lt;tuscany
+samples&gt;</I>. <BR>
+<BR>6) Copy the 
<I>sample-helloworld-rmiService-1.0-incubator-M2-SNAPSHOT.jar</I> and 
<I>sample-helloworld-rmiReference-1.0-incubator-M2-SNAPSHOT.jar</I> into this 
sub-directory. Look at the section Location above, about locating these 
jars.<BR>
+<BR>
+7) &lt;Subject to change&gt; : Copy the cglib-nodep-2.1_3.jar file into the 
the <I>&lt;tuscany
+samples&gt;</I>/boot directory. This jar can be found in your Maven Local 
Repository under the path <I>cglib/cglib-nodep/2.1_3. </I></P>
+<P>In summary the following must be your directory structure after doing all 
of the above</P>
+<P><I>&lt;tuscany samples&gt;</I>/boot<I> <BR>
+&lt;tuscany samples&gt;</I>/bin<BR>
+<I>&lt;tuscany samples&gt;</I>/lib<BR>
+<I>&lt;tuscany samples&gt;</I>/extension<BR>
+<I>&lt;tuscany samples&gt;</I>/rmiSample
+</P>
+<P></P>
+<H2>Running</H2>
+<P></P>
+<P>1) Open up a commandline window and go to the 
+directory <I>&lt;tuscany samples&gt;</I>. First run the RMI Service Sample as 
follows : -<BR>
+<BR>
+<FONT color="purple"><I>&lt;tuscany samples&gt;</I></FONT><FONT 
color="navy">java -jar
+bin/launcher.jar
+rmiSample/sample-helloworld-rmiService-1.0-incubator-M2-SNAPSHOT.jar</FONT><BR>
+<BR>
+On running the RMI Service sample the console will display ....<BR>
+<BR>
+<FONT color="green"> </FONT><FONT color="green" face="Courier New">Service
+Started and Running...<BR>
+Hit ENTER to exit</FONT><BR>
+<BR>2) Open up another commandline window and go to the 
+directory <I>&lt;tuscany samples&gt;</I>. Here, run the RMI Reference sample 
as follows : -<BR>
+<FONT color="purple"><I>&lt;tuscany samples&gt;</I></FONT><FONT 
color="navy">java -jar
+bin/launcher.jar
+rmiSample/sample-helloworld-rmiReference-1.0-incubator-M2-SNAPSHOT.jar</FONT></P><P>On
+running the RMI Reference sample the console will display ....</P>
+<P><FONT color="green" face="Courier New">Hello SCA RMI Client - from the SCA 
RMI Service</FONT><BR>
+<BR>
+<BR>Thus   a component of the <I>HelloWorld RMI Reference</I> Sample 
Application running in one SCA Standalone Runtime was able to invoke a service 
component  <I> </I>hosted as an an RMI service by another  SCA Standalone 
Runtime that was running the   <I>HelloWorld
+RMI Service </I>sample application.<BR>
+<BR>Press 'Enter' key in the console running the RMI Service sample to shut 
down that server.</P>
+<H2>Code Overview</H2>
+The source files are physically organized as shown below:<br>
+<table style="text-align: left; width: 100%;" border="1" cellpadding="2" 
cellspacing="2"><tbody><tr><td>
+<pre>
+<B><U>RMI Service Sample</U></B>
++---main<br>    +---java<br>    |   +---helloworld
+                       HelloWorldService.java
+                       HelloWorldImpl.java
+                       HelloWorldRmiServer.java
+    +---resources
+        +----META-INF
+             +----sca
+                     default.scdl
+
+<U><B>RMI Reference Sample</B><B></B></U>
++---main<BR>    +---java<BR>    |   +---helloworld
+                       HelloWorldService.java
+                       HelloWorldImpl.java
+                       HelloWorldRmiClient.java
+    +---resources
+        +----META-INF
+             +----sca
+                     default.scdl</pre></td></tr></tbody></table>
+<B> <BR>RMI Service Sample</B>
+<TABLE border="1">
+       <TBODY>
+               <TR>
+                       <TD width="230" valign="top">default.scdl</TD>
+                       <TD width="396" valign="top">Defines the assembly of 
the Helloworld Server Application with the  HelloWorldImpl component defined to 
be hosted as an RMI Service under the covers of the SCA Runtime. You will never 
notice any APIs in java.rmi.*</TD>
+               </TR>
+               <TR>
+                       <TD width="230">HelloWorldService.java</TD>
+                       <TD width="396">Defines a HelloWorld service 
interface</TD>
+               </TR>
+               <TR>
+                       <TD width="230">HelloWorldImpl.java</TD>
+                       <TD width="396">Implements the HelloWorldService 
interface</TD>
+               </TR>
+               <TR>
+                       <TD width="230">HelloWorldRmiServer.java</TD>
+                       <TD width="396">Launches the Standalone Tuscany Runtime 
with the RMI Server SCA Application loaded and running</TD>
+               </TR>
+       </TBODY>
+</TABLE>
+
+<P><BR>
+<B>RMI Reference Sample</B>
+
+</P>
+
+<TABLE border="1">
+       <TBODY>
+               <TR>
+                       <TD width="230" valign="top">default.scdl</TD>
+                       <TD width="396" valign="top">Defines the assembly of 
the Helloworld
+                        Application with the HelloWorldImpl component 
referring the a HelloWorld RMI Service</TD>
+               </TR>
+               <TR>
+                       <TD width="230">HelloWorldService.java</TD>
+                       <TD width="396">Defines a HelloWorld service 
interface</TD>
+               </TR>
+               <TR>
+                       <TD width="230">HelloWorldImpl.java</TD>
+                       <TD width="396">Implements the HelloWorldService 
interface. This implementation inturn calls out to the RMI Service under the 
covers of the SCA Runtime - i.e. you will never notice any APIs in java.rmi.* 
used in this application</TD>
+               </TR>
+               <TR>
+                       <TD width="230">HelloWorldRmiClient.java</TD>
+                       <TD width="396">Launches the Standalone Tuscany Runtime 
with the RMI
+                       Client SCA Application loaded and run.</TD>
+               </TR>
+       </TBODY>
+</TABLE>
+</p></body></html>

Propchange: 
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/src/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Oct 16 01:10:01 2006
@@ -0,0 +1,14 @@
+target
+*.iws
+*.ipr
+*.iml
+.project
+.classpath
+maven.log
+velocity.log*
+junit*.properties
+surefire*.properties
+.settings
+.deployables
+.wtpmodules
+

Propchange: 
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/src/main/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Oct 16 01:10:01 2006
@@ -0,0 +1,14 @@
+target
+*.iws
+*.ipr
+*.iml
+.project
+.classpath
+maven.log
+velocity.log*
+junit*.properties
+surefire*.properties
+.settings
+.deployables
+.wtpmodules
+

Propchange: 
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/src/main/java/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Oct 16 01:10:01 2006
@@ -0,0 +1,14 @@
+target
+*.iws
+*.ipr
+*.iml
+.project
+.classpath
+maven.log
+velocity.log*
+junit*.properties
+surefire*.properties
+.settings
+.deployables
+.wtpmodules
+

Propchange: 
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/src/main/java/helloworld/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Oct 16 01:10:01 2006
@@ -0,0 +1,14 @@
+target
+*.iws
+*.ipr
+*.iml
+.project
+.classpath
+maven.log
+velocity.log*
+junit*.properties
+surefire*.properties
+.settings
+.deployables
+.wtpmodules
+

Added: 
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/src/main/java/helloworld/HelloWorldImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/src/main/java/helloworld/HelloWorldImpl.java?view=auto&rev=464412
==============================================================================
--- 
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/src/main/java/helloworld/HelloWorldImpl.java
 (added)
+++ 
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/src/main/java/helloworld/HelloWorldImpl.java
 Mon Oct 16 01:10:01 2006
@@ -0,0 +1,34 @@
+/*
+ * 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.    
+ */
+package helloworld;
+
+import org.osoa.sca.annotations.Service;
+
+/**
+ * This class implements the HelloWorld service.
+ */
[EMAIL PROTECTED](HelloWorldService.class)
+public class HelloWorldImpl implements HelloWorldService 
+{
+
+    public String sayHello(String name)  
+    {
+        return "Hello " + name + " - from the SCA RMI Service";
+    }
+}

Added: 
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/src/main/java/helloworld/HelloWorldRmiServer.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/src/main/java/helloworld/HelloWorldRmiServer.java?view=auto&rev=464412
==============================================================================
--- 
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/src/main/java/helloworld/HelloWorldRmiServer.java
 (added)
+++ 
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/src/main/java/helloworld/HelloWorldRmiServer.java
 Mon Oct 16 01:10:01 2006
@@ -0,0 +1,38 @@
+/*
+ * 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.     
+ */
+package helloworld;
+
+
+/**
+ * @author administrator
+ */
+public class HelloWorldRmiServer {
+    
+    public static void main(String[] args) {
+        try {
+            System.out.println("Service Started and Running...");
+            System.out.println("Hit ENTER to exit");
+            System.in.read();
+            System.out.println("Server Stopped!");
+            System.exit(0);
+        } catch ( Exception e ) {
+            e.printStackTrace();
+        }
+    }
+}

Added: 
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/src/main/java/helloworld/HelloWorldService.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/src/main/java/helloworld/HelloWorldService.java?view=auto&rev=464412
==============================================================================
--- 
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/src/main/java/helloworld/HelloWorldService.java
 (added)
+++ 
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/src/main/java/helloworld/HelloWorldService.java
 Mon Oct 16 01:10:01 2006
@@ -0,0 +1,30 @@
+/*
+ * 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.    
+ */
+package helloworld;
+
+
+
+/**
+ * This is the business interface of the HelloWorld greetings service.
+ */
+public interface HelloWorldService {
+
+    public String sayHello(String name);
+
+}

Propchange: 
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/src/main/resources/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Oct 16 01:10:01 2006
@@ -0,0 +1,14 @@
+target
+*.iws
+*.ipr
+*.iml
+.project
+.classpath
+maven.log
+velocity.log*
+junit*.properties
+surefire*.properties
+.settings
+.deployables
+.wtpmodules
+

Added: 
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/src/main/resources/HelloWorldImpl.componentType
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/src/main/resources/HelloWorldImpl.componentType?view=auto&rev=464412
==============================================================================
--- 
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/src/main/resources/HelloWorldImpl.componentType
 (added)
+++ 
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/src/main/resources/HelloWorldImpl.componentType
 Mon Oct 16 01:10:01 2006
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="ASCII"?>
+<!--
+ * 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.    
+-->
+
+<componentType xmlns="http://www.osoa.org/xmlns/sca/1.0"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
+
+    <service name="HelloWorldService">
+        <interface.java interface="helloworld.HelloWorldService"/>
+    </service>
+</componentType>

Propchange: 
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/src/main/resources/META-INF/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Oct 16 01:10:01 2006
@@ -0,0 +1,14 @@
+target
+*.iws
+*.ipr
+*.iml
+.project
+.classpath
+maven.log
+velocity.log*
+junit*.properties
+surefire*.properties
+.settings
+.deployables
+.wtpmodules
+



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to