geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vamsic...@apache.org
Subject svn commit: r559099 [5/7] - in /geronimo/sandbox/tuscany-integration: ./ geronimo-tuscany/ geronimo-tuscany/configs/ geronimo-tuscany/configs/src/main/resources/META-INF/ geronimo-tuscany/configs/src/plan/ geronimo-tuscany/modules/ geronimo-tuscany/mod...
Date Tue, 24 Jul 2007 16:49:09 GMT
Propchange: geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/LICENSE.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/LICENSE.txt
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/LICENSE.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/pom.xml?view=auto&rev=559099
==============================================================================
--- geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/pom.xml (added)
+++ geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/pom.xml Tue Jul 24 09:49:03
2007
@@ -0,0 +1,73 @@
+<project>
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>geronimo-plugins</groupId>
+		<artifactId>tuscany</artifactId>
+		<version>1.0</version>
+		<relativePath>../../geronimo-tuscany/pom.xml</relativePath>
+	</parent>
+
+	<groupId>org.apache.tuscany.sca</groupId>
+	<artifactId>geronimo-host-rmi</artifactId>
+	<version>1.0-incubating-SNAPSHOT</version>
+
+	<packaging>jar</packaging>
+	<name>Tuscany :: Modules</name>
+	<dependencies>
+		<dependency>
+			<groupId>org.apache.tuscany.sca</groupId>
+			<artifactId>tuscany-core-spi</artifactId>
+			<version>1.0-incubating-SNAPSHOT</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.tuscany.sca</groupId>
+			<artifactId>tuscany-core</artifactId>
+			<version>1.0-incubating-SNAPSHOT</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.geronimo.modules</groupId>
+			<artifactId>geronimo-kernel</artifactId>
+			<version>2.0-SNAPSHOT</version>
+		</dependency>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>4.2</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-logging</groupId>
+			<artifactId>commons-logging</artifactId>
+			<version>1.1</version>
+		</dependency>
+	</dependencies>
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<configuration>
+					<source>1.5</source>
+					<target>1.5</target>
+				</configuration>
+			</plugin>
+
+
+		</plugins>
+
+		<sourceDirectory>src/main/java</sourceDirectory>
+		<testSourceDirectory>src/test</testSourceDirectory>
+		<resources>
+			<resource>
+				<directory>src/main/resources</directory>
+				<filtering>true</filtering>
+			</resource>
+		</resources>
+		<testResources>
+			<testResource>
+				<directory>src/test/resources</directory>
+			</testResource>
+		</testResources>
+	</build>
+
+</project>
+

Propchange: geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/geronimo/tuscany/sca/rmi/GeronimoRMIHost.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/geronimo/tuscany/sca/rmi/GeronimoRMIHost.java?view=auto&rev=559099
==============================================================================
--- geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/geronimo/tuscany/sca/rmi/GeronimoRMIHost.java
(added)
+++ geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/geronimo/tuscany/sca/rmi/GeronimoRMIHost.java
Tue Jul 24 09:49:03 2007
@@ -0,0 +1,153 @@
+/*
+ * 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 org.apache.geronimo.tuscany.sca.rmi;
+
+import java.rmi.AlreadyBoundException;
+import java.rmi.NotBoundException;
+import java.rmi.RMISecurityManager;
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+import java.rmi.registry.LocateRegistry;
+import java.rmi.registry.Registry;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.kernel.KernelRegistry;
+import org.apache.geronimo.kernel.rmi.RMIRegistryService;
+import org.apache.tuscany.sca.rmi.RMIHost;
+import org.apache.tuscany.sca.rmi.RMIHostException;
+import org.apache.tuscany.sca.rmi.RMIHostRuntimeException;
+
+
+
+/**
+ * Implementation of a rmi host extension point for Geronimo.
+ * 
+ */
+public class GeronimoRMIHost implements RMIHost {
+
+    //map of RMI registries started and running
+	int geronimoRMIPort;
+    private Map<String, Registry> rmiRegistries;
+    private static final String RMIRegistryGBeanName = "RMIRegistry";
+    private static final Log log = LogFactory.getLog(GeronimoRMIHost.class);
+    private static RMIRegistryService service;
+    
+    public GeronimoRMIHost() {
+        rmiRegistries = new ConcurrentHashMap<String, Registry>();
+        Kernel kernel = KernelRegistry.getSingleKernel();
+                         
+    	try {			
+			service = (RMIRegistryService)kernel.getGBean(RMIRegistryGBeanName);			
+			geronimoRMIPort = service.getPort();
+		} catch (Exception e) {
+			log.fatal("Cannot find GBean named " + RMIRegistryGBeanName,e);
+			throw new IllegalArgumentException("Cannot find GBean named " + RMIRegistryGBeanName,e);
+		}
+		//if (System.getSecurityManager() == null) { System.setSecurityManager(new RMISecurityManager());
}
+    }
+
+    public void registerService(String serviceName, int port, Remote serviceObject) throws
RMIHostException,
+                                                                                        
  RMIHostRuntimeException {
+        Registry registry;
+        try {
+            registry = rmiRegistries.get(Integer.toString(port));
+            if (registry == null && port == geronimoRMIPort) {
+                registry = LocateRegistry.getRegistry(port);
+                rmiRegistries.put(Integer.toString(port),
+                    registry);
+            } else if (port != geronimoRMIPort){
+            	throw new IllegalArgumentException("RMIService will be available only on port
" + service.getPort() + " here");
+            }
+            registry.bind(serviceName,
+                serviceObject);
+        } catch (AlreadyBoundException e) {
+            throw new RMIHostException(e);
+        } catch (RemoteException e) {
+            RMIHostRuntimeException rmiExec = new RMIHostRuntimeException(e.getMessage());
+            rmiExec.setStackTrace(e.getStackTrace());
+            throw rmiExec;
+        }
+
+    }
+
+    public void registerService(String serviceName, Remote serviceObject) throws RMIHostException,
+                                                                                 RMIHostRuntimeException
{
+        registerService(serviceName, geronimoRMIPort, serviceObject);
+    }
+
+    public void unregisterService(String serviceName, int port) throws RMIHostException,
+                                                                       RMIHostRuntimeException
{
+        Registry registry;
+
+        try {
+            registry = rmiRegistries.get(Integer.toString(port));
+            if (registry == null && port == geronimoRMIPort) {
+                registry = LocateRegistry.getRegistry(port);
+                rmiRegistries.put(Integer.toString(port),
+                    registry);
+            } else if (port != geronimoRMIPort){
+            	throw new IllegalArgumentException("RMIService will be available only on port
" + service.getPort() + " here");
+            }
+            registry.unbind(serviceName);
+        } catch (RemoteException e) {
+            RMIHostRuntimeException rmiExec = new RMIHostRuntimeException(e.getMessage());
+            rmiExec.setStackTrace(e.getStackTrace());
+            throw rmiExec;
+        } catch (NotBoundException e) {
+            throw new RMIHostException(e.getMessage());
+        }
+    }
+
+    public void unregisterService(String serviceName) throws RMIHostException,
+                                                             RMIHostRuntimeException {
+        unregisterService(serviceName, geronimoRMIPort);
+
+    }
+
+    public Remote findService(String host, String port, String svcName) throws RMIHostException,
+                                                                               RMIHostRuntimeException
{
+        Registry registry;
+        Remote remoteService = null;
+        host = (host == null || host.length() <= 0) ? "localhost" : host;
+        int portNumber = (port == null || port.length() <= 0) ? geronimoRMIPort : Integer
+            .decode(port);
+
+        try {
+            registry = LocateRegistry.getRegistry(host,
+                portNumber);
+
+            if (registry != null) {
+                remoteService = registry.lookup(svcName);
+            }
+        } catch (RemoteException e) {
+            RMIHostRuntimeException rmiExec = new RMIHostRuntimeException(e.getMessage());
+            rmiExec.setStackTrace(e.getStackTrace());
+            throw rmiExec;
+        } catch (NotBoundException e) {
+            throw new RMIHostException(e.getMessage());
+        }
+        return remoteService;
+    }
+
+}

Propchange: geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/geronimo/tuscany/sca/rmi/GeronimoRMIHost.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/geronimo/tuscany/sca/rmi/GeronimoRMIHost.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/geronimo/tuscany/sca/rmi/GeronimoRMIHost.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/geronimo/tuscany/sca/rmi/module/RMIRuntimeModuleActivator.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/geronimo/tuscany/sca/rmi/module/RMIRuntimeModuleActivator.java?view=auto&rev=559099
==============================================================================
--- geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/geronimo/tuscany/sca/rmi/module/RMIRuntimeModuleActivator.java
(added)
+++ geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/geronimo/tuscany/sca/rmi/module/RMIRuntimeModuleActivator.java
Tue Jul 24 09:49:03 2007
@@ -0,0 +1,43 @@
+/*
+ * 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 org.apache.geronimo.tuscany.sca.rmi.module;
+
+import org.apache.geronimo.tuscany.sca.rmi.GeronimoRMIHost;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.ModuleActivator;
+import org.apache.tuscany.sca.rmi.RMIHost;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class RMIRuntimeModuleActivator implements ModuleActivator {
+
+    public Object[] getExtensionPoints() {
+        RMIHost host = new GeronimoRMIHost();
+        return new Object[]{ host };
+    }
+
+    public void start(ExtensionPointRegistry extensionPointRegistry) {
+    }
+
+    public void stop(ExtensionPointRegistry registry) {
+    }
+
+}

Propchange: geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/geronimo/tuscany/sca/rmi/module/RMIRuntimeModuleActivator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/geronimo/tuscany/sca/rmi/module/RMIRuntimeModuleActivator.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/geronimo/tuscany/sca/rmi/module/RMIRuntimeModuleActivator.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/tuscany/sca/rmi/DefaultRMIHost.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/tuscany/sca/rmi/DefaultRMIHost.java?view=auto&rev=559099
==============================================================================
--- geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/tuscany/sca/rmi/DefaultRMIHost.java
(added)
+++ geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/tuscany/sca/rmi/DefaultRMIHost.java
Tue Jul 24 09:49:03 2007
@@ -0,0 +1,129 @@
+/*
+ * 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 org.apache.tuscany.sca.rmi;
+
+import java.rmi.AlreadyBoundException;
+import java.rmi.NotBoundException;
+import java.rmi.Remote;
+import java.rmi.RemoteException;
+import java.rmi.registry.LocateRegistry;
+import java.rmi.registry.Registry;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+/**
+ * Default implementation of a rmi host extension point.
+ * 
+ */
+public class DefaultRMIHost implements RMIHost {
+
+    //map of RMI registries started and running
+    private Map<String, Registry> rmiRegistries;
+
+    public DefaultRMIHost() {
+        rmiRegistries = new ConcurrentHashMap<String, Registry>();
+        /*
+         * if (System.getSecurityManager() == null) { System.setSecurityManager(new RMISecurityManager());
}
+         */
+    }
+
+    public void registerService(String serviceName, int port, Remote serviceObject) throws
RMIHostException,
+                                                                                        
  RMIHostRuntimeException {
+        Registry registry;
+        try {
+            registry = rmiRegistries.get(Integer.toString(port));
+            if (registry == null) {
+                registry = LocateRegistry.createRegistry(port);
+                rmiRegistries.put(Integer.toString(port),
+                    registry);
+            }
+            registry.bind(serviceName,
+                serviceObject);
+        } catch (AlreadyBoundException e) {
+            throw new RMIHostException(e);
+        } catch (RemoteException e) {
+            RMIHostRuntimeException rmiExec = new RMIHostRuntimeException(e.getMessage());
+            rmiExec.setStackTrace(e.getStackTrace());
+            throw rmiExec;
+        }
+
+    }
+
+    public void registerService(String serviceName, Remote serviceObject) throws RMIHostException,
+                                                                                 RMIHostRuntimeException
{
+        registerService(serviceName,
+            RMI_DEFAULT_PORT,
+            serviceObject);
+    }
+
+    public void unregisterService(String serviceName, int port) throws RMIHostException,
+                                                                       RMIHostRuntimeException
{
+        Registry registry;
+
+        try {
+            registry = rmiRegistries.get(Integer.toString(port));
+            if (registry == null) {
+                registry = LocateRegistry.createRegistry(port);
+                rmiRegistries.put(Integer.toString(port),
+                    registry);
+            }
+            registry.unbind(serviceName);
+        } catch (RemoteException e) {
+            RMIHostRuntimeException rmiExec = new RMIHostRuntimeException(e.getMessage());
+            rmiExec.setStackTrace(e.getStackTrace());
+            throw rmiExec;
+        } catch (NotBoundException e) {
+            throw new RMIHostException(e.getMessage());
+        }
+    }
+
+    public void unregisterService(String serviceName) throws RMIHostException,
+                                                             RMIHostRuntimeException {
+        unregisterService(serviceName,
+            RMI_DEFAULT_PORT);
+
+    }
+
+    public Remote findService(String host, String port, String svcName) throws RMIHostException,
+                                                                               RMIHostRuntimeException
{
+        Registry registry;
+        Remote remoteService = null;
+        host = (host == null || host.length() <= 0) ? "localhost" : host;
+        int portNumber = (port == null || port.length() <= 0) ? RMI_DEFAULT_PORT : Integer
+            .decode(port);
+
+        try {
+            registry = LocateRegistry.getRegistry(host,
+                portNumber);
+
+            if (registry != null) {
+                remoteService = registry.lookup(svcName);
+            }
+        } catch (RemoteException e) {
+            RMIHostRuntimeException rmiExec = new RMIHostRuntimeException(e.getMessage());
+            rmiExec.setStackTrace(e.getStackTrace());
+            throw rmiExec;
+        } catch (NotBoundException e) {
+            throw new RMIHostException(e.getMessage());
+        }
+        return remoteService;
+    }
+
+}

Propchange: geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/tuscany/sca/rmi/DefaultRMIHost.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/tuscany/sca/rmi/DefaultRMIHost.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/tuscany/sca/rmi/DefaultRMIHost.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/tuscany/sca/rmi/RMIHost.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/tuscany/sca/rmi/RMIHost.java?view=auto&rev=559099
==============================================================================
--- geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/tuscany/sca/rmi/RMIHost.java
(added)
+++ geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/tuscany/sca/rmi/RMIHost.java
Tue Jul 24 09:49:03 2007
@@ -0,0 +1,88 @@
+/*
+ * 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 org.apache.tuscany.sca.rmi;
+
+import java.rmi.Remote;
+
+/**
+ * RMI Service hosting interface to be implemented by host environments that allows SCA Components
+ * to register RMI Services to handle inbound service requests over RMI to SCA Components
+ */
+public interface RMIHost {
+    int RMI_DEFAULT_PORT = 1099;
+
+    /**
+     * Register an RMI service with the given name and port
+     * 
+     * @param serviceName against which the server is to be registered
+     * @param port the port against which the server is to be registered
+     * @param serviceObject the server object to be registered
+     * @throws RMIHostException
+     * @throws RMIHostRuntimeException
+     */ 
+    void registerService(String serviceName, int port, Remote serviceObject) throws RMIHostException,
+                                                                                    RMIHostRuntimeException;
+
+    /**
+     * Register an RMI service with the given name and default port (1099)
+     * 
+     * @param serviceName serviceName against which the server is to be registered
+     * @param serviceObject the server object to be registered
+     * @throws RMIHostException
+     * @throws RMIHostRuntimeException
+     */
+    void registerService(String serviceName, Remote serviceObject) throws RMIHostException,
+                                                                          RMIHostRuntimeException;
+
+    /**
+     * Unregister a service registered under the given service name and port number
+     * 
+     * @param serviceName serviceName against which the server is to be registered
+     * @param port the port against which the server is to be registered
+     * @throws RMIHostException
+     * @throws RMIHostRuntimeException
+     */
+    void unregisterService(String serviceName, int port) throws RMIHostException,
+                                                                RMIHostRuntimeException;
+
+    /**
+     * Unregister a service registered under the given service name and defalut port number
(1099)
+     * 
+     * @param serviceName the name of the service that has to be unregistered
+     * @throws RMIHostException
+     * @throws RMIHostRuntimeException
+     */
+    void unregisterService(String serviceName) throws RMIHostException,
+                                                      RMIHostRuntimeException;
+
+
+    /**
+     * find a remote service hosted on the given host, port and service name
+     * 
+     * @param host the name of the host on which the rmi service to be unregistered is running
+     * @param port the port against which the server is to be unregistered is running
+     * @param svcName serviceName against which the server is to be unregistered is running
+     * @return the RMI server object 
+     * @throws RMIHostException
+     * @throws RMIHostRuntimeException
+     */
+    Remote findService(String host, String port, String svcName) throws RMIHostException,
+                                                                        RMIHostRuntimeException;
+
+}

Propchange: geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/tuscany/sca/rmi/RMIHost.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/tuscany/sca/rmi/RMIHost.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/tuscany/sca/rmi/RMIHost.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/tuscany/sca/rmi/RMIHostException.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/tuscany/sca/rmi/RMIHostException.java?view=auto&rev=559099
==============================================================================
--- geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/tuscany/sca/rmi/RMIHostException.java
(added)
+++ geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/tuscany/sca/rmi/RMIHostException.java
Tue Jul 24 09:49:03 2007
@@ -0,0 +1,45 @@
+/*
+ * 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 org.apache.tuscany.sca.rmi;
+
+
+/**
+ * This exception will relate to situations where the end applicaition's input is the cause
of the exception
+ *
+ * @version $Rev$ $Date$
+ */
+public class RMIHostException extends RuntimeException {
+ 
+    private static final long serialVersionUID = 3378300080918544410L;
+
+    public RMIHostException() {
+    }
+
+    public RMIHostException(String message) {
+        super(message);
+    }
+
+    public RMIHostException(Throwable e) {
+        super(e);
+    }
+
+    public RMIHostException(String message, Throwable cause) {
+        super(message, cause);
+    }
+}

Propchange: geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/tuscany/sca/rmi/RMIHostException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/tuscany/sca/rmi/RMIHostException.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/tuscany/sca/rmi/RMIHostException.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/tuscany/sca/rmi/RMIHostRuntimeException.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/tuscany/sca/rmi/RMIHostRuntimeException.java?view=auto&rev=559099
==============================================================================
--- geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/tuscany/sca/rmi/RMIHostRuntimeException.java
(added)
+++ geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/tuscany/sca/rmi/RMIHostRuntimeException.java
Tue Jul 24 09:49:03 2007
@@ -0,0 +1,45 @@
+/*
+ * 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 org.apache.tuscany.sca.rmi;
+
+
+/**
+ * This exception relates to cases where there is a problem with the
+ * Host runtime
+ *
+ */
+public class RMIHostRuntimeException extends RuntimeException {
+   
+    private static final long serialVersionUID = -2639598547028423686L;
+
+    public RMIHostRuntimeException() {
+    }
+
+    public RMIHostRuntimeException(String message) {
+        super(message);
+    }
+    
+    public RMIHostRuntimeException(Throwable e) {
+        super(e);
+    }
+
+    public RMIHostRuntimeException(String message, Throwable cause) {
+        super(message, cause);
+    }
+}

Propchange: geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/tuscany/sca/rmi/RMIHostRuntimeException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/tuscany/sca/rmi/RMIHostRuntimeException.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/java/org/apache/tuscany/sca/rmi/RMIHostRuntimeException.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/resources/META-INF/services/org.apache.tuscany.sca.core.ModuleActivator
URL: http://svn.apache.org/viewvc/geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/resources/META-INF/services/org.apache.tuscany.sca.core.ModuleActivator?view=auto&rev=559099
==============================================================================
--- geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/resources/META-INF/services/org.apache.tuscany.sca.core.ModuleActivator
(added)
+++ geronimo/sandbox/tuscany-integration/modules/geronimo-host-rmi/src/main/resources/META-INF/services/org.apache.tuscany.sca.core.ModuleActivator
Tue Jul 24 09:49:03 2007
@@ -0,0 +1,18 @@
+# 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.
+# Implementation class for the ModuleActivator
+org.apache.geronimo.tuscany.sca.rmi.module.RMIRuntimeModuleActivator



Mime
View raw message