You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yoko-commits@incubator.apache.org by ri...@apache.org on 2006/06/27 10:42:38 UTC

svn commit: r417411 [1/2] - in /incubator/yoko/trunk/core/src: main/java/org/apache/yoko/orb/OB/ main/java/org/apache/yoko/orb/OCI/ main/java/org/apache/yoko/orb/OCI/IIOP/ main/java/org/apache/yoko/orb/PortableInterceptor/ test/java/org/apache/yoko/ te...

Author: rickmcguire
Date: Tue Jun 27 03:42:37 2006
New Revision: 417411

URL: http://svn.apache.org/viewvc?rev=417411&view=rev
Log:
YOKO-73 Add IIOP plugin support to allow Geronimo to configure SSL transports.



Added:
    incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/ConnectionHelper.java   (with props)
    incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/DefaultConnectionHelper.java   (with props)
    incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/PortableInterceptor/ServerRequestInfoExt.java   (with props)
    incubator/yoko/trunk/core/src/test/java/org/apache/yoko/IIOPPluginTest.java   (with props)
    incubator/yoko/trunk/core/src/test/java/test/iiopplugin/
    incubator/yoko/trunk/core/src/test/java/test/iiopplugin/Client.java   (with props)
    incubator/yoko/trunk/core/src/test/java/test/iiopplugin/ClientPlugin.java   (with props)
    incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTest.java   (with props)
    incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTestHelper.java   (with props)
    incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTestHolder.java   (with props)
    incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTestOperations.java   (with props)
    incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTest_impl.java   (with props)
    incubator/yoko/trunk/core/src/test/java/test/iiopplugin/Server.java   (with props)
    incubator/yoko/trunk/core/src/test/java/test/iiopplugin/ServerPlugin.java   (with props)
    incubator/yoko/trunk/core/src/test/java/test/iiopplugin/ServiceContextInterceptor.java   (with props)
    incubator/yoko/trunk/core/src/test/java/test/iiopplugin/Test.idl
    incubator/yoko/trunk/core/src/test/java/test/iiopplugin/Test.java   (with props)
    incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestHelper.java   (with props)
    incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestHolder.java   (with props)
    incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestORBInitializer.java   (with props)
    incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestOperations.java   (with props)
    incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestPOA.java   (with props)
    incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestPOATie.java   (with props)
    incubator/yoko/trunk/core/src/test/java/test/iiopplugin/Test_impl.java   (with props)
    incubator/yoko/trunk/core/src/test/java/test/iiopplugin/_TestStub.java   (with props)
    incubator/yoko/trunk/core/src/test/java/test/iiopplugin/build.xml   (with props)
    incubator/yoko/trunk/core/src/test/java/test/iiopplugin/runtest
Modified:
    incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OB/PIManager.java
    incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OB/PIUpcall.java
    incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/AccFactory_impl.java
    incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/Acceptor_impl.java
    incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/ConFactoryInfo_impl.java
    incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/ConFactory_impl.java
    incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/Connector_impl.java
    incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/Plugin_impl.java
    incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/TransportInfo_impl.java
    incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/iiop.java
    incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/PortableInterceptor/ServerRequestInfo_impl.java
    incubator/yoko/trunk/core/src/test/java/org/apache/yoko/processmanager/JavaProcess.java
    incubator/yoko/trunk/core/src/test/java/test/runtests

Modified: incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OB/PIManager.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OB/PIManager.java?rev=417411&r1=417410&r2=417411&view=diff
==============================================================================
--- incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OB/PIManager.java (original)
+++ incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OB/PIManager.java Tue Jun 27 03:42:37 2006
@@ -360,11 +360,11 @@
             byte[] adapterId,
             byte[] objectId,
             org.omg.PortableInterceptor.ObjectReferenceTemplate adapterTemplate,
-            java.util.Vector in, java.util.Vector out) throws LocationForward {
+            java.util.Vector in, java.util.Vector out, org.apache.yoko.orb.OCI.TransportInfo transportInfo) throws LocationForward {
         Assert._OB_assert(current_ != null);
         return new org.apache.yoko.orb.PortableInterceptor.ServerRequestInfo_impl(
                 orb_, nextID(), op, responseExpected, policies, adapterId,
-                objectId, adapterTemplate, in, out, orbInstance_, current_);
+                objectId, adapterTemplate, in, out, orbInstance_, current_, transportInfo);
     }
 
     //

Modified: incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OB/PIUpcall.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OB/PIUpcall.java?rev=417411&r1=417410&r2=417411&view=diff
==============================================================================
--- incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OB/PIUpcall.java (original)
+++ incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OB/PIUpcall.java Tue Jun 27 03:42:37 2006
@@ -67,7 +67,7 @@
         //
         requestInfo_ = piManager_.serverCreateRequestInfo(op_,
                 upcallReturn_ != null, policies, adapterId, objectId,
-                adapterTemplate, requestSCL, replySCL_);
+                adapterTemplate, requestSCL, replySCL_, transportInfo_);
 
         //
         // Call the receive_request_service_contexts interception

Modified: incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/AccFactory_impl.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/AccFactory_impl.java?rev=417411&r1=417410&r2=417411&view=diff
==============================================================================
--- incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/AccFactory_impl.java (original)
+++ incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/AccFactory_impl.java Tue Jun 27 03:42:37 2006
@@ -20,6 +20,8 @@
     //
     private AccFactoryInfo_impl info_;
 
+    private ConnectionHelper connectionHelper_;   // client connection helper
+
     private ListenerMap listenMap_;
 
     // ------------------------------------------------------------------
@@ -139,10 +141,10 @@
 
         if (bind == null)
             return new Acceptor_impl(hosts, multiProfile, port, backlog,
-                    keepAlive, listenMap_);
+                    keepAlive, connectionHelper_, listenMap_);
         else
             return new Acceptor_impl(bind, hosts, multiProfile, port, backlog,
-                    keepAlive, listenMap_);
+                    keepAlive, connectionHelper_, listenMap_);
     }
 
     public void change_key(org.omg.IOP.IORHolder ior, byte[] key) {
@@ -213,8 +215,9 @@
     // Application programs must not use these functions directly
     // ------------------------------------------------------------------
 
-    public AccFactory_impl(ListenerMap lm) {
+    public AccFactory_impl(ListenerMap lm, ConnectionHelper helper) {
         info_ = new AccFactoryInfo_impl();
         listenMap_ = lm;
+        connectionHelper_ = helper;
     }
 }

Modified: incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/Acceptor_impl.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/Acceptor_impl.java?rev=417411&r1=417410&r2=417411&view=diff
==============================================================================
--- incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/Acceptor_impl.java (original)
+++ incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/Acceptor_impl.java Tue Jun 27 03:42:37 2006
@@ -34,6 +34,8 @@
 
     private ListenerMap listenMap_;
 
+    private ConnectionHelper connectionHelper_;    // plugin for managing connection config/creation
+
     // ------------------------------------------------------------------
     // Standard IDL to Java Mapping
     // ------------------------------------------------------------------
@@ -165,7 +167,7 @@
         //
         java.net.Socket socket = null;
         try {
-            socket = new java.net.Socket(localAddress_, port_);
+            socket = connectionHelper_.createSelfConnection(localAddress_, port_);
         } catch (java.net.ConnectException ex) {
             throw new org.omg.CORBA.TRANSIENT(
                     org.apache.yoko.orb.OB.MinorCodes
@@ -383,12 +385,13 @@
     // ------------------------------------------------------------------
 
     public Acceptor_impl(String[] hosts, boolean multiProfile, int port,
-            int backlog, boolean keepAlive, ListenerMap lm) {
+            int backlog, boolean keepAlive, ConnectionHelper helper, ListenerMap lm) {
         // System.out.println("Acceptor_impl");
 
         hosts_ = hosts;
         multiProfile_ = multiProfile;
         keepAlive_ = keepAlive;
+        connectionHelper_ = helper;
         info_ = new AcceptorInfo_impl(this);
         listenMap_ = lm;
 
@@ -415,7 +418,7 @@
         // Create socket and bind to all network interfaces
         //
         try {
-            socket_ = new java.net.ServerSocket(port, backlog);
+            socket_ = connectionHelper_.createServerSocket(port, backlog);
 
             //
             // Read back the port. This is needed if the port was selected by
@@ -448,11 +451,12 @@
     }
 
     public Acceptor_impl(String address, String[] hosts, boolean multiProfile,
-            int port, int backlog, boolean keepAlive, ListenerMap lm) {
+            int port, int backlog, boolean keepAlive, ConnectionHelper helper, ListenerMap lm) {
         // System.out.println("Acceptor_impl");
         hosts_ = hosts;
         multiProfile_ = multiProfile;
         keepAlive_ = keepAlive;
+        connectionHelper_ = helper;
         info_ = new AcceptorInfo_impl(this);
         listenMap_ = lm;
 
@@ -477,7 +481,7 @@
         // Create socket and bind to requested network interface
         //
         try {
-            socket_ = new java.net.ServerSocket(port, backlog, localAddress_);
+            socket_ = connectionHelper_.createServerSocket(port, backlog, localAddress_);
 
             //
             // Read back the port. This is needed if the port was selected by

Modified: incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/ConFactoryInfo_impl.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/ConFactoryInfo_impl.java?rev=417411&r1=417410&r2=417411&view=diff
==============================================================================
--- incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/ConFactoryInfo_impl.java (original)
+++ incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/ConFactoryInfo_impl.java Tue Jun 27 03:42:37 2006
@@ -21,6 +21,8 @@
     //
     private java.util.Vector connectCBVec_ = new java.util.Vector();
 
+    private ConnectionHelper connectionHelper_;   // the helper for managing socket connections.
+
     // ------------------------------------------------------------------
     // Standard IDL to Java Mapping
     // ------------------------------------------------------------------

Modified: incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/ConFactory_impl.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/ConFactory_impl.java?rev=417411&r1=417410&r2=417411&view=diff
==============================================================================
--- incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/ConFactory_impl.java (original)
+++ incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/ConFactory_impl.java Tue Jun 27 03:42:37 2006
@@ -21,6 +21,8 @@
 
     private ListenerMap listenMap_;
 
+    private ConnectionHelper connectionHelper_;  // plugin for making ssl transport decisions.
+
     // ------------------------------------------------------------------
     // Standard IDL to Java Mapping
     // ------------------------------------------------------------------
@@ -129,8 +131,8 @@
                     port = (int) body.port;
                 org.apache.yoko.orb.OCI.ConnectCB[] cbs = info_
                         ._OB_getConnectCBSeq();
-                seq.addElement(new Connector_impl(body.host, port, keepAlive_,
-                        cbs, listenMap_));
+                seq.addElement(new Connector_impl(ior, policies, body.host, port, keepAlive_,
+                        cbs, listenMap_, connectionHelper_));
 
                 //
                 // If this is a 1.1 profile, check for
@@ -171,8 +173,8 @@
                             //
                             org.apache.yoko.orb.OCI.ConnectCB[] ccbs = info_
                                     ._OB_getConnectCBSeq();
-                            seq.addElement(new Connector_impl(host, cport,
-                                    keepAlive_, ccbs, listenMap_));
+                            seq.addElement(new Connector_impl(ior, policies, host, cport,
+                                    keepAlive_, ccbs, listenMap_, connectionHelper_));
                         }
                 }
             }
@@ -201,11 +203,12 @@
     // Application programs must not use these functions directly
     // ------------------------------------------------------------------
 
-    public ConFactory_impl(boolean keepAlive, ListenerMap lm) {
+    public ConFactory_impl(boolean keepAlive, ListenerMap lm, ConnectionHelper helper) {
         // System.out.println("ConFactory");
         keepAlive_ = keepAlive;
         info_ = new ConFactoryInfo_impl();
         listenMap_ = lm;
+        connectionHelper_ = helper;
     }
 
     public void finalize() throws Throwable {

Added: incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/ConnectionHelper.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/ConnectionHelper.java?rev=417411&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/ConnectionHelper.java (added)
+++ incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/ConnectionHelper.java Tue Jun 27 03:42:37 2006
@@ -0,0 +1,59 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed 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.
+ */
+
+
+/**
+ * @version $Rev$ $Date$
+ */
+
+package org.apache.yoko.orb.OCI.IIOP;
+
+import java.io.IOException;
+import java.net.ConnectException;
+import java.net.InetAddress;
+import java.net.Socket;
+import java.net.ServerSocket;
+
+import org.omg.CORBA.Policy;
+import org.omg.IOP.IOR;
+
+//
+// IDL:orb.yoko.apache.org/OCI/IIOP/AcceptorInfo:1.0
+//
+/**
+ *
+ * Information on an IIOP OCI Acceptor object.
+ *
+ * @see Acceptor
+ * @see AcceptorInfo
+ *
+ **/
+
+public interface ConnectionHelper
+{
+    public void init(String parms);
+
+    public Socket createSocket(IOR ior, Policy[] policies, InetAddress address, int port) throws IOException, ConnectException;
+
+    public Socket createSelfConnection(InetAddress address, int port) throws IOException, ConnectException;
+
+    public ServerSocket createServerSocket(int port, int backlog)  throws IOException, ConnectException;
+
+    public ServerSocket createServerSocket(int port, int backlog, InetAddress address) throws IOException, ConnectException;
+
+}
+

Propchange: incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/ConnectionHelper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/ConnectionHelper.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/ConnectionHelper.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/Connector_impl.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/Connector_impl.java?rev=417411&r1=417410&r2=417411&view=diff
==============================================================================
--- incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/Connector_impl.java (original)
+++ incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/Connector_impl.java Tue Jun 27 03:42:37 2006
@@ -11,10 +11,17 @@
 
 package org.apache.yoko.orb.OCI.IIOP;
 
+import org.omg.IOP.IOR;
+import org.omg.CORBA.Policy;
 import org.apache.yoko.orb.OCI.IIOP.PLUGIN_ID;
 
 final class Connector_impl extends org.omg.CORBA.LocalObject implements
         org.apache.yoko.orb.OCI.Connector {
+
+    private IOR ior_;    // the target IOR we're connecting with
+
+    private Policy[] policies_;    // the policies used for the connection.
+
     // Some data member must not be private because the info object
     // must be able to access them
     public String host_; // The host
@@ -29,6 +36,8 @@
 
     private ListenerMap listenMap_;
 
+    private ConnectionHelper connectionHelper_;
+
     // ------------------------------------------------------------------
     // Private and protected functions
     // ------------------------------------------------------------------
@@ -85,7 +94,7 @@
         // Create socket and connect
         //
         try {
-            socket_ = new java.net.Socket(address, port_);
+            socket_ = connectionHelper_.createSocket(ior_, policies_, address, port_);
         } catch (java.net.ConnectException ex) {
             throw new org.omg.CORBA.TRANSIENT(
                     org.apache.yoko.orb.OB.MinorCodes
@@ -175,7 +184,7 @@
 
         public void run() {
             try {
-                so_ = new java.net.Socket(address_, port_);
+                so_ = connectionHelper_.createSocket(ior_, policies_, address_, port_);
             } catch (java.io.IOException ex) {
                 ex_ = ex;
             }
@@ -397,14 +406,17 @@
     // Application programs must not use these functions directly
     // ------------------------------------------------------------------
 
-    public Connector_impl(String host, int port, boolean keepAlive,
-            org.apache.yoko.orb.OCI.ConnectCB[] cb, ListenerMap lm) {
+    public Connector_impl(org.omg.IOP.IOR ior, org.omg.CORBA.Policy[] policies, String host, int port, boolean keepAlive,
+            org.apache.yoko.orb.OCI.ConnectCB[] cb, ListenerMap lm, ConnectionHelper helper) {
         // System.out.println("Connector_impl");
+        ior_ = ior;
+        policies_ = policies;
         host_ = host;
         port_ = port;
         keepAlive_ = keepAlive;
         info_ = new ConnectorInfo_impl(this, cb);
         listenMap_ = lm;
+        connectionHelper_ = helper;
     }
 
     public void finalize() throws Throwable {

Added: incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/DefaultConnectionHelper.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/DefaultConnectionHelper.java?rev=417411&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/DefaultConnectionHelper.java (added)
+++ incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/DefaultConnectionHelper.java Tue Jun 27 03:42:37 2006
@@ -0,0 +1,56 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed 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.
+ */
+
+
+/**
+ * @version $Rev$ $Date$
+ */
+
+package org.apache.yoko.orb.OCI.IIOP;
+
+import java.io.IOException;
+import java.net.ConnectException;
+import java.net.InetAddress;
+import java.net.Socket;
+import java.net.ServerSocket;
+
+import org.omg.CORBA.Policy;
+import org.omg.IOP.IOR;
+
+
+public class DefaultConnectionHelper implements ConnectionHelper {
+    public void init(String parms) {
+        // no initializer parameters required by this version.
+    }
+
+    public Socket createSocket(IOR ior, Policy[] policies, InetAddress address, int port) throws IOException, ConnectException {
+        return new Socket(address, port);
+    }
+
+    public Socket createSelfConnection(InetAddress address, int port) throws IOException, ConnectException {
+        return new Socket(address, port);
+    }
+
+    public ServerSocket createServerSocket(int port, int backlog)  throws IOException, ConnectException {
+        return new ServerSocket(port, backlog);
+    }
+
+    public ServerSocket createServerSocket(int port, int backlog, InetAddress address) throws IOException, ConnectException {
+        return new ServerSocket(port, backlog, address);
+    }
+}
+

Propchange: incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/DefaultConnectionHelper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/DefaultConnectionHelper.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/DefaultConnectionHelper.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/Plugin_impl.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/Plugin_impl.java?rev=417411&r1=417410&r2=417411&view=diff
==============================================================================
--- incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/Plugin_impl.java (original)
+++ incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/Plugin_impl.java Tue Jun 27 03:42:37 2006
@@ -19,6 +19,8 @@
 
     private ListenerMap listenMap_; // list of listenPoints
 
+    private ConnectionHelper connectionHelper_;   // SSL connection helper
+
     // ------------------------------------------------------------------
     // Standard IDL to Java Mapping
     // ------------------------------------------------------------------
@@ -52,7 +54,7 @@
                     .resolve_initial_references("OCIConFactoryRegistry");
             org.apache.yoko.orb.OCI.ConFactoryRegistry registry = org.apache.yoko.orb.OCI.ConFactoryRegistryHelper
                     .narrow(obj);
-            registry.add_factory(new ConFactory_impl(keepAlive, listenMap_));
+            registry.add_factory(new ConFactory_impl(keepAlive, listenMap_, connectionHelper_));
         } catch (org.omg.CORBA.ORBPackage.InvalidName ex) {
             org.apache.yoko.orb.OB.Assert._OB_assert(false);
         } catch (org.apache.yoko.orb.OCI.FactoryAlreadyExists ex) {
@@ -87,7 +89,7 @@
                     .resolve_initial_references("OCIAccFactoryRegistry");
             org.apache.yoko.orb.OCI.AccFactoryRegistry registry = org.apache.yoko.orb.OCI.AccFactoryRegistryHelper
                     .narrow(obj);
-            registry.add_factory(new AccFactory_impl(listenMap_));
+            registry.add_factory(new AccFactory_impl(listenMap_, connectionHelper_));
         } catch (org.omg.CORBA.ORBPackage.InvalidName ex) {
             org.apache.yoko.orb.OB.Assert._OB_assert(false);
         } catch (org.apache.yoko.orb.OCI.FactoryAlreadyExists ex) {
@@ -96,13 +98,15 @@
         }
     }
 
+
     // ------------------------------------------------------------------
     // Yoko internal functions
     // Application programs must not use these functions directly
     // ------------------------------------------------------------------
 
-    public Plugin_impl(org.omg.CORBA.ORB orb) {
+    public Plugin_impl(org.omg.CORBA.ORB orb, ConnectionHelper helper) {
         orb_ = orb;
+        connectionHelper_ = helper;
         listenMap_ = new ListenerMap();
     }
 }

Modified: incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/TransportInfo_impl.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/TransportInfo_impl.java?rev=417411&r1=417410&r2=417411&view=diff
==============================================================================
--- incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/TransportInfo_impl.java (original)
+++ incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/IIOP/TransportInfo_impl.java Tue Jun 27 03:42:37 2006
@@ -11,6 +11,8 @@
 
 package org.apache.yoko.orb.OCI.IIOP;
 
+import java.net.Socket;
+
 import org.apache.yoko.orb.OCI.IIOP.PLUGIN_ID;
 import org.apache.yoko.orb.OCI.IIOP.TransportInfo;
 
@@ -96,6 +98,14 @@
             }
     }
 
+    public synchronized java.net.Socket socket() {
+        if (transport_ == null)
+            throw new org.omg.CORBA.NO_RESOURCES();
+
+        return transport_.socket_;
+    }
+
+
     public synchronized String addr() {
         if (transport_ == null)
             throw new org.omg.CORBA.NO_RESOURCES();
@@ -162,14 +172,14 @@
 
             //
             // Fill in the bidir service context
-            // 
+            //
             org.omg.IOP.ServiceContext context = new org.omg.IOP.ServiceContext();
             context.context_id = org.omg.IOP.BI_DIR_IIOP.value;
             context.context_data = buf.data();
 
             //
             // Create and fill the return context list
-            // 
+            //
             scl = new org.omg.IOP.ServiceContext[1];
             scl[0] = context;
             return scl;
@@ -178,7 +188,7 @@
         //
         // we don't have a bidir service context so return an array of
         // length 0
-        // 
+        //
         scl = new org.omg.IOP.ServiceContext[0];
         return scl;
     }
@@ -195,15 +205,15 @@
                         buf, 0, false);
                 in._OB_readEndian();
 
-                // 
+                //
                 // unmarshal the octets back to the bidir format
                 //
                 org.omg.IIOP.BiDirIIOPServiceContext biDirCtxt = org.omg.IIOP.BiDirIIOPServiceContextHelper
                         .read(in);
 
-                // 
+                //
                 // save the listening points in the transport
-                // 
+                //
                 _OB_setListenPoints(biDirCtxt.listen_points);
 
                 break;

Modified: incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/iiop.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/iiop.java?rev=417411&r1=417410&r2=417411&view=diff
==============================================================================
--- incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/iiop.java (original)
+++ incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/OCI/iiop.java Tue Jun 27 03:42:37 2006
@@ -11,7 +11,13 @@
 
 package org.apache.yoko.orb.OCI;
 
+import org.apache.yoko.orb.OCI.IIOP.ConnectionHelper;
+
 public class iiop implements PluginInit {
+    // default settings for loading the connectionHelper "plugin-to-the-plugin"
+    private String connectionHelper = "org.apache.yoko.orb.OCI.IIOP.DefaultConnectionHelper";
+    private String helperArgs = "";
+
     //
     // Compatibility check. The plug-in should verify that it is
     // compatible with the given OCI version, and raise an exception
@@ -34,14 +40,31 @@
         //
         args.value = parse_args(args.value, props);
 
-        return new org.apache.yoko.orb.OCI.IIOP.Plugin_impl(orb);
+        ConnectionHelper helper = null;
+
+        try {
+            // get the appropriate class for the loading.
+            ClassLoader loader = Thread.currentThread().getContextClassLoader();
+            if (loader == null) {
+                loader = this.getClass().getClassLoader();
+            }
+
+            Class c = loader.loadClass(connectionHelper);
+            helper = (org.apache.yoko.orb.OCI.IIOP.ConnectionHelper) c.newInstance();
+            // give this a chance to initializer
+            helper.init(helperArgs);
+        } catch (Exception ex) {
+            throw new org.omg.CORBA.INITIALIZE("unable to load IIOP ConnectionHelper plug-in `" + connectionHelper + "':\n" + ex.getMessage());
+        }
+
+        return new org.apache.yoko.orb.OCI.IIOP.Plugin_impl(orb, helper);
     }
 
     //
     // Parse IIOP arguments. The return value is the a new array
     // with the IIOP arguments removed.
     //
-    public static String[] parse_args(String[] args, java.util.Properties props) {
+    public String[] parse_args(String[] args, java.util.Properties props) {
         String backlog = null;
         String bind = null;
         String host = null;
@@ -113,6 +136,22 @@
                 port = args[i + 1];
                 haveArgs = true;
                 i += 2;
+            } else if (args[i].equals("-IIOPconnectionHelper")) {
+                if (i + 1 >= args.length)
+                    throw new org.omg.CORBA.INITIALIZE("iiop: argument "
+                            + "expected for " + args[i]);
+                connectionHelper = args[i + 1];
+                // NB:  We strip out the connection helper related arguments, so we don't set the
+                // haveArgs flag for this.
+                i += 2;
+            } else if (args[i].equals("-IIOPconnectionHelperArgs")) {
+                if (i + 1 >= args.length)
+                    throw new org.omg.CORBA.INITIALIZE("iiop: argument "
+                            + "expected for " + args[i]);
+                helperArgs = args[i + 1];
+                // NB:  We strip out the connection helper related arguments, so we don't set the
+                // haveArgs flag for this.
+                i += 2;
             } else if (args[i].startsWith("-IIOP")) {
                 throw new org.omg.CORBA.INITIALIZE("iiop: unknown option `"
                         + args[i] + "'");
@@ -167,6 +206,9 @@
                 props.put(propName, value + ", " + str);
             }
         }
+
+
+
 
         //
         // Filter arguments

Added: incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/PortableInterceptor/ServerRequestInfoExt.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/PortableInterceptor/ServerRequestInfoExt.java?rev=417411&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/PortableInterceptor/ServerRequestInfoExt.java (added)
+++ incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/PortableInterceptor/ServerRequestInfoExt.java Tue Jun 27 03:42:37 2006
@@ -0,0 +1,31 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed 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.
+ */
+
+
+/**
+ * @version $Rev$ $Date$
+ */
+
+package org.apache.yoko.orb.PortableInterceptor;
+
+import org.omg.PortableInterceptor.ServerRequestInfo;
+
+public interface ServerRequestInfoExt extends org.omg.PortableInterceptor.ServerRequestInfo {
+
+    public org.apache.yoko.orb.OCI.TransportInfo getTransportInfo();
+}
+

Propchange: incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/PortableInterceptor/ServerRequestInfoExt.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/PortableInterceptor/ServerRequestInfoExt.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/PortableInterceptor/ServerRequestInfoExt.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/PortableInterceptor/ServerRequestInfo_impl.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/PortableInterceptor/ServerRequestInfo_impl.java?rev=417411&r1=417410&r2=417411&view=diff
==============================================================================
--- incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/PortableInterceptor/ServerRequestInfo_impl.java (original)
+++ incubator/yoko/trunk/core/src/main/java/org/apache/yoko/orb/PortableInterceptor/ServerRequestInfo_impl.java Tue Jun 27 03:42:37 2006
@@ -12,7 +12,7 @@
 package org.apache.yoko.orb.PortableInterceptor;
 
 final public class ServerRequestInfo_impl extends RequestInfo_impl implements
-        org.omg.PortableInterceptor.ServerRequestInfo {
+        ServerRequestInfoExt {
     //
     // Sequence of ServerRequestInterceptors to call on reply
     //
@@ -48,6 +48,11 @@
     //
     private String[] adapterName_;
 
+    //
+    // The information about the transport servicing this request
+    //
+    private org.apache.yoko.orb.OCI.TransportInfo transportInfo_;
+
     // ------------------------------------------------------------------
     // Standard IDL to Java mapping
     // ------------------------------------------------------------------
@@ -314,7 +319,8 @@
             byte[] objectId,
             org.omg.PortableInterceptor.ObjectReferenceTemplate adapterTemplate,
             java.util.Vector request, java.util.Vector reply,
-            org.apache.yoko.orb.OB.ORBInstance orbInstance, Current_impl current) {
+            org.apache.yoko.orb.OB.ORBInstance orbInstance, Current_impl current,
+            org.apache.yoko.orb.OCI.TransportInfo transportInfo) {
         super(orb, id, op, responseExpected, request, reply, orbInstance,
                 policies, current);
 
@@ -323,6 +329,7 @@
         adapterTemplate_ = adapterTemplate;
         servant_ = null;
         poa_ = null;
+        transportInfo_ = transportInfo;
 
         //
         // TODO: Dump NO_REPLY_SC
@@ -560,5 +567,17 @@
         //
         org.apache.yoko.orb.OB.Assert._OB_assert(argStrategy_ != null);
         argStrategy_.setResult(value);
+    }
+
+
+    /**
+     * Retrieve the TransportInfo object associated with this server
+     * request.  The TransportInfo object contains information about
+     * the connection used for the request.
+     *
+     * @return The TransportInfo object created by the OCI layer.
+     */
+    public org.apache.yoko.orb.OCI.TransportInfo getTransportInfo() {
+        return transportInfo_;
     }
 }

Added: incubator/yoko/trunk/core/src/test/java/org/apache/yoko/IIOPPluginTest.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/test/java/org/apache/yoko/IIOPPluginTest.java?rev=417411&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/test/java/org/apache/yoko/IIOPPluginTest.java (added)
+++ incubator/yoko/trunk/core/src/test/java/org/apache/yoko/IIOPPluginTest.java Tue Jun 27 03:42:37 2006
@@ -0,0 +1,31 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed 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.
+ */
+
+
+/**
+ * @version $Rev$ $Date$
+ */
+package org.apache.yoko;
+
+public class IIOPPluginTest extends AbstractOrbTestBase {
+    private static final String SERVER_CLASS = "test.iiopplugin.Server";
+    private static final String CLIENT_CLASS = "test.iiopplugin.Client";
+    public void testLocal() throws Exception {
+        runServerClientTest(SERVER_CLASS, CLIENT_CLASS);
+    }
+}
+

Propchange: incubator/yoko/trunk/core/src/test/java/org/apache/yoko/IIOPPluginTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/yoko/trunk/core/src/test/java/org/apache/yoko/IIOPPluginTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/yoko/trunk/core/src/test/java/org/apache/yoko/IIOPPluginTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: incubator/yoko/trunk/core/src/test/java/org/apache/yoko/processmanager/JavaProcess.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/test/java/org/apache/yoko/processmanager/JavaProcess.java?rev=417411&r1=417410&r2=417411&view=diff
==============================================================================
--- incubator/yoko/trunk/core/src/test/java/org/apache/yoko/processmanager/JavaProcess.java (original)
+++ incubator/yoko/trunk/core/src/test/java/org/apache/yoko/processmanager/JavaProcess.java Tue Jun 27 03:42:37 2006
@@ -35,10 +35,10 @@
 	private Properties systemProperties;
 	private ProcessAgent processAgent;
 	private ProcessManager manager;
-	
+
 	CountDown processExited = new CountDown(1);
 	CountDown processStarted = new CountDown(1);
-	
+
 	public JavaProcess(String name, ProcessManager manager) {
 		this.name = name;
 		this.manager = manager;
@@ -53,25 +53,25 @@
 	public void setSystemProperties(Properties properties) {
 		this.systemProperties = properties;
 	}
-	
+
 	public void addSystemProperty(String key, String value) {
 		systemProperties.put(key, value);
 	}
-	
+
 	public void addSystemProperty(String key) {
 		systemProperties.put(key, System.getProperty(key));
 	}
-	
+
 	/**
-	 * Starts the process. 
+	 * Starts the process.
 	 *
 	 */
 	public void launch() {
 		launch(5000);
 	}
-	
+
 	public void launch(int timeoutMillis) {
-        final String[] javaArgs = {name, "localhost", 
+        final String[] javaArgs = {name, "localhost",
                 Integer.toString(Registry.REGISTRY_PORT), manager.getName()};
         if(systemProperties == null) {
         	systemProperties = new Properties();
@@ -96,24 +96,24 @@
 	        }
         }
 	}
-	
+
 	public Object invokeMain(String className) throws InvocationTargetException {
 		return invokeMain(className, new String[0]);
 	}
-	
+
 	public Object invokeMain(String className, String[] args) throws InvocationTargetException {
 		return invokeStatic(className, "main", new Object[] { args });
 	}
-	
+
 	public Thread invokeMainAsync(String className) {
 		return invokeMainAsync(className, new String[0]);
 	}
-	
+
 	public Thread invokeMainAsync(String className, String[] args) {
 		return invokeStaticAsync(className, "main", new Object[] { args });
-		
+
 	}
-	
+
 	public Thread invokeStaticAsync(final String className, final String method, final Object[] args) {
 		Thread thread = new Thread(new Runnable() {
 			public void run() {
@@ -128,7 +128,7 @@
 		thread.start();
 		return thread;
 	}
-	
+
 	/**
 	 * Invokes a static method within the process. The static method cannot return a Throwable.
 	 * @param className
@@ -144,6 +144,7 @@
 		}
 		catch(RemoteException e) {
 			if(processExited.currentCount() != 0) {
+                e.printStackTrace();
 				throw new Error(e);
 			}
 			else {
@@ -156,21 +157,21 @@
 				throw (InvocationTargetException) result;
 			}
 			else throw new Error((Throwable) result);
-		}		
+		}
 		return result;
 	}
-	
+
 	protected void setAgent(ProcessAgent agent) {
 		this.processAgent = agent;
 	}
-	
+
 	public String getName() { return name; }
-	
+
 	/**
 	 * Terminates the process with the given exit code. Waits for the process to terminate.
 	 * @param exitCode
 	 */
-	public void exit(int exitCode) { 
+	public void exit(int exitCode) {
 		try {
 			processAgent.exit(exitCode);
 		}
@@ -183,7 +184,7 @@
 			throw new Error(e);
 		}
 	}
-	
+
 	private void waitForProcessStartup(int maxWaitMillis) {
 		try {
 			processStarted.acquire();

Added: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/Client.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/test/java/test/iiopplugin/Client.java?rev=417411&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/test/java/test/iiopplugin/Client.java (added)
+++ incubator/yoko/trunk/core/src/test/java/test/iiopplugin/Client.java Tue Jun 27 03:42:37 2006
@@ -0,0 +1,147 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed 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.
+ */
+
+
+/**
+ * @version $Rev$ $Date$
+ */
+
+package test.iiopplugin;
+
+import org.omg.CORBA.*;
+import org.omg.PortableServer.*;
+
+public class Client extends test.common.TestBase {
+    public static int run(ORB orb, String[] args)
+            throws org.omg.CORBA.UserException {
+        //
+        // Get "test" object
+        //
+        org.omg.CORBA.Object obj = orb.string_to_object("relfile:/Test.ref");
+        if (obj == null) {
+            System.err.println("cannot read IOR from Test.ref");
+            return 1;
+        }
+
+        Test test = TestHelper.narrow(obj);
+        TEST(test != null);
+
+        Test localTest = new LocalTest_impl();
+
+        org.omg.IOP.CodecFactory factory = org.omg.IOP.CodecFactoryHelper
+                .narrow(orb.resolve_initial_references("CodecFactory"));
+        TEST(factory != null);
+
+        org.omg.IOP.Encoding how = new org.omg.IOP.Encoding();
+        how.major_version = 0;
+        how.minor_version = 0;
+        how.format = org.omg.IOP.ENCODING_CDR_ENCAPS.value;
+
+        org.omg.IOP.Codec codec = factory.create_codec(how);
+        TEST(codec != null);
+
+        System.out.print("Testing Codec... ");
+        System.out.flush();
+        try {
+            org.omg.CORBA.Any a = orb.create_any();
+            TestHelper.insert(a, test);
+            byte[] data = codec.encode_value(a);
+        } catch (org.omg.CORBA.SystemException ex) {
+            TEST(false);
+        }
+        System.out.println("Done!");
+
+        System.out.print("Testing simple RPC call... ");
+        System.out.flush();
+        test.say("Hi");
+        System.out.println("Done!");
+
+        System.out.print("Testing passing non-local object... ");
+        System.out.flush();
+        try {
+            test.intest(test);
+        } catch (org.omg.CORBA.SystemException ex) {
+            TEST(false);
+        }
+        System.out.println("Done!");
+
+        System.out.print("Testing passing local object... ");
+        System.out.flush();
+        try {
+            test.intest(localTest);
+            TEST(false);
+        } catch (org.omg.CORBA.MARSHAL ex) {
+            // Expected
+        }
+        System.out.println("Done!");
+
+        System.out.print("Testing passing non-local object in any... ");
+        System.out.flush();
+        try {
+            org.omg.CORBA.Any a = orb.create_any();
+            TestHelper.insert(a, test);
+            test.inany(a);
+        } catch (org.omg.CORBA.SystemException ex) {
+            TEST(false);
+        }
+
+//        if (!ServerPlugin.testPassed()) {
+//            TEST(false);
+//        }
+
+        if (!ClientPlugin.testPassed()) {
+            TEST(false);
+        }
+
+        System.out.println("Done!");
+        test.shutdown();
+
+
+
+        return 0;
+    }
+
+    public static void main(String args[]) {
+        java.util.Properties props = System.getProperties();
+        props.put("org.omg.CORBA.ORBClass", "org.apache.yoko.orb.CORBA.ORB");
+        props.put("org.omg.CORBA.ORBSingletonClass",
+                "org.apache.yoko.orb.CORBA.ORBSingleton");
+
+        String[] arguments = new String[] { "-IIOPconnectionHelper", "test.iiopplugin.ClientPlugin", "-IIOPconnectionHelperArgs", ClientPlugin.CLIENT_ARGS };
+        int status = 0;
+        ORB orb = null;
+
+        try {
+            orb = ORB.init(arguments, props);
+            status = run(orb, arguments);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            status = 1;
+        }
+
+        if (orb != null) {
+            try {
+                orb.destroy();
+            } catch (Exception ex) {
+                ex.printStackTrace();
+                status = 1;
+            }
+        }
+
+        System.exit(status);
+    }
+}

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/Client.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/Client.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/Client.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/ClientPlugin.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/test/java/test/iiopplugin/ClientPlugin.java?rev=417411&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/test/java/test/iiopplugin/ClientPlugin.java (added)
+++ incubator/yoko/trunk/core/src/test/java/test/iiopplugin/ClientPlugin.java Tue Jun 27 03:42:37 2006
@@ -0,0 +1,84 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed 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.
+ */
+
+
+/**
+ * @version $Rev$ $Date$
+ */
+
+package test.iiopplugin;
+
+import java.io.IOException;
+import java.net.ConnectException;
+import java.net.InetAddress;
+import java.net.ServerSocket;
+import java.net.Socket;
+
+import org.apache.yoko.orb.OCI.IIOP.ConnectionHelper;
+import org.omg.CORBA.DynAnyPackage.Invalid;
+import org.omg.CORBA.Policy;
+import org.omg.IOP.IOR;
+
+
+public class ClientPlugin implements ConnectionHelper {
+    public static final String CLIENT_ARGS = "TestingClient";
+
+    static private boolean constructed = false;
+    static private boolean initialized = false;
+    static private boolean createdConnection = false;
+
+    public ClientPlugin() {
+        System.out.println("Client-side connection helper constructed");
+        constructed = true;
+    }
+
+
+    public void init(String parms) {
+        System.out.println("Initializing client-side connection helper with parms " + parms);
+        if (!parms.equals(CLIENT_ARGS)) {
+            throw new IllegalArgumentException("Invalid client initialization argument " + parms);
+        }
+        initialized = true;
+    }
+
+    public Socket createSocket(IOR ior, Policy[] policies, InetAddress address, int port) throws IOException, ConnectException {
+        System.out.println("Plugin " + this + " creating client socket connection for IOR=" + ior + " address=" + address + " port=" + port);
+        createdConnection = true;
+        return new Socket(address, port);
+    }
+
+    public Socket createSelfConnection(InetAddress address, int port) throws IOException, ConnectException {
+        System.out.println("Plugin " + this + " creating self client socket connection for address=" + address + " port=" + port);
+        return new Socket(address, port);
+    }
+
+    public ServerSocket createServerSocket(int port, int backlog)  throws IOException, ConnectException {
+        System.out.println("Plugin " + this + " creating server socket for port=" + port + " backlog=" + backlog);;
+        return new ServerSocket(port, backlog);
+    }
+
+    public ServerSocket createServerSocket(int port, int backlog, InetAddress address) throws IOException, ConnectException {
+        System.out.println("Plugin " + this + " creating server socket for port=" + port + " backlog=" + backlog + " address=" + address);
+        return new ServerSocket(port, backlog, address);
+    }
+
+    static public boolean testPassed() {
+        System.out.println("constructed=" + constructed + " initalized=" + initialized + " createdConnection=" + createdConnection);
+        return constructed && initialized && createdConnection;
+    }
+}
+

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/ClientPlugin.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/ClientPlugin.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/ClientPlugin.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTest.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTest.java?rev=417411&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTest.java (added)
+++ incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTest.java Tue Jun 27 03:42:37 2006
@@ -0,0 +1,33 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed 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.
+ */
+
+
+/**
+ * @version $Rev$ $Date$
+ */
+
+package test.iiopplugin;
+
+//
+// IDL:LocalTest:1.0
+//
+/***/
+
+public interface LocalTest extends LocalTestOperations,
+                                   Test
+{
+}

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTestHelper.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTestHelper.java?rev=417411&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTestHelper.java (added)
+++ incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTestHelper.java Tue Jun 27 03:42:37 2006
@@ -0,0 +1,90 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed 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.
+ */
+
+
+/**
+ * @version $Rev$ $Date$
+ */
+
+package test.iiopplugin;
+
+//
+// IDL:LocalTest:1.0
+//
+final public class LocalTestHelper
+{
+    public static void
+    insert(org.omg.CORBA.Any any, LocalTest val)
+    {
+        any.insert_Object(val, type());
+    }
+
+    public static LocalTest
+    extract(org.omg.CORBA.Any any)
+    {
+        if(any.type().equivalent(type()))
+            return narrow(any.extract_Object());
+
+        throw new org.omg.CORBA.BAD_OPERATION();
+    }
+
+    private static org.omg.CORBA.TypeCode typeCode_;
+
+    public static org.omg.CORBA.TypeCode
+    type()
+    {
+        if(typeCode_ == null)
+        {
+            org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init();
+            typeCode_ = ((org.omg.CORBA_2_4.ORB)orb).create_local_interface_tc(id(), "LocalTest");
+        }
+
+        return typeCode_;
+    }
+
+    public static String
+    id()
+    {
+        return "IDL:LocalTest:1.0";
+    }
+
+    public static LocalTest
+    read(org.omg.CORBA.portable.InputStream in)
+    {
+        throw new org.omg.CORBA.MARSHAL();
+    }
+
+    public static void
+    write(org.omg.CORBA.portable.OutputStream out, LocalTest val)
+    {
+        throw new org.omg.CORBA.MARSHAL();
+    }
+
+    public static LocalTest
+    narrow(org.omg.CORBA.Object val)
+    {
+        try
+        {
+            return (LocalTest)val;
+        }
+        catch(ClassCastException ex)
+        {
+        }
+
+        throw new org.omg.CORBA.BAD_PARAM();
+    }
+}

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTestHelper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTestHelper.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTestHelper.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTestHolder.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTestHolder.java?rev=417411&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTestHolder.java (added)
+++ incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTestHolder.java Tue Jun 27 03:42:37 2006
@@ -0,0 +1,60 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed 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.
+ */
+
+
+/**
+ * @version $Rev$ $Date$
+ */
+
+package test.iiopplugin;
+
+//
+// IDL:LocalTest:1.0
+//
+final public class LocalTestHolder implements org.omg.CORBA.portable.Streamable
+{
+    public LocalTest value;
+
+    public
+    LocalTestHolder()
+    {
+    }
+
+    public
+    LocalTestHolder(LocalTest initial)
+    {
+        value = initial;
+    }
+
+    public void
+    _read(org.omg.CORBA.portable.InputStream in)
+    {
+        value = LocalTestHelper.read(in);
+    }
+
+    public void
+    _write(org.omg.CORBA.portable.OutputStream out)
+    {
+        LocalTestHelper.write(out, value);
+    }
+
+    public org.omg.CORBA.TypeCode
+    _type()
+    {
+        return LocalTestHelper.type();
+    }
+}

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTestHolder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTestHolder.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTestHolder.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTestOperations.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTestOperations.java?rev=417411&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTestOperations.java (added)
+++ incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTestOperations.java Tue Jun 27 03:42:37 2006
@@ -0,0 +1,32 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed 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.
+ */
+
+
+/**
+ * @version $Rev$ $Date$
+ */
+
+package test.iiopplugin;
+
+//
+// IDL:LocalTest:1.0
+//
+/***/
+
+public interface LocalTestOperations extends TestOperations
+{
+}

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTestOperations.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTestOperations.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTestOperations.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTest_impl.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTest_impl.java?rev=417411&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTest_impl.java (added)
+++ incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTest_impl.java Tue Jun 27 03:42:37 2006
@@ -0,0 +1,51 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed 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.
+ */
+
+
+/**
+ * @version $Rev$ $Date$
+ */
+
+
+package test.iiopplugin;
+
+public class LocalTest_impl extends org.omg.CORBA.LocalObject implements
+        LocalTest {
+    public void say(String s) {
+        throw new org.omg.CORBA.NO_IMPLEMENT();
+    }
+
+    public void intest(Test t) {
+        throw new org.omg.CORBA.NO_IMPLEMENT();
+    }
+
+    public void inany(org.omg.CORBA.Any a) {
+        throw new org.omg.CORBA.NO_IMPLEMENT();
+    }
+
+    public void outany(org.omg.CORBA.AnyHolder a) {
+        throw new org.omg.CORBA.NO_IMPLEMENT();
+    }
+
+    public Test returntest() {
+        throw new org.omg.CORBA.NO_IMPLEMENT();
+    }
+
+    public void shutdown() {
+        throw new org.omg.CORBA.NO_IMPLEMENT();
+    }
+}

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTest_impl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTest_impl.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/LocalTest_impl.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/Server.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/test/java/test/iiopplugin/Server.java?rev=417411&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/test/java/test/iiopplugin/Server.java (added)
+++ incubator/yoko/trunk/core/src/test/java/test/iiopplugin/Server.java Tue Jun 27 03:42:37 2006
@@ -0,0 +1,112 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed 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.
+ */
+
+
+/**
+ * @version $Rev$ $Date$
+ */
+
+package test.iiopplugin;
+
+import org.omg.CORBA.*;
+import org.omg.PortableServer.*;
+
+public class Server {
+    public static int run(ORB orb, String[] args)
+            throws org.omg.CORBA.UserException {
+        //
+        // Resolve Root POA
+        //
+        POA poa = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
+
+        //
+        // Get a reference to the POA manager and activate it
+        //
+        POAManager manager = poa.the_POAManager();
+        manager.activate();
+
+        //
+        // Create implementation object
+        //
+        Test_impl testImpl = new Test_impl(poa);
+        Test test = testImpl._this(orb);
+
+        //
+        // Save reference. This must be done after POA manager
+        // activation, otherwise there is a potential for a race
+        // condition between the client sending a request and the
+        // server not being ready yet.
+        //
+        String refFile = "Test.ref";
+        try {
+            String ref = orb.object_to_string(test);
+            java.io.FileOutputStream file = new java.io.FileOutputStream(
+                    refFile);
+            java.io.PrintWriter out = new java.io.PrintWriter(file);
+            out.println(ref);
+            out.flush();
+            file.close();
+        } catch (java.io.IOException ex) {
+            System.err.println("Can't write to `" + ex.getMessage() + "'");
+            return 1;
+        }
+
+        //
+        // Run implementation
+        //
+        orb.run();
+
+        //
+        // Delete file
+        //
+        new java.io.File(refFile).delete();
+
+        return 0;
+    }
+
+    public static void main(String args[]) {
+        java.util.Properties props = System.getProperties();
+        props.put("org.omg.CORBA.ORBClass", "org.apache.yoko.orb.CORBA.ORB");
+        props.put("org.omg.CORBA.ORBSingletonClass",
+                "org.apache.yoko.orb.CORBA.ORBSingleton");
+        props.put("org.omg.PortableInterceptor.ORBInitializerClass.test.iiopplugin.TestORBInitializer", "");
+
+        String[] arguments = new String[] { "-IIOPconnectionHelper", "test.iiopplugin.ServerPlugin", "-IIOPconnectionHelperArgs", ServerPlugin.SERVER_ARGS };
+
+        int status = 0;
+        ORB orb = null;
+
+        try {
+            orb = ORB.init(arguments, props);
+            status = run(orb, arguments);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            status = 1;
+        }
+
+        if (orb != null) {
+            try {
+                orb.destroy();
+            } catch (Exception ex) {
+                ex.printStackTrace();
+                status = 1;
+            }
+        }
+
+        System.exit(status);
+    }
+}

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/Server.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/Server.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/Server.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/ServerPlugin.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/test/java/test/iiopplugin/ServerPlugin.java?rev=417411&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/test/java/test/iiopplugin/ServerPlugin.java (added)
+++ incubator/yoko/trunk/core/src/test/java/test/iiopplugin/ServerPlugin.java Tue Jun 27 03:42:37 2006
@@ -0,0 +1,86 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed 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.
+ */
+
+
+/**
+ * @version $Rev$ $Date$
+ */
+
+package test.iiopplugin;
+
+import java.io.IOException;
+import java.net.ConnectException;
+import java.net.InetAddress;
+import java.net.ServerSocket;
+import java.net.Socket;
+
+import org.apache.yoko.orb.OCI.IIOP.ConnectionHelper;
+import org.omg.CORBA.DynAnyPackage.Invalid;
+import org.omg.CORBA.Policy;
+import org.omg.IOP.IOR;
+
+
+public class ServerPlugin implements ConnectionHelper {
+    public static final String SERVER_ARGS = "TestingServer";
+
+    static private boolean constructed = false;
+    static private boolean initialized = false;
+    static private boolean createdSelfConnection = false;
+    static private boolean createdServerConnection = false;
+
+    public ServerPlugin() {
+        System.out.println("Server-side connection helper constructed");
+        constructed = true;
+    }
+
+
+    public void init(String parms) {
+        System.out.println("Initializing server-side connection helper with parms " + parms);
+        if (!parms.equals(SERVER_ARGS)) {
+            throw new IllegalArgumentException("Invalid server initialization argument " + parms);
+        }
+        initialized = true;
+    }
+
+    public Socket createSocket(IOR ior, Policy[] policies, InetAddress address, int port) throws IOException, ConnectException {
+        System.out.println("Plugin " + this + " creating client socket connection for IOR=" + ior + " address=" + address + " port=" + port);
+        return new Socket(address, port);
+    }
+
+    public Socket createSelfConnection(InetAddress address, int port) throws IOException, ConnectException {
+        System.out.println("Plugin " + this + " creating self client socket connection for address=" + address + " port=" + port);
+        createdSelfConnection = true;
+        return new Socket(address, port);
+    }
+
+    public ServerSocket createServerSocket(int port, int backlog)  throws IOException, ConnectException {
+        System.out.println("Plugin " + this + " creating server socket for port=" + port + " backlog=" + backlog);;
+        createdServerConnection = true;
+        return new ServerSocket(port, backlog);
+    }
+
+    public ServerSocket createServerSocket(int port, int backlog, InetAddress address) throws IOException, ConnectException {
+        System.out.println("Plugin " + this + " creating server socket for port=" + port + " backlog=" + backlog + " address=" + address);
+        createdServerConnection = true;
+        return new ServerSocket(port, backlog, address);
+    }
+
+    static public boolean testPassed() {
+        System.out.println("constructed=" + constructed + " initalized=" + initialized + " createdSelfConnection=" + createdSelfConnection + " createdServerConnection=" + createdServerConnection);
+        return constructed && initialized && createdServerConnection;
+    }
+}

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/ServerPlugin.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/ServerPlugin.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/ServerPlugin.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/ServiceContextInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/test/java/test/iiopplugin/ServiceContextInterceptor.java?rev=417411&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/test/java/test/iiopplugin/ServiceContextInterceptor.java (added)
+++ incubator/yoko/trunk/core/src/test/java/test/iiopplugin/ServiceContextInterceptor.java Tue Jun 27 03:42:37 2006
@@ -0,0 +1,72 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed 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.
+ */
+
+
+/**
+ * @version $Rev$ $Date$
+ */
+
+package test.iiopplugin;
+
+import java.net.Socket;
+
+import org.apache.yoko.orb.PortableInterceptor.ServerRequestInfoExt;
+import org.apache.yoko.orb.OCI.TransportInfo;
+import org.apache.yoko.orb.OCI.IIOP.TransportInfo_impl;
+import org.omg.CORBA.LocalObject;
+import org.omg.PortableInterceptor.ServerRequestInfo;
+import org.omg.PortableInterceptor.ServerRequestInterceptor;
+
+/**
+ * @version $Revision$ $Date$
+ */
+final class ServiceContextInterceptor extends LocalObject implements ServerRequestInterceptor {
+    public ServiceContextInterceptor() {
+    }
+
+    public void receive_request(ServerRequestInfo ri) {
+    }
+
+    public void receive_request_service_contexts(ServerRequestInfo ri) {
+        ServerRequestInfoExt riExt = (ServerRequestInfoExt) ri;
+        TransportInfo_impl connection = (TransportInfo_impl)riExt.getTransportInfo();
+        if (connection != null) {
+            Socket socket = connection.socket();
+            if (socket != null) {
+                System.out.println("Retrieved socket successfully");
+                return;
+            }
+        }
+    }
+
+    public void send_exception(ServerRequestInfo ri) {
+    }
+
+    public void send_other(ServerRequestInfo ri) {
+    }
+
+    public void send_reply(ServerRequestInfo ri) {
+    }
+
+    public void destroy() {
+    }
+
+    public String name() {
+        return "test.iiopplugin.ServiceContextInterceptor";
+    }
+}
+

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/ServiceContextInterceptor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/ServiceContextInterceptor.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/ServiceContextInterceptor.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/Test.idl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/test/java/test/iiopplugin/Test.idl?rev=417411&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/test/java/test/iiopplugin/Test.idl (added)
+++ incubator/yoko/trunk/core/src/test/java/test/iiopplugin/Test.idl Tue Jun 27 03:42:37 2006
@@ -0,0 +1,31 @@
+//
+//
+// Copyright 2006 The Apache Software Foundation
+//
+//  Licensed 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.
+//
+
+interface Test
+{
+    void say(in string s);
+    void intest(in Test t);
+    void inany(in any a);
+    void outany(out any a);
+    Test returntest();
+
+    void shutdown();
+};
+
+local interface LocalTest : Test
+{
+};

Added: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/Test.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/test/java/test/iiopplugin/Test.java?rev=417411&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/test/java/test/iiopplugin/Test.java (added)
+++ incubator/yoko/trunk/core/src/test/java/test/iiopplugin/Test.java Tue Jun 27 03:42:37 2006
@@ -0,0 +1,34 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed 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.
+ */
+
+
+/**
+ * @version $Rev$ $Date$
+ */
+
+package test.iiopplugin;
+
+//
+// IDL:Test:1.0
+//
+/***/
+
+public interface Test extends TestOperations,
+                              org.omg.CORBA.Object,
+                              org.omg.CORBA.portable.IDLEntity
+{
+}

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/Test.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/Test.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/Test.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestHelper.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestHelper.java?rev=417411&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestHelper.java (added)
+++ incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestHelper.java Tue Jun 27 03:42:37 2006
@@ -0,0 +1,141 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed 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.
+ */
+
+
+/**
+ * @version $Rev$ $Date$
+ */
+
+package test.iiopplugin;
+
+//
+// IDL:Test:1.0
+//
+final public class TestHelper
+{
+    public static void
+    insert(org.omg.CORBA.Any any, Test val)
+    {
+        any.insert_Object(val, type());
+    }
+
+    public static Test
+    extract(org.omg.CORBA.Any any)
+    {
+        if(any.type().equivalent(type()))
+            return narrow(any.extract_Object());
+
+        throw new org.omg.CORBA.BAD_OPERATION();
+    }
+
+    private static org.omg.CORBA.TypeCode typeCode_;
+
+    public static org.omg.CORBA.TypeCode
+    type()
+    {
+        if(typeCode_ == null)
+        {
+            org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init();
+            typeCode_ = orb.create_interface_tc(id(), "Test");
+        }
+
+        return typeCode_;
+    }
+
+    public static String
+    id()
+    {
+        return "IDL:Test:1.0";
+    }
+
+    public static Test
+    read(org.omg.CORBA.portable.InputStream in)
+    {
+        org.omg.CORBA.Object _ob_v = in.read_Object();
+
+        try
+        {
+            return (Test)_ob_v;
+        }
+        catch(ClassCastException ex)
+        {
+        }
+
+        org.omg.CORBA.portable.ObjectImpl _ob_impl;
+        _ob_impl = (org.omg.CORBA.portable.ObjectImpl)_ob_v;
+        _TestStub _ob_stub = new _TestStub();
+        _ob_stub._set_delegate(_ob_impl._get_delegate());
+        return _ob_stub;
+    }
+
+    public static void
+    write(org.omg.CORBA.portable.OutputStream out, Test val)
+    {
+        out.write_Object(val);
+    }
+
+    public static Test
+    narrow(org.omg.CORBA.Object val)
+    {
+        if(val != null)
+        {
+            try
+            {
+                return (Test)val;
+            }
+            catch(ClassCastException ex)
+            {
+            }
+
+            if(val._is_a(id()))
+            {
+                org.omg.CORBA.portable.ObjectImpl _ob_impl;
+                _TestStub _ob_stub = new _TestStub();
+                _ob_impl = (org.omg.CORBA.portable.ObjectImpl)val;
+                _ob_stub._set_delegate(_ob_impl._get_delegate());
+                return _ob_stub;
+            }
+
+            throw new org.omg.CORBA.BAD_PARAM();
+        }
+
+        return null;
+    }
+
+    public static Test
+    unchecked_narrow(org.omg.CORBA.Object val)
+    {
+        if(val != null)
+        {
+            try
+            {
+                return (Test)val;
+            }
+            catch(ClassCastException ex)
+            {
+            }
+
+            org.omg.CORBA.portable.ObjectImpl _ob_impl;
+            _TestStub _ob_stub = new _TestStub();
+            _ob_impl = (org.omg.CORBA.portable.ObjectImpl)val;
+            _ob_stub._set_delegate(_ob_impl._get_delegate());
+            return _ob_stub;
+        }
+
+        return null;
+    }
+}

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestHelper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestHelper.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestHelper.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestHolder.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestHolder.java?rev=417411&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestHolder.java (added)
+++ incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestHolder.java Tue Jun 27 03:42:37 2006
@@ -0,0 +1,59 @@
+/**
+ *
+ * Copyright 2006 The Apache Software Foundation
+ *
+ *  Licensed 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.
+ */
+
+
+/**
+ * @version $Rev$ $Date$
+ */
+package test.iiopplugin;
+
+//
+// IDL:Test:1.0
+//
+final public class TestHolder implements org.omg.CORBA.portable.Streamable
+{
+    public Test value;
+
+    public
+    TestHolder()
+    {
+    }
+
+    public
+    TestHolder(Test initial)
+    {
+        value = initial;
+    }
+
+    public void
+    _read(org.omg.CORBA.portable.InputStream in)
+    {
+        value = TestHelper.read(in);
+    }
+
+    public void
+    _write(org.omg.CORBA.portable.OutputStream out)
+    {
+        TestHelper.write(out, value);
+    }
+
+    public org.omg.CORBA.TypeCode
+    _type()
+    {
+        return TestHelper.type();
+    }
+}

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestHolder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestHolder.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestHolder.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain