Author: antelder
Date: Mon Oct 16 01:10:01 2006
New Revision: 464412
URL: http://svn.apache.org/viewvc?view=rev&rev=464412
Log:
Add the RMI samples to M2 branch
Added:
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/
(with props)
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/pom.xml
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/readme.htm
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/src/
(with props)
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/src/main/
(with props)
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/src/main/java/
(with props)
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/src/main/java/helloworld/
(with props)
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/src/main/java/helloworld/HelloWorldImpl.java
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/src/main/java/helloworld/HelloWorldRmiClient.java
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/src/main/java/helloworld/HelloWorldService.java
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/src/main/resources/
(with props)
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/src/main/resources/HelloWorldImpl.componentType
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/src/main/resources/META-INF/
(with props)
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/src/main/resources/META-INF/LICENSE.txt
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/src/main/resources/META-INF/NOTICE
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/src/main/resources/META-INF/sca/
(with props)
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/src/main/resources/META-INF/sca/default.scdl
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/src/test/
(with props)
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/src/test/java/
(with props)
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/src/test/java/helloworld/
(with props)
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/
(with props)
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/META-INF/
(with props)
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/pom.xml
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/readme.htm
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/src/
(with props)
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/src/main/
(with props)
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/src/main/java/
(with props)
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/src/main/java/helloworld/
(with props)
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/src/main/java/helloworld/HelloWorldImpl.java
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/src/main/java/helloworld/HelloWorldRmiServer.java
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/src/main/java/helloworld/HelloWorldService.java
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/src/main/resources/
(with props)
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/src/main/resources/HelloWorldImpl.componentType
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/src/main/resources/META-INF/
(with props)
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/src/main/resources/META-INF/LICENSE.txt
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/src/main/resources/META-INF/NOTICE
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/src/main/resources/META-INF/sca/
(with props)
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIService/src/main/resources/META-INF/sca/default.scdl
Propchange:
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/
------------------------------------------------------------------------------
--- 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/helloworldRMIReference/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/pom.xml?view=auto&rev=464412
==============================================================================
---
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/pom.xml
(added)
+++
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/pom.xml
Mon Oct 16 01:10:01 2006
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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.
+-->
+<project>
+ <parent>
+ <groupId>org.apache.tuscany.sca.samples</groupId>
+ <artifactId>parent</artifactId>
+ <version>1.0-incubator-M2-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>sample-helloworld-rmiReference</artifactId>
+ <packaging>jar</packaging>
+ <name>Tuscany RMI Reference Helloworld Sample</name>
+ <description>A helloworld sample using a RMI Reference</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.osoa</groupId>
+ <artifactId>sca-api-r0.95</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>test</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca.services.bindings</groupId>
+ <artifactId>rmi</artifactId>
+ <version>${scaVersion}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <defaultGoal>install</defaultGoal>
+ <finalName>${artifactId}</finalName>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+
<mainClass>helloworld.HelloWorldRmiClient</mainClass>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added:
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/readme.htm
URL:
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/readme.htm?view=auto&rev=464412
==============================================================================
---
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/readme.htm
(added)
+++
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/readme.htm
Mon Oct 16 01:10:01 2006
@@ -0,0 +1,182 @@
+<!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 & 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 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><tuscany
+samples></I>. This will create the following subdirectories with contents
in each: -<BR>
+<I><BR>
+<tuscany samples></I>/boot<I> <BR><tuscany samples></I>/bin<BR>
+<I><tuscany samples></I>/lib
+</P>
+<P>3) Create a sub-directory called 'extension' under <I><tuscany
+samples></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><tuscany
+samples></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) <Subject to change> : Copy the cglib-nodep-2.1_3.jar file into the
the <I><tuscany
+samples></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><tuscany samples></I>/boot<I> <BR>
+<tuscany samples></I>/bin<BR>
+<I><tuscany samples></I>/lib<BR>
+<I><tuscany samples></I>/extension<BR>
+<I><tuscany samples></I>/rmiSample
+</P>
+<P></P>
+<H2>Running</H2>
+<P></P>
+<P>1) Open up a commandline window and go to the
+directory <I><tuscany samples></I>. First run the RMI Service Sample as
follows : -<BR>
+<BR>
+<FONT color="purple"><I><tuscany samples></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><tuscany samples></I>. Here, run the RMI Reference sample
as follows : -<BR>
+<FONT color="purple"><I><tuscany samples></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/helloworldRMIReference/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/helloworldRMIReference/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/helloworldRMIReference/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/helloworldRMIReference/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/helloworldRMIReference/src/main/java/helloworld/HelloWorldImpl.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/src/main/java/helloworld/HelloWorldImpl.java?view=auto&rev=464412
==============================================================================
---
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/src/main/java/helloworld/HelloWorldImpl.java
(added)
+++
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/src/main/java/helloworld/HelloWorldImpl.java
Mon Oct 16 01:10:01 2006
@@ -0,0 +1,47 @@
+/*
+ * 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.Reference;
+import org.osoa.sca.annotations.Service;
+
+/**
+ * This class implements the HelloWorld service.
+ */
[EMAIL PROTECTED](HelloWorldService.class)
+public class HelloWorldImpl implements HelloWorldService
+{
+ @Reference
+ private HelloWorldService extService = null;
+
+ public HelloWorldService getExtService() {
+ return extService;
+ }
+
+ @Reference
+ public void setExtService(HelloWorldService extService) {
+ this.extService = extService;
+ }
+
+ public String sayHello(String name)
+ {
+ return extService.sayHello(name);
+ }
+
+}
Added:
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/src/main/java/helloworld/HelloWorldRmiClient.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/src/main/java/helloworld/HelloWorldRmiClient.java?view=auto&rev=464412
==============================================================================
---
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/src/main/java/helloworld/HelloWorldRmiClient.java
(added)
+++
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/src/main/java/helloworld/HelloWorldRmiClient.java
Mon Oct 16 01:10:01 2006
@@ -0,0 +1,46 @@
+/*
+ * 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.CompositeContext;
+import org.osoa.sca.CurrentCompositeContext;
+
+/**
+ * @author administrator
+ *
+ */
+public class HelloWorldRmiClient {
+
+ /**
+ * @param args
+ */
+ public static void main(String[] args) {
+ try {
+ HelloWorldRmiClient rmiClient = new HelloWorldRmiClient();
+
+ CompositeContext context = CurrentCompositeContext.getContext();
+ HelloWorldService helloWorldService =
context.locateService(HelloWorldService.class, "HelloWorldServiceComponent");
+ System.out.println(helloWorldService.sayHello("SCA RMI Client"));
+ } catch ( Exception e ) {
+ e.printStackTrace();
+ }
+
+ }
+
+}
Added:
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/src/main/java/helloworld/HelloWorldService.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/src/main/java/helloworld/HelloWorldService.java?view=auto&rev=464412
==============================================================================
---
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/src/main/java/helloworld/HelloWorldService.java
(added)
+++
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/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/helloworldRMIReference/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/helloworldRMIReference/src/main/resources/HelloWorldImpl.componentType
URL:
http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/src/main/resources/HelloWorldImpl.componentType?view=auto&rev=464412
==============================================================================
---
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/src/main/resources/HelloWorldImpl.componentType
(added)
+++
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/src/main/resources/HelloWorldImpl.componentType
Mon Oct 16 01:10:01 2006
@@ -0,0 +1,29 @@
+<?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>
+ <reference name="extService">
+ <interface.java interface="helloworld.HelloWorldService"/>
+ </reference>
+</componentType>
Propchange:
incubator/tuscany/branches/sca-java-M2/samples/standalone/helloworldRMIReference/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]