incubator-yoko-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickmcgu...@apache.org
Subject svn commit: r420864 [4/4] - in /incubator/yoko/trunk/core/src: main/java/org/apache/yoko/orb/CosNaming/ main/java/org/apache/yoko/orb/CosNaming/tnaming/ main/java/org/omg/CosNaming/ main/java/org/omg/CosNaming/NamingContextExtPackage/ main/java/org/omg...
Date Tue, 11 Jul 2006 14:18:11 GMT
Propchange: incubator/yoko/trunk/core/src/main/java/org/omg/CosNaming/_NamingContextExtStub.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/yoko/trunk/core/src/main/java/org/omg/CosNaming/_NamingContextExtStub.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/yoko/trunk/core/src/main/java/org/omg/CosNaming/_NamingContextExtStub.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/yoko/trunk/core/src/main/java/org/omg/CosNaming/_NamingContextStub.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/main/java/org/omg/CosNaming/_NamingContextStub.java?rev=420864&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/main/java/org/omg/CosNaming/_NamingContextStub.java (added)
+++ incubator/yoko/trunk/core/src/main/java/org/omg/CosNaming/_NamingContextStub.java Tue Jul 11 07:18:08 2006
@@ -0,0 +1,295 @@
+package org.omg.CosNaming;
+
+
+/**
+* org/omg/CosNaming/_NamingContextStub.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.1"
+* from CosNaming.idl
+* Thursday, June 29, 2006 10:01:54 AM EDT
+*/
+
+public class _NamingContextStub extends org.omg.CORBA.portable.ObjectImpl implements org.omg.CosNaming.NamingContext
+{
+
+  public void bind (org.omg.CosNaming.NameComponent[] n, org.omg.CORBA.Object obj) throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName, org.omg.CosNaming.NamingContextPackage.AlreadyBound
+  {
+            org.omg.CORBA.portable.InputStream $in = null;
+            try {
+                org.omg.CORBA.portable.OutputStream $out = _request ("bind", true);
+                org.omg.CosNaming.NameHelper.write ($out, n);
+                org.omg.CORBA.ObjectHelper.write ($out, obj);
+                $in = _invoke ($out);
+                return;
+            } catch (org.omg.CORBA.portable.ApplicationException $ex) {
+                $in = $ex.getInputStream ();
+                String _id = $ex.getId ();
+                if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0"))
+                    throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read ($in);
+                else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0"))
+                    throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read ($in);
+                else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0"))
+                    throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in);
+                else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/AlreadyBound:1.0"))
+                    throw org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.read ($in);
+                else
+                    throw new org.omg.CORBA.MARSHAL (_id);
+            } catch (org.omg.CORBA.portable.RemarshalException $rm) {
+                bind (n, obj        );
+            } finally {
+                _releaseReply ($in);
+            }
+  } // bind
+
+  public void rebind (org.omg.CosNaming.NameComponent[] n, org.omg.CORBA.Object obj) throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName
+  {
+            org.omg.CORBA.portable.InputStream $in = null;
+            try {
+                org.omg.CORBA.portable.OutputStream $out = _request ("rebind", true);
+                org.omg.CosNaming.NameHelper.write ($out, n);
+                org.omg.CORBA.ObjectHelper.write ($out, obj);
+                $in = _invoke ($out);
+                return;
+            } catch (org.omg.CORBA.portable.ApplicationException $ex) {
+                $in = $ex.getInputStream ();
+                String _id = $ex.getId ();
+                if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0"))
+                    throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read ($in);
+                else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0"))
+                    throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read ($in);
+                else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0"))
+                    throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in);
+                else
+                    throw new org.omg.CORBA.MARSHAL (_id);
+            } catch (org.omg.CORBA.portable.RemarshalException $rm) {
+                rebind (n, obj        );
+            } finally {
+                _releaseReply ($in);
+            }
+  } // rebind
+
+  public void bind_context (org.omg.CosNaming.NameComponent[] n, org.omg.CosNaming.NamingContext nc) throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName, org.omg.CosNaming.NamingContextPackage.AlreadyBound
+  {
+            org.omg.CORBA.portable.InputStream $in = null;
+            try {
+                org.omg.CORBA.portable.OutputStream $out = _request ("bind_context", true);
+                org.omg.CosNaming.NameHelper.write ($out, n);
+                org.omg.CosNaming.NamingContextHelper.write ($out, nc);
+                $in = _invoke ($out);
+                return;
+            } catch (org.omg.CORBA.portable.ApplicationException $ex) {
+                $in = $ex.getInputStream ();
+                String _id = $ex.getId ();
+                if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0"))
+                    throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read ($in);
+                else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0"))
+                    throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read ($in);
+                else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0"))
+                    throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in);
+                else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/AlreadyBound:1.0"))
+                    throw org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.read ($in);
+                else
+                    throw new org.omg.CORBA.MARSHAL (_id);
+            } catch (org.omg.CORBA.portable.RemarshalException $rm) {
+                bind_context (n, nc        );
+            } finally {
+                _releaseReply ($in);
+            }
+  } // bind_context
+
+  public void rebind_context (org.omg.CosNaming.NameComponent[] n, org.omg.CosNaming.NamingContext nc) throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName
+  {
+            org.omg.CORBA.portable.InputStream $in = null;
+            try {
+                org.omg.CORBA.portable.OutputStream $out = _request ("rebind_context", true);
+                org.omg.CosNaming.NameHelper.write ($out, n);
+                org.omg.CosNaming.NamingContextHelper.write ($out, nc);
+                $in = _invoke ($out);
+                return;
+            } catch (org.omg.CORBA.portable.ApplicationException $ex) {
+                $in = $ex.getInputStream ();
+                String _id = $ex.getId ();
+                if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0"))
+                    throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read ($in);
+                else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0"))
+                    throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read ($in);
+                else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0"))
+                    throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in);
+                else
+                    throw new org.omg.CORBA.MARSHAL (_id);
+            } catch (org.omg.CORBA.portable.RemarshalException $rm) {
+                rebind_context (n, nc        );
+            } finally {
+                _releaseReply ($in);
+            }
+  } // rebind_context
+
+  public org.omg.CORBA.Object resolve (org.omg.CosNaming.NameComponent[] n) throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName
+  {
+            org.omg.CORBA.portable.InputStream $in = null;
+            try {
+                org.omg.CORBA.portable.OutputStream $out = _request ("resolve", true);
+                org.omg.CosNaming.NameHelper.write ($out, n);
+                $in = _invoke ($out);
+                org.omg.CORBA.Object $result = org.omg.CORBA.ObjectHelper.read ($in);
+                return $result;
+            } catch (org.omg.CORBA.portable.ApplicationException $ex) {
+                $in = $ex.getInputStream ();
+                String _id = $ex.getId ();
+                if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0"))
+                    throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read ($in);
+                else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0"))
+                    throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read ($in);
+                else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0"))
+                    throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in);
+                else
+                    throw new org.omg.CORBA.MARSHAL (_id);
+            } catch (org.omg.CORBA.portable.RemarshalException $rm) {
+                return resolve (n        );
+            } finally {
+                _releaseReply ($in);
+            }
+  } // resolve
+
+  public void unbind (org.omg.CosNaming.NameComponent[] n) throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName
+  {
+            org.omg.CORBA.portable.InputStream $in = null;
+            try {
+                org.omg.CORBA.portable.OutputStream $out = _request ("unbind", true);
+                org.omg.CosNaming.NameHelper.write ($out, n);
+                $in = _invoke ($out);
+                return;
+            } catch (org.omg.CORBA.portable.ApplicationException $ex) {
+                $in = $ex.getInputStream ();
+                String _id = $ex.getId ();
+                if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0"))
+                    throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read ($in);
+                else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0"))
+                    throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read ($in);
+                else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0"))
+                    throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in);
+                else
+                    throw new org.omg.CORBA.MARSHAL (_id);
+            } catch (org.omg.CORBA.portable.RemarshalException $rm) {
+                unbind (n        );
+            } finally {
+                _releaseReply ($in);
+            }
+  } // unbind
+
+  public org.omg.CosNaming.NamingContext new_context ()
+  {
+            org.omg.CORBA.portable.InputStream $in = null;
+            try {
+                org.omg.CORBA.portable.OutputStream $out = _request ("new_context", true);
+                $in = _invoke ($out);
+                org.omg.CosNaming.NamingContext $result = org.omg.CosNaming.NamingContextHelper.read ($in);
+                return $result;
+            } catch (org.omg.CORBA.portable.ApplicationException $ex) {
+                $in = $ex.getInputStream ();
+                String _id = $ex.getId ();
+                throw new org.omg.CORBA.MARSHAL (_id);
+            } catch (org.omg.CORBA.portable.RemarshalException $rm) {
+                return new_context (        );
+            } finally {
+                _releaseReply ($in);
+            }
+  } // new_context
+
+  public org.omg.CosNaming.NamingContext bind_new_context (org.omg.CosNaming.NameComponent[] n) throws org.omg.CosNaming.NamingContextPackage.NotFound, org.omg.CosNaming.NamingContextPackage.AlreadyBound, org.omg.CosNaming.NamingContextPackage.CannotProceed, org.omg.CosNaming.NamingContextPackage.InvalidName
+  {
+            org.omg.CORBA.portable.InputStream $in = null;
+            try {
+                org.omg.CORBA.portable.OutputStream $out = _request ("bind_new_context", true);
+                org.omg.CosNaming.NameHelper.write ($out, n);
+                $in = _invoke ($out);
+                org.omg.CosNaming.NamingContext $result = org.omg.CosNaming.NamingContextHelper.read ($in);
+                return $result;
+            } catch (org.omg.CORBA.portable.ApplicationException $ex) {
+                $in = $ex.getInputStream ();
+                String _id = $ex.getId ();
+                if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotFound:1.0"))
+                    throw org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read ($in);
+                else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/AlreadyBound:1.0"))
+                    throw org.omg.CosNaming.NamingContextPackage.AlreadyBoundHelper.read ($in);
+                else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/CannotProceed:1.0"))
+                    throw org.omg.CosNaming.NamingContextPackage.CannotProceedHelper.read ($in);
+                else if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/InvalidName:1.0"))
+                    throw org.omg.CosNaming.NamingContextPackage.InvalidNameHelper.read ($in);
+                else
+                    throw new org.omg.CORBA.MARSHAL (_id);
+            } catch (org.omg.CORBA.portable.RemarshalException $rm) {
+                return bind_new_context (n        );
+            } finally {
+                _releaseReply ($in);
+            }
+  } // bind_new_context
+
+  public void destroy () throws org.omg.CosNaming.NamingContextPackage.NotEmpty
+  {
+            org.omg.CORBA.portable.InputStream $in = null;
+            try {
+                org.omg.CORBA.portable.OutputStream $out = _request ("destroy", true);
+                $in = _invoke ($out);
+                return;
+            } catch (org.omg.CORBA.portable.ApplicationException $ex) {
+                $in = $ex.getInputStream ();
+                String _id = $ex.getId ();
+                if (_id.equals ("IDL:omg.org/CosNaming/NamingContext/NotEmpty:1.0"))
+                    throw org.omg.CosNaming.NamingContextPackage.NotEmptyHelper.read ($in);
+                else
+                    throw new org.omg.CORBA.MARSHAL (_id);
+            } catch (org.omg.CORBA.portable.RemarshalException $rm) {
+                destroy (        );
+            } finally {
+                _releaseReply ($in);
+            }
+  } // destroy
+
+  public void list (int how_many, org.omg.CosNaming.BindingListHolder bl, org.omg.CosNaming.BindingIteratorHolder bi)
+  {
+            org.omg.CORBA.portable.InputStream $in = null;
+            try {
+                org.omg.CORBA.portable.OutputStream $out = _request ("list", true);
+                $out.write_ulong (how_many);
+                $in = _invoke ($out);
+                bl.value = org.omg.CosNaming.BindingListHelper.read ($in);
+                bi.value = org.omg.CosNaming.BindingIteratorHelper.read ($in);
+                return;
+            } catch (org.omg.CORBA.portable.ApplicationException $ex) {
+                $in = $ex.getInputStream ();
+                String _id = $ex.getId ();
+                throw new org.omg.CORBA.MARSHAL (_id);
+            } catch (org.omg.CORBA.portable.RemarshalException $rm) {
+                list (how_many, bl, bi        );
+            } finally {
+                _releaseReply ($in);
+            }
+  } // list
+
+  // Type-specific CORBA::Object operations
+  private static String[] __ids = {
+    "IDL:omg.org/CosNaming/NamingContext:1.0"};
+
+  public String[] _ids ()
+  {
+    return (String[])__ids.clone ();
+  }
+
+  private void readObject (java.io.ObjectInputStream s) throws java.io.IOException
+  {
+     String str = s.readUTF ();
+     String[] args = null;
+     java.util.Properties props = null;
+     org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str);
+     org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate ();
+     _set_delegate (delegate);
+  }
+
+  private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException
+  {
+     String[] args = null;
+     java.util.Properties props = null;
+     String str = org.omg.CORBA.ORB.init (args, props).object_to_string (this);
+     s.writeUTF (str);
+  }
+} // class _NamingContextStub

Propchange: incubator/yoko/trunk/core/src/main/java/org/omg/CosNaming/_NamingContextStub.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/yoko/trunk/core/src/main/java/org/omg/CosNaming/_NamingContextStub.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/yoko/trunk/core/src/main/java/org/omg/CosNaming/_NamingContextStub.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/yoko/trunk/core/src/test/java/org/apache/yoko/CosNamingTest.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/test/java/org/apache/yoko/CosNamingTest.java?rev=420864&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/test/java/org/apache/yoko/CosNamingTest.java (added)
+++ incubator/yoko/trunk/core/src/test/java/org/apache/yoko/CosNamingTest.java Tue Jul 11 07:18:08 2006
@@ -0,0 +1,40 @@
+/**
+ *
+ * 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;
+
+import java.io.File;
+
+public class CosNamingTest extends AbstractOrbTestBase {
+    private static final String SERVER_CLASS = "test.tnaming.Server";
+    private static final String CLIENT_CLASS = "test.tnaming.Client";
+
+    public void setUp() throws Exception {
+        super.setUp();
+        setWaitForFile(new File("Test.ref"));
+    }
+
+    public void testNameService() throws Exception {
+        runServerClientTest(SERVER_CLASS, CLIENT_CLASS);
+    }
+}
+
+

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

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

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

Added: incubator/yoko/trunk/core/src/test/java/test/tnaming/Client.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/test/java/test/tnaming/Client.java?rev=420864&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/test/java/test/tnaming/Client.java (added)
+++ incubator/yoko/trunk/core/src/test/java/test/tnaming/Client.java Tue Jul 11 07:18:08 2006
@@ -0,0 +1,171 @@
+/**
+ *
+ * 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.tnaming;
+
+import org.omg.CORBA.*;
+import org.omg.PortableServer.*;
+import org.omg.CosNaming.*;
+import org.omg.CosNaming.NamingContextPackage.*;
+import org.omg.CosNaming.NamingContextExtPackage.*;
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.IOException;
+
+public class Client extends test.common.TestBase {
+    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();
+
+        String refFile = "Test.ref";
+        String ref1;
+        String name1;
+        String ref2;
+        String name2;
+        String ref3;
+        String name3;
+        try {
+            BufferedReader file = new BufferedReader(new FileReader(refFile));
+            ref1 = file.readLine();
+            name1 = file.readLine();
+            ref2 = file.readLine();
+            name2 = file.readLine();
+            ref3 = file.readLine();
+            name3 = file.readLine();
+            file.close();
+        } catch (java.io.IOException ex) {
+            System.err.println("Can't read from '" + ex.getMessage() + "'");
+            return 1;
+        }
+        //
+        // Get "test" objects
+        //
+        org.omg.CORBA.Object obj1 = orb.string_to_object(ref1);
+        org.omg.CORBA.Object obj2 = orb.string_to_object(ref2);
+        org.omg.CORBA.Object obj3 = orb.string_to_object(ref3);
+        if (obj1 == null || obj2 == null || obj3 == null) {
+            System.err.println("cannot read IOR from Test.ref");
+            return 1;
+        }
+
+        Test test1 = TestHelper.narrow(obj1);
+        TEST(test1 != null);
+
+        Test test2 = TestHelper.narrow(obj2);
+        TEST(test2 != null);
+
+        Test test3 = TestHelper.narrow(obj3);
+        TEST(test3 != null);
+
+        org.omg.CORBA.Object obj = orb.resolve_initial_references("NameService");
+        NamingContextExt initialContext = NamingContextExtHelper.narrow(obj);
+
+        Test test1a = TestHelper.narrow(initialContext.resolve_str(name1));
+        TEST(test1a != null);
+        TEST(test1a.get_id().equals(test1.get_id()));
+
+        Test test2a = TestHelper.narrow(initialContext.resolve_str(name2));
+        TEST(test2a != null);
+        TEST(test2a.get_id().equals(test2.get_id()));
+
+        Test test3a = TestHelper.narrow(initialContext.resolve_str(name3));
+        TEST(test3a != null);
+        TEST(test3a.get_id().equals(test3.get_id()));
+
+        NamingContext nc = initialContext.bind_new_context(new NameComponent[] { new NameComponent("iterator", "") } );
+
+        for (int i = 0; i < 10; i++) {
+            String name = "Test" + i;
+            org.omg.CORBA.Object test = new Test_impl(poa, name)._this_object(orb);
+            nc.bind(new NameComponent[] { new NameComponent(name, "") }, test);
+        }
+
+        BindingListHolder blh = new BindingListHolder();
+        BindingIteratorHolder bih = new BindingIteratorHolder();
+        BindingHolder bh = new BindingHolder();
+
+        nc.list(10, blh, bih);
+
+        System.out.println("List returned count = " + blh.value.length);
+
+        TEST(blh.value.length == 10);
+        TEST(!bih.value.next_one(bh));
+        TEST(bh.value.binding_name.length == 0);
+
+        nc.list(9, blh, bih);
+
+        TEST(blh.value.length == 9);
+        TEST(bih.value.next_one(bh));
+        TEST(bh.value.binding_name.length == 1);
+
+        nc.list(11, blh, bih);
+
+        TEST(blh.value.length == 10);
+        TEST(!bih.value.next_one(bh));
+        TEST(bh.value.binding_name.length == 0);
+
+        // now shutdown the server orb
+        test1.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");
+
+        args = new String[] { "-ORBInitRef", "NameService=" + Server.NS_LOC };
+
+        int status = 0;
+        ORB orb = null;
+
+        try {
+            orb = ORB.init(args, props);
+            status = run(orb, args);
+        } 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/tnaming/Client.java
------------------------------------------------------------------------------
    svn:eol-style = native

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

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

Added: incubator/yoko/trunk/core/src/test/java/test/tnaming/Server.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/test/java/test/tnaming/Server.java?rev=420864&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/test/java/test/tnaming/Server.java (added)
+++ incubator/yoko/trunk/core/src/test/java/test/tnaming/Server.java Tue Jul 11 07:18:08 2006
@@ -0,0 +1,234 @@
+/**
+ *
+ * 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.tnaming;
+
+import org.omg.CORBA.*;
+import org.omg.PortableServer.*;
+import org.apache.yoko.orb.CosNaming.tnaming.TransientNameService;
+import org.apache.yoko.orb.CosNaming.tnaming.TransientServiceException;
+import org.omg.CosNaming.*;
+import org.omg.CosNaming.NamingContextPackage.*;
+import org.omg.CosNaming.NamingContextExtPackage.*;
+
+import java.io.PrintWriter;
+import java.io.IOException;
+
+public class Server extends test.common.TestBase {
+    public static final int NS_PORT = 40001;
+    public static final String NS_LOC = "corbaloc::localhost:40001/TNameService";
+
+    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();
+
+        System.out.println("Attempting to resolve NameService reference");
+        org.omg.CORBA.Object obj = orb.resolve_initial_references("NameService");
+        System.out.println("Resolved NameService reference=" + obj);
+        NamingContextExt initialContext = NamingContextExtHelper.narrow(obj);
+
+        NameComponent level1 = new NameComponent("level1", "test");
+        NameComponent level2 = new NameComponent("level2", "");
+
+        NameComponent ncTest1 = new NameComponent("Test1", "");
+        NameComponent ncTest2 = new NameComponent("Test2", "");
+        NameComponent ncTest3 = new NameComponent("Test3", "");
+
+
+        NamingContext nc1 = initialContext.new_context();
+
+        System.out.println("Binding context level1");
+        initialContext.bind_context(new NameComponent[] { level1 }, nc1);
+
+        NamingContext nc2 = initialContext.bind_new_context(new NameComponent[] { level1, level2} );
+
+        try {
+            org.omg.CORBA.Object o = initialContext.resolve(new NameComponent[] { ncTest1 });
+            TEST(false);
+        } catch (NotFound e) {
+            // expected exception
+        }
+
+        //
+        // Create implementation objects
+        //
+        org.omg.CORBA.Object test1 = new Test_impl(poa, "Test1")._this_object(orb);
+        org.omg.CORBA.Object test2 = new Test_impl(poa, "Test2")._this_object(orb);
+        org.omg.CORBA.Object test3 = new Test_impl(poa, "Test3")._this_object(orb);
+        org.omg.CORBA.Object test3a = new Test_impl(poa, "Test3a")._this_object(orb);
+
+        try {
+            org.omg.CORBA.Object o = initialContext.resolve(new NameComponent[] { ncTest1 });
+            TEST(false);
+        } catch (NotFound e) {
+            // expected exception
+        }
+
+        initialContext.bind(new NameComponent[] { ncTest1 }, test1);
+
+        try {
+            org.omg.CORBA.Object o = initialContext.resolve(new NameComponent[] { ncTest1 });
+            Test test = TestHelper.narrow(o);
+            TEST(test.get_id().equals("Test1"));
+        } catch (NotFound e) {
+            TEST(false);
+        }
+
+        nc1.bind(new NameComponent[] { ncTest2 }, test2);
+
+        try {
+            org.omg.CORBA.Object o = initialContext.resolve(new NameComponent[] { level1, ncTest2 });
+            Test test = TestHelper.narrow(o);
+            TEST(test.get_id().equals("Test2"));
+        } catch (NotFound e) {
+            TEST(false);
+        }
+
+        initialContext.bind(new NameComponent[] { level1, level2, ncTest3 }, test3);
+
+        try {
+            org.omg.CORBA.Object o = initialContext.resolve(new NameComponent[] { level1, level2, ncTest3 });
+            Test test = TestHelper.narrow(o);
+            TEST(test.get_id().equals("Test3"));
+        } catch (NotFound e) {
+            TEST(false);
+        }
+
+        nc2.rebind(new NameComponent[] { ncTest3 }, test3a);
+
+        try {
+            org.omg.CORBA.Object o = initialContext.resolve(new NameComponent[] { level1, level2, ncTest3 });
+            Test test = TestHelper.narrow(o);
+            TEST(test.get_id().equals("Test3a"));
+        } catch (NotFound e) {
+            TEST(false);
+        }
+
+        initialContext.unbind(new NameComponent[] { level1, level2, ncTest3 });
+
+        try {
+            org.omg.CORBA.Object o = nc2.resolve(new NameComponent[] { ncTest3 });
+            TEST(false);
+        } catch (NotFound e) {
+            // expected exception
+        }
+
+        nc2.bind(new NameComponent[] { ncTest3 }, test3);
+        nc1.unbind(new NameComponent[] { level2 });
+
+        try {
+            org.omg.CORBA.Object o = initialContext.resolve(new NameComponent[] { level1, level2, ncTest3 });
+            TEST(false);
+        } catch (NotFound e) {
+            // expected exception
+        }
+
+        nc1.rebind_context(new NameComponent[] { level2 }, nc2);
+
+
+        //
+        // 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 {
+            java.io.FileOutputStream file = new java.io.FileOutputStream(
+                    refFile);
+            java.io.PrintWriter out = new java.io.PrintWriter(file);
+            writeRef(orb, out, test1, initialContext, new NameComponent[] { ncTest1 });
+            writeRef(orb, out, test2, initialContext, new NameComponent[] { level1, ncTest2 });
+            writeRef(orb, out, test3, initialContext, new NameComponent[] { level1, level2, ncTest3 });
+            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;
+    }
+
+    private static void writeRef(ORB orb, PrintWriter out, org.omg.CORBA.Object obj, NamingContextExt context, NameComponent[] name) throws InvalidName {
+        String ref = orb.object_to_string(obj);
+        out.println(ref);
+        String nameString = context.to_string(name);
+        out.println(nameString);
+    }
+
+    public static void main(String args[]) throws TransientServiceException {
+
+        ORB orb = null;
+        int status = 0;
+        try {
+            TransientNameService service = new TransientNameService("localhost", NS_PORT);
+            System.out.println("Starting transient name service");
+            service.run();
+            System.out.println("Transient name service started");
+
+            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("yoko.orb.oa.endpoint", "iiop --host localhost --port 40002");
+
+            args = new String[] { "-ORBInitRef", "NameService=" + NS_LOC };
+
+
+            orb = ORB.init(args, props);
+            status = run(orb, args);
+        } catch (Throwable 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/tnaming/Server.java
------------------------------------------------------------------------------
    svn:eol-style = native

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

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

Added: incubator/yoko/trunk/core/src/test/java/test/tnaming/Test.idl
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/test/java/test/tnaming/Test.idl?rev=420864&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/test/java/test/tnaming/Test.idl (added)
+++ incubator/yoko/trunk/core/src/test/java/test/tnaming/Test.idl Tue Jul 11 07:18:08 2006
@@ -0,0 +1,23 @@
+//
+//
+// 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
+{
+    string get_id();
+    void shutdown();
+};
+

Added: incubator/yoko/trunk/core/src/test/java/test/tnaming/Test.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/test/java/test/tnaming/Test.java?rev=420864&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/test/java/test/tnaming/Test.java (added)
+++ incubator/yoko/trunk/core/src/test/java/test/tnaming/Test.java Tue Jul 11 07:18:08 2006
@@ -0,0 +1,36 @@
+/**
+ *
+ * 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.tnaming;
+
+/**
+* Test.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.1"
+* from Test.idl
+* Wednesday, July 5, 2006 12:46:41 PM EDT
+*/
+
+
+//
+public interface Test extends TestOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity
+{
+} // interface Test

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

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

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

Added: incubator/yoko/trunk/core/src/test/java/test/tnaming/TestHelper.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/test/java/test/tnaming/TestHelper.java?rev=420864&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/test/java/test/tnaming/TestHelper.java (added)
+++ incubator/yoko/trunk/core/src/test/java/test/tnaming/TestHelper.java Tue Jul 11 07:18:08 2006
@@ -0,0 +1,93 @@
+/**
+ *
+ * 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.tnaming;
+
+/**
+* TestHelper.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.1"
+* from Test.idl
+* Wednesday, July 5, 2006 12:46:41 PM EDT
+*/
+
+
+//
+abstract public class TestHelper
+{
+  private static String  _id = "IDL:Test:1.0";
+
+  public static void insert (org.omg.CORBA.Any a, Test that)
+  {
+    org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
+    a.type (type ());
+    write (out, that);
+    a.read_value (out.create_input_stream (), type ());
+  }
+
+  public static Test extract (org.omg.CORBA.Any a)
+  {
+    return read (a.create_input_stream ());
+  }
+
+  private static org.omg.CORBA.TypeCode __typeCode = null;
+  synchronized public static org.omg.CORBA.TypeCode type ()
+  {
+    if (__typeCode == null)
+    {
+      __typeCode = org.omg.CORBA.ORB.init ().create_interface_tc (TestHelper.id (), "Test");
+    }
+    return __typeCode;
+  }
+
+  public static String id ()
+  {
+    return _id;
+  }
+
+  public static Test read (org.omg.CORBA.portable.InputStream istream)
+  {
+    return narrow (istream.read_Object (_TestStub.class));
+  }
+
+  public static void write (org.omg.CORBA.portable.OutputStream ostream, Test value)
+  {
+    ostream.write_Object ((org.omg.CORBA.Object) value);
+  }
+
+  public static Test narrow (org.omg.CORBA.Object obj)
+  {
+    if (obj == null)
+      return null;
+    else if (obj instanceof Test)
+      return (Test)obj;
+    else if (!obj._is_a (id ()))
+      throw new org.omg.CORBA.BAD_PARAM ();
+    else
+    {
+      org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate ();
+      _TestStub stub = new _TestStub ();
+      stub._set_delegate(delegate);
+      return stub;
+    }
+  }
+
+}

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

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

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

Added: incubator/yoko/trunk/core/src/test/java/test/tnaming/TestHolder.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/test/java/test/tnaming/TestHolder.java?rev=420864&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/test/java/test/tnaming/TestHolder.java (added)
+++ incubator/yoko/trunk/core/src/test/java/test/tnaming/TestHolder.java Tue Jul 11 07:18:08 2006
@@ -0,0 +1,62 @@
+/**
+ *
+ * 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.tnaming;
+
+/**
+* TestHolder.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.1"
+* from Test.idl
+* Wednesday, July 5, 2006 12:46:41 PM EDT
+*/
+
+
+//
+public final class TestHolder implements org.omg.CORBA.portable.Streamable
+{
+  public Test value = null;
+
+  public TestHolder ()
+  {
+  }
+
+  public TestHolder (Test initialValue)
+  {
+    value = initialValue;
+  }
+
+  public void _read (org.omg.CORBA.portable.InputStream i)
+  {
+    value = TestHelper.read (i);
+  }
+
+  public void _write (org.omg.CORBA.portable.OutputStream o)
+  {
+    TestHelper.write (o, value);
+  }
+
+  public org.omg.CORBA.TypeCode _type ()
+  {
+    return TestHelper.type ();
+  }
+
+}

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

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

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

Added: incubator/yoko/trunk/core/src/test/java/test/tnaming/TestOperations.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/test/java/test/tnaming/TestOperations.java?rev=420864&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/test/java/test/tnaming/TestOperations.java (added)
+++ incubator/yoko/trunk/core/src/test/java/test/tnaming/TestOperations.java Tue Jul 11 07:18:08 2006
@@ -0,0 +1,38 @@
+/**
+ *
+ * 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.tnaming;
+
+/**
+* TestOperations.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.1"
+* from Test.idl
+* Wednesday, July 5, 2006 12:46:41 PM EDT
+*/
+
+
+//
+public interface TestOperations
+{
+  String get_id ();
+  void shutdown ();
+} // interface TestOperations

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

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

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

Added: incubator/yoko/trunk/core/src/test/java/test/tnaming/TestPOA.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/test/java/test/tnaming/TestPOA.java?rev=420864&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/test/java/test/tnaming/TestPOA.java (added)
+++ incubator/yoko/trunk/core/src/test/java/test/tnaming/TestPOA.java Tue Jul 11 07:18:08 2006
@@ -0,0 +1,103 @@
+/**
+ *
+ * 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.tnaming;
+
+/**
+* TestPOA.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.1"
+* from Test.idl
+* Wednesday, July 5, 2006 12:46:25 PM EDT
+*/
+
+
+//
+public abstract class TestPOA extends org.omg.PortableServer.Servant
+ implements TestOperations, org.omg.CORBA.portable.InvokeHandler
+{
+
+  // Constructors
+
+  private static java.util.Hashtable _methods = new java.util.Hashtable ();
+  static
+  {
+    _methods.put ("get_id", new java.lang.Integer (0));
+    _methods.put ("shutdown", new java.lang.Integer (1));
+  }
+
+  public org.omg.CORBA.portable.OutputStream _invoke (String $method,
+                                org.omg.CORBA.portable.InputStream in,
+                                org.omg.CORBA.portable.ResponseHandler $rh)
+  {
+    org.omg.CORBA.portable.OutputStream out = null;
+    java.lang.Integer __method = (java.lang.Integer)_methods.get ($method);
+    if (__method == null)
+      throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
+
+    switch (__method.intValue ())
+    {
+       case 0:  // Test/get_id
+       {
+         String $result = null;
+         $result = this.get_id ();
+         out = $rh.createReply();
+         out.write_string ($result);
+         break;
+       }
+
+       case 1:  // Test/shutdown
+       {
+         this.shutdown ();
+         out = $rh.createReply();
+         break;
+       }
+
+       default:
+         throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
+    }
+
+    return out;
+  } // _invoke
+
+  // Type-specific CORBA::Object operations
+  private static String[] __ids = {
+    "IDL:Test:1.0"};
+
+  public String[] _all_interfaces (org.omg.PortableServer.POA poa, byte[] objectId)
+  {
+    return (String[])__ids.clone ();
+  }
+
+  public Test _this()
+  {
+    return TestHelper.narrow(
+    super._this_object());
+  }
+
+  public Test _this(org.omg.CORBA.ORB orb)
+  {
+    return TestHelper.narrow(
+    super._this_object(orb));
+  }
+
+
+} // class TestPOA

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

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

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

Added: incubator/yoko/trunk/core/src/test/java/test/tnaming/Test_impl.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/test/java/test/tnaming/Test_impl.java?rev=420864&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/test/java/test/tnaming/Test_impl.java (added)
+++ incubator/yoko/trunk/core/src/test/java/test/tnaming/Test_impl.java Tue Jul 11 07:18:08 2006
@@ -0,0 +1,54 @@
+/**
+ *
+ * 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.tnaming;
+
+public class Test_impl extends TestPOA {
+    private String name_;
+
+    private org.omg.PortableServer.POA poa_;
+
+    private static void TEST(boolean expr) {
+        if (!expr)
+            throw new test.common.TestException();
+    }
+
+    public Test_impl(org.omg.PortableServer.POA poa, String name) {
+        poa_ = poa;
+        name_ = name;
+    }
+
+    public org.omg.PortableServer.POA _default_POA() {
+        if (poa_ != null)
+            return poa_;
+        else
+            return super._default_POA();
+    }
+
+    public String get_id () {
+        return name_;
+    }
+
+    public void shutdown() {
+        _orb().shutdown(false);
+    }
+}

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

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

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

Added: incubator/yoko/trunk/core/src/test/java/test/tnaming/_TestStub.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/test/java/test/tnaming/_TestStub.java?rev=420864&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/test/java/test/tnaming/_TestStub.java (added)
+++ incubator/yoko/trunk/core/src/test/java/test/tnaming/_TestStub.java Tue Jul 11 07:18:08 2006
@@ -0,0 +1,100 @@
+/**
+ *
+ * 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.tnaming;
+
+/**
+* _TestStub.java .
+* Generated by the IDL-to-Java compiler (portable), version "3.1"
+* from Test.idl
+* Wednesday, July 5, 2006 12:46:41 PM EDT
+*/
+
+
+//
+public class _TestStub extends org.omg.CORBA.portable.ObjectImpl implements Test
+{
+
+  public String get_id ()
+  {
+            org.omg.CORBA.portable.InputStream $in = null;
+            try {
+                org.omg.CORBA.portable.OutputStream $out = _request ("get_id", true);
+                $in = _invoke ($out);
+                String $result = $in.read_string ();
+                return $result;
+            } catch (org.omg.CORBA.portable.ApplicationException $ex) {
+                $in = $ex.getInputStream ();
+                String _id = $ex.getId ();
+                throw new org.omg.CORBA.MARSHAL (_id);
+            } catch (org.omg.CORBA.portable.RemarshalException $rm) {
+                return get_id (        );
+            } finally {
+                _releaseReply ($in);
+            }
+  } // get_id
+
+  public void shutdown ()
+  {
+            org.omg.CORBA.portable.InputStream $in = null;
+            try {
+                org.omg.CORBA.portable.OutputStream $out = _request ("shutdown", true);
+                $in = _invoke ($out);
+                return;
+            } catch (org.omg.CORBA.portable.ApplicationException $ex) {
+                $in = $ex.getInputStream ();
+                String _id = $ex.getId ();
+                throw new org.omg.CORBA.MARSHAL (_id);
+            } catch (org.omg.CORBA.portable.RemarshalException $rm) {
+                shutdown (        );
+            } finally {
+                _releaseReply ($in);
+            }
+  } // shutdown
+
+  // Type-specific CORBA::Object operations
+  private static String[] __ids = {
+    "IDL:Test:1.0"};
+
+  public String[] _ids ()
+  {
+    return (String[])__ids.clone ();
+  }
+
+  private void readObject (java.io.ObjectInputStream s) throws java.io.IOException
+  {
+     String str = s.readUTF ();
+     String[] args = null;
+     java.util.Properties props = null;
+     org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str);
+     org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate ();
+     _set_delegate (delegate);
+  }
+
+  private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException
+  {
+     String[] args = null;
+     java.util.Properties props = null;
+     String str = org.omg.CORBA.ORB.init (args, props).object_to_string (this);
+     s.writeUTF (str);
+  }
+} // class _TestStub

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

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

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

Added: incubator/yoko/trunk/core/src/test/java/test/tnaming/build.xml
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/test/java/test/tnaming/build.xml?rev=420864&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/test/java/test/tnaming/build.xml (added)
+++ incubator/yoko/trunk/core/src/test/java/test/tnaming/build.xml Tue Jul 11 07:18:08 2006
@@ -0,0 +1,31 @@
+<project name="Orbacus 4.3" default="build" basedir=".">
+
+    <property name="top.dir" value="../.."/>
+    <property name="sub.dir" value=".."/>
+    <import file="${top.dir}/imports.xml"/>
+    
+    <!-- initialize the building -->
+    <target name="init">
+        <mkdir dir="generated"/>
+        <mkdir dir="../../lib"/>
+    </target>
+
+    <!-- build the source -->
+    <target name="build" depends="init">
+        <ob.javac destdir="../../lib">
+            <include name="*.java"/>
+            <include name="generated/test/local/**"/>
+        </ob.javac>
+    </target>
+
+    <!-- clean up the built items -->
+    <target name="clean">
+        <antcall target="cleanup.demos.tests"/>
+        <delete dir="../../lib/test/local" failonerror="false"/>
+    </target>
+
+    <!-- run the demo -->
+    <target name="run" depends="build">
+    </target>
+    
+</project>

Propchange: incubator/yoko/trunk/core/src/test/java/test/tnaming/build.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/yoko/trunk/core/src/test/java/test/tnaming/build.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/yoko/trunk/core/src/test/java/test/tnaming/build.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/yoko/trunk/core/src/test/java/test/tnaming/runtest
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/test/java/test/tnaming/runtest?rev=420864&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/test/java/test/tnaming/runtest (added)
+++ incubator/yoko/trunk/core/src/test/java/test/tnaming/runtest Tue Jul 11 07:18:08 2006
@@ -0,0 +1,123 @@
+#!/bin/sh
+# **********************************************************************
+#
+# Copyright (c) 2005-2006
+# IONA Technologies PLC
+# Dublin, Ireland and Waltham, MA, USA
+#
+# All Rights Reserved
+#
+# Licensed to apache under Apache 2.0 License - 2006
+# **********************************************************************
+
+#
+# Try to find top-level directory
+#
+if test -f ob/src/com/ooc/CORBA/ORB.java
+then
+    top_srcdir=ob
+elif test -f src/com/ooc/CORBA/ORB.java
+then
+    top_srcdir=.
+elif test -f ../src/com/ooc/CORBA/ORB.java
+then
+    top_srcdir=..
+elif test -f ../../src/com/ooc/CORBA/ORB.java
+then
+    top_srcdir=../..
+elif test -f ../../../src/com/ooc/CORBA/ORB.java
+then
+    top_srcdir=../../..
+elif test -f ../../../../src/com/ooc/CORBA/ORB.java
+then
+    top_srcdir=../../../..
+else
+    $echo "$0: can't find top-level directory"
+    exit
+fi
+
+#
+# Run standard init script
+#
+. $top_srcdir/config/sh.init
+. $top_srcdir/config/testutil.sh
+
+#
+# Set name of reference file
+#
+ref=Test.ref
+
+#
+# Set Java CLASSPATH
+#
+CLASSPATH="$top_srcdir/lib${SEPARATOR}$CLASSPATH"
+export CLASSPATH
+
+#
+# Set the "java.endorsed.dirs" property
+#
+set_java_endorsed_dirs
+
+client="$JAVA test.local.Client"
+server="$JAVA test.local.Server"
+
+#
+# Delete old log files
+#
+rm -f local_client.log
+rm -f local_server.log
+
+#
+# Display info
+#
+$echo
+$echo Java CLASSPATH is \"CLASSPATH=$CLASSPATH\"
+$echo Client command is \"$client\"
+$echo Server command is \"$server\"
+
+#
+# Start server
+#
+$echo
+$echo "Waiting for server to start up... \c"
+rm -f $ref
+( $server & echo $! > srvid ) 2>&1 | tee -a local_server.log &
+count=0
+while test ! -s $ref -a $count -lt 8
+do
+    sleep 1
+    count=`expr $count + 1`
+done
+if test ! -s $ref
+then
+    $echo "Failed!"
+    $echo "(Server was not started)"
+    exit
+else
+    $echo "Done!"
+fi
+
+#
+# Start client
+#
+$client 2>&1 | tee -a local_client.log
+
+#
+# Wait for server deactivation
+#
+$echo "Waiting for server to deactivate... \c"
+count=0
+while test -r $ref -a $count -lt 3
+do
+    sleep 1
+    count=`expr $count + 1`
+done
+
+if test -r $ref
+then
+    $echo "Failed!"
+    $echo "(Server was not deactivated by client - deactivating server now)"
+    deactivate
+else
+    $echo "Done!"
+fi



Mime
View raw message