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 [2/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...
Added: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestORBInitializer.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestORBInitializer.java?rev=417411&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestORBInitializer.java (added)
+++ incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestORBInitializer.java Tue Jun 27 03:42:37 2006
@@ -0,0 +1,76 @@
+/**
+ *
+ * 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.LocalObject;
+import org.omg.PortableInterceptor.ORBInitInfo;
+import org.omg.PortableInterceptor.ORBInitInfoPackage.DuplicateName;
+import org.omg.PortableInterceptor.ORBInitializer;
+
+
+public class TestORBInitializer extends LocalObject implements ORBInitializer {
+ public TestORBInitializer() {
+ }
+
+ /**
+ * Called during ORB initialization. If it is expected that initial
+ * services registered by an interceptor will be used by other
+ * interceptors, then those initial services shall be registered at
+ * this point via calls to
+ * <code>ORBInitInfo.register_initial_reference</code>.
+ *
+ * @param info provides initialization attributes and operations by
+ * which Interceptors can be registered.
+ */
+ public void pre_init(ORBInitInfo info) {
+ }
+
+ /**
+ * Called during ORB initialization. If a service must resolve initial
+ * references as part of its initialization, it can assume that all
+ * initial references will be available at this point.
+ * <p/>
+ * Calling the <code>post_init</code> operations is not the final
+ * task of ORB initialization. The final task, following the
+ * <code>post_init</code> calls, is attaching the lists of registered
+ * interceptors to the ORB. Therefore, the ORB does not contain the
+ * interceptors during calls to <code>post_init</code>. If an
+ * ORB-mediated call is made from within <code>post_init</code>, no
+ * request interceptors will be invoked on that call.
+ * Likewise, if an operation is performed which causes an IOR to be
+ * created, no IOR interceptors will be invoked.
+ *
+ * @param info provides initialization attributes and
+ * operations by which Interceptors can be registered.
+ */
+ public void post_init(ORBInitInfo info) {
+ try {
+ try {
+ info.add_server_request_interceptor(new ServiceContextInterceptor());
+ } catch (DuplicateName dn) {
+ }
+ } catch (RuntimeException re) {
+ throw re;
+ }
+ }
+}
+
Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestORBInitializer.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestORBInitializer.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestORBInitializer.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestOperations.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestOperations.java?rev=417411&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestOperations.java (added)
+++ incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestOperations.java Tue Jun 27 03:42:37 2006
@@ -0,0 +1,79 @@
+/**
+ *
+ * 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 TestOperations
+{
+ //
+ // IDL:Test/say:1.0
+ //
+ /***/
+
+ void
+ say(String s);
+
+ //
+ // IDL:Test/intest:1.0
+ //
+ /***/
+
+ void
+ intest(Test t);
+
+ //
+ // IDL:Test/inany:1.0
+ //
+ /***/
+
+ void
+ inany(org.omg.CORBA.Any a);
+
+ //
+ // IDL:Test/outany:1.0
+ //
+ /***/
+
+ void
+ outany(org.omg.CORBA.AnyHolder a);
+
+ //
+ // IDL:Test/returntest:1.0
+ //
+ /***/
+
+ Test
+ returntest();
+
+ //
+ // IDL:Test/shutdown:1.0
+ //
+ /***/
+
+ void
+ shutdown();
+}
Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestOperations.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestOperations.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestOperations.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestPOA.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestPOA.java?rev=417411&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestPOA.java (added)
+++ incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestPOA.java Tue Jun 27 03:42:37 2006
@@ -0,0 +1,201 @@
+/**
+ *
+ * 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 abstract class TestPOA
+ extends org.omg.PortableServer.Servant
+ implements org.omg.CORBA.portable.InvokeHandler,
+ TestOperations
+{
+ static final String[] _ob_ids_ =
+ {
+ "IDL:Test:1.0",
+ };
+
+ public Test
+ _this()
+ {
+ return TestHelper.narrow(super._this_object());
+ }
+
+ public Test
+ _this(org.omg.CORBA.ORB orb)
+ {
+ return TestHelper.narrow(super._this_object(orb));
+ }
+
+ public String[]
+ _all_interfaces(org.omg.PortableServer.POA poa, byte[] objectId)
+ {
+ return _ob_ids_;
+ }
+
+ public org.omg.CORBA.portable.OutputStream
+ _invoke(String opName,
+ org.omg.CORBA.portable.InputStream in,
+ org.omg.CORBA.portable.ResponseHandler handler)
+ {
+ final String[] _ob_names =
+ {
+ "inany",
+ "intest",
+ "outany",
+ "returntest",
+ "say",
+ "shutdown"
+ };
+
+ int _ob_left = 0;
+ int _ob_right = _ob_names.length;
+ int _ob_index = -1;
+
+ while(_ob_left < _ob_right)
+ {
+ int _ob_m = (_ob_left + _ob_right) / 2;
+ int _ob_res = _ob_names[_ob_m].compareTo(opName);
+ if(_ob_res == 0)
+ {
+ _ob_index = _ob_m;
+ break;
+ }
+ else if(_ob_res > 0)
+ _ob_right = _ob_m;
+ else
+ _ob_left = _ob_m + 1;
+ }
+
+ if(_ob_index == -1 && opName.charAt(0) == '_')
+ {
+ _ob_left = 0;
+ _ob_right = _ob_names.length;
+ String _ob_ami_op =
+ opName.substring(1);
+
+ while(_ob_left < _ob_right)
+ {
+ int _ob_m = (_ob_left + _ob_right) / 2;
+ int _ob_res = _ob_names[_ob_m].compareTo(_ob_ami_op);
+ if(_ob_res == 0)
+ {
+ _ob_index = _ob_m;
+ break;
+ }
+ else if(_ob_res > 0)
+ _ob_right = _ob_m;
+ else
+ _ob_left = _ob_m + 1;
+ }
+ }
+
+ switch(_ob_index)
+ {
+ case 0: // inany
+ return _OB_op_inany(in, handler);
+
+ case 1: // intest
+ return _OB_op_intest(in, handler);
+
+ case 2: // outany
+ return _OB_op_outany(in, handler);
+
+ case 3: // returntest
+ return _OB_op_returntest(in, handler);
+
+ case 4: // say
+ return _OB_op_say(in, handler);
+
+ case 5: // shutdown
+ return _OB_op_shutdown(in, handler);
+ }
+
+ throw new org.omg.CORBA.BAD_OPERATION();
+ }
+
+ private org.omg.CORBA.portable.OutputStream
+ _OB_op_inany(org.omg.CORBA.portable.InputStream in,
+ org.omg.CORBA.portable.ResponseHandler handler)
+ {
+ org.omg.CORBA.portable.OutputStream out = null;
+ org.omg.CORBA.Any _ob_a0 = in.read_any();
+ inany(_ob_a0);
+ out = handler.createReply();
+ return out;
+ }
+
+ private org.omg.CORBA.portable.OutputStream
+ _OB_op_intest(org.omg.CORBA.portable.InputStream in,
+ org.omg.CORBA.portable.ResponseHandler handler)
+ {
+ org.omg.CORBA.portable.OutputStream out = null;
+ Test _ob_a0 = TestHelper.read(in);
+ intest(_ob_a0);
+ out = handler.createReply();
+ return out;
+ }
+
+ private org.omg.CORBA.portable.OutputStream
+ _OB_op_outany(org.omg.CORBA.portable.InputStream in,
+ org.omg.CORBA.portable.ResponseHandler handler)
+ {
+ org.omg.CORBA.portable.OutputStream out = null;
+ org.omg.CORBA.AnyHolder _ob_ah0 = new org.omg.CORBA.AnyHolder();
+ outany(_ob_ah0);
+ out = handler.createReply();
+ out.write_any(_ob_ah0.value);
+ return out;
+ }
+
+ private org.omg.CORBA.portable.OutputStream
+ _OB_op_returntest(org.omg.CORBA.portable.InputStream in,
+ org.omg.CORBA.portable.ResponseHandler handler)
+ {
+ org.omg.CORBA.portable.OutputStream out = null;
+ Test _ob_r = returntest();
+ out = handler.createReply();
+ TestHelper.write(out, _ob_r);
+ return out;
+ }
+
+ private org.omg.CORBA.portable.OutputStream
+ _OB_op_say(org.omg.CORBA.portable.InputStream in,
+ org.omg.CORBA.portable.ResponseHandler handler)
+ {
+ org.omg.CORBA.portable.OutputStream out = null;
+ String _ob_a0 = in.read_string();
+ say(_ob_a0);
+ out = handler.createReply();
+ return out;
+ }
+
+ private org.omg.CORBA.portable.OutputStream
+ _OB_op_shutdown(org.omg.CORBA.portable.InputStream in,
+ org.omg.CORBA.portable.ResponseHandler handler)
+ {
+ org.omg.CORBA.portable.OutputStream out = null;
+ shutdown();
+ out = handler.createReply();
+ return out;
+ }
+}
Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestPOA.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestPOA.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestPOA.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestPOATie.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestPOATie.java?rev=417411&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestPOATie.java (added)
+++ incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestPOATie.java Tue Jun 27 03:42:37 2006
@@ -0,0 +1,119 @@
+/**
+ *
+ * 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 class TestPOATie extends TestPOA
+{
+ private TestOperations _ob_delegate_;
+ private org.omg.PortableServer.POA _ob_poa_;
+
+ public
+ TestPOATie(TestOperations delegate)
+ {
+ _ob_delegate_ = delegate;
+ }
+
+ public
+ TestPOATie(TestOperations delegate, org.omg.PortableServer.POA poa)
+ {
+ _ob_delegate_ = delegate;
+ _ob_poa_ = poa;
+ }
+
+ public TestOperations
+ _delegate()
+ {
+ return _ob_delegate_;
+ }
+
+ public void
+ _delegate(TestOperations delegate)
+ {
+ _ob_delegate_ = delegate;
+ }
+
+ public org.omg.PortableServer.POA
+ _default_POA()
+ {
+ if(_ob_poa_ != null)
+ return _ob_poa_;
+ else
+ return super._default_POA();
+ }
+
+ //
+ // IDL:Test/say:1.0
+ //
+ public void
+ say(String s)
+ {
+ _ob_delegate_.say(s);
+ }
+
+ //
+ // IDL:Test/intest:1.0
+ //
+ public void
+ intest(Test t)
+ {
+ _ob_delegate_.intest(t);
+ }
+
+ //
+ // IDL:Test/inany:1.0
+ //
+ public void
+ inany(org.omg.CORBA.Any a)
+ {
+ _ob_delegate_.inany(a);
+ }
+
+ //
+ // IDL:Test/outany:1.0
+ //
+ public void
+ outany(org.omg.CORBA.AnyHolder a)
+ {
+ _ob_delegate_.outany(a);
+ }
+
+ //
+ // IDL:Test/returntest:1.0
+ //
+ public Test
+ returntest()
+ {
+ return _ob_delegate_.returntest();
+ }
+
+ //
+ // IDL:Test/shutdown:1.0
+ //
+ public void
+ shutdown()
+ {
+ _ob_delegate_.shutdown();
+ }
+}
Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestPOATie.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestPOATie.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/TestPOATie.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/Test_impl.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/test/java/test/iiopplugin/Test_impl.java?rev=417411&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/test/java/test/iiopplugin/Test_impl.java (added)
+++ incubator/yoko/trunk/core/src/test/java/test/iiopplugin/Test_impl.java Tue Jun 27 03:42:37 2006
@@ -0,0 +1,73 @@
+/**
+ *
+ * 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 Test_impl extends TestPOA {
+ private org.omg.PortableServer.POA poa_;
+
+ private Test localTest_;
+
+ private static void TEST(boolean expr) {
+ if (!expr)
+ throw new test.common.TestException();
+ }
+
+ public Test_impl(org.omg.PortableServer.POA poa) {
+ poa_ = poa;
+ localTest_ = new LocalTest_impl();
+ }
+
+ public org.omg.PortableServer.POA _default_POA() {
+ if (poa_ != null)
+ return poa_;
+ else
+ return super._default_POA();
+ }
+
+ public void say(String s) {
+ // System.out.println(s);
+ }
+
+ public void intest(Test t) {
+ t.say("hi");
+ }
+
+ public void inany(org.omg.CORBA.Any a) {
+ Test t = TestHelper.extract(a);
+ }
+
+ public void outany(org.omg.CORBA.AnyHolder a) {
+ a.value = _orb().create_any();
+ TestHelper.insert(a.value, localTest_);
+ }
+
+ public Test returntest() {
+ return localTest_;
+ }
+
+ public void shutdown() {
+ _orb().shutdown(false);
+ if (!ServerPlugin.testPassed())
+ throw new test.common.TestException();
+ }
+}
Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/Test_impl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/Test_impl.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/Test_impl.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/_TestStub.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/test/java/test/iiopplugin/_TestStub.java?rev=417411&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/test/java/test/iiopplugin/_TestStub.java (added)
+++ incubator/yoko/trunk/core/src/test/java/test/iiopplugin/_TestStub.java Tue Jun 27 03:42:37 2006
@@ -0,0 +1,365 @@
+/**
+ *
+ * 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 class _TestStub extends org.omg.CORBA.portable.ObjectImpl
+ implements Test
+{
+ private static final String[] _ob_ids_ =
+ {
+ "IDL:Test:1.0",
+ };
+
+ public String[]
+ _ids()
+ {
+ return _ob_ids_;
+ }
+
+ final public static java.lang.Class _ob_opsClass = TestOperations.class;
+
+ //
+ // IDL:Test/say:1.0
+ //
+ public void
+ say(String _ob_a0)
+ {
+ while(true)
+ {
+ if(!this._is_local())
+ {
+ org.omg.CORBA.portable.OutputStream out = null;
+ org.omg.CORBA.portable.InputStream in = null;
+ try
+ {
+ out = _request("say", true);
+ out.write_string(_ob_a0);
+ in = _invoke(out);
+ return;
+ }
+ catch(org.omg.CORBA.portable.RemarshalException _ob_ex)
+ {
+ continue;
+ }
+ catch(org.omg.CORBA.portable.ApplicationException _ob_aex)
+ {
+ final String _ob_id = _ob_aex.getId();
+ in = _ob_aex.getInputStream();
+
+ throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _ob_id);
+ }
+ finally
+ {
+ _releaseReply(in);
+ }
+ }
+ else
+ {
+ org.omg.CORBA.portable.ServantObject _ob_so = _servant_preinvoke("say", _ob_opsClass);
+ if(_ob_so == null)
+ continue;
+ TestOperations _ob_self = (TestOperations)_ob_so.servant;
+ try
+ {
+ _ob_self.say(_ob_a0);
+ return;
+ }
+ finally
+ {
+ _servant_postinvoke(_ob_so);
+ }
+ }
+ }
+ }
+
+ //
+ // IDL:Test/intest:1.0
+ //
+ public void
+ intest(Test _ob_a0)
+ {
+ while(true)
+ {
+ if(!this._is_local())
+ {
+ org.omg.CORBA.portable.OutputStream out = null;
+ org.omg.CORBA.portable.InputStream in = null;
+ try
+ {
+ out = _request("intest", true);
+ TestHelper.write(out, _ob_a0);
+ in = _invoke(out);
+ return;
+ }
+ catch(org.omg.CORBA.portable.RemarshalException _ob_ex)
+ {
+ continue;
+ }
+ catch(org.omg.CORBA.portable.ApplicationException _ob_aex)
+ {
+ final String _ob_id = _ob_aex.getId();
+ in = _ob_aex.getInputStream();
+
+ throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _ob_id);
+ }
+ finally
+ {
+ _releaseReply(in);
+ }
+ }
+ else
+ {
+ org.omg.CORBA.portable.ServantObject _ob_so = _servant_preinvoke("intest", _ob_opsClass);
+ if(_ob_so == null)
+ continue;
+ TestOperations _ob_self = (TestOperations)_ob_so.servant;
+ try
+ {
+ _ob_self.intest(_ob_a0);
+ return;
+ }
+ finally
+ {
+ _servant_postinvoke(_ob_so);
+ }
+ }
+ }
+ }
+
+ //
+ // IDL:Test/inany:1.0
+ //
+ public void
+ inany(org.omg.CORBA.Any _ob_a0)
+ {
+ while(true)
+ {
+ if(!this._is_local())
+ {
+ org.omg.CORBA.portable.OutputStream out = null;
+ org.omg.CORBA.portable.InputStream in = null;
+ try
+ {
+ out = _request("inany", true);
+ out.write_any(_ob_a0);
+ in = _invoke(out);
+ return;
+ }
+ catch(org.omg.CORBA.portable.RemarshalException _ob_ex)
+ {
+ continue;
+ }
+ catch(org.omg.CORBA.portable.ApplicationException _ob_aex)
+ {
+ final String _ob_id = _ob_aex.getId();
+ in = _ob_aex.getInputStream();
+
+ throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _ob_id);
+ }
+ finally
+ {
+ _releaseReply(in);
+ }
+ }
+ else
+ {
+ org.omg.CORBA.portable.ServantObject _ob_so = _servant_preinvoke("inany", _ob_opsClass);
+ if(_ob_so == null)
+ continue;
+ TestOperations _ob_self = (TestOperations)_ob_so.servant;
+ try
+ {
+ _ob_self.inany(_ob_a0);
+ return;
+ }
+ finally
+ {
+ _servant_postinvoke(_ob_so);
+ }
+ }
+ }
+ }
+
+ //
+ // IDL:Test/outany:1.0
+ //
+ public void
+ outany(org.omg.CORBA.AnyHolder _ob_ah0)
+ {
+ while(true)
+ {
+ if(!this._is_local())
+ {
+ org.omg.CORBA.portable.OutputStream out = null;
+ org.omg.CORBA.portable.InputStream in = null;
+ try
+ {
+ out = _request("outany", true);
+ in = _invoke(out);
+ _ob_ah0.value = in.read_any();
+ return;
+ }
+ catch(org.omg.CORBA.portable.RemarshalException _ob_ex)
+ {
+ continue;
+ }
+ catch(org.omg.CORBA.portable.ApplicationException _ob_aex)
+ {
+ final String _ob_id = _ob_aex.getId();
+ in = _ob_aex.getInputStream();
+
+ throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _ob_id);
+ }
+ finally
+ {
+ _releaseReply(in);
+ }
+ }
+ else
+ {
+ org.omg.CORBA.portable.ServantObject _ob_so = _servant_preinvoke("outany", _ob_opsClass);
+ if(_ob_so == null)
+ continue;
+ TestOperations _ob_self = (TestOperations)_ob_so.servant;
+ try
+ {
+ _ob_self.outany(_ob_ah0);
+ return;
+ }
+ finally
+ {
+ _servant_postinvoke(_ob_so);
+ }
+ }
+ }
+ }
+
+ //
+ // IDL:Test/returntest:1.0
+ //
+ public Test
+ returntest()
+ {
+ while(true)
+ {
+ if(!this._is_local())
+ {
+ org.omg.CORBA.portable.OutputStream out = null;
+ org.omg.CORBA.portable.InputStream in = null;
+ try
+ {
+ out = _request("returntest", true);
+ in = _invoke(out);
+ Test _ob_r = TestHelper.read(in);
+ return _ob_r;
+ }
+ catch(org.omg.CORBA.portable.RemarshalException _ob_ex)
+ {
+ continue;
+ }
+ catch(org.omg.CORBA.portable.ApplicationException _ob_aex)
+ {
+ final String _ob_id = _ob_aex.getId();
+ in = _ob_aex.getInputStream();
+
+ throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _ob_id);
+ }
+ finally
+ {
+ _releaseReply(in);
+ }
+ }
+ else
+ {
+ org.omg.CORBA.portable.ServantObject _ob_so = _servant_preinvoke("returntest", _ob_opsClass);
+ if(_ob_so == null)
+ continue;
+ TestOperations _ob_self = (TestOperations)_ob_so.servant;
+ try
+ {
+ return _ob_self.returntest();
+ }
+ finally
+ {
+ _servant_postinvoke(_ob_so);
+ }
+ }
+ }
+ }
+
+ //
+ // IDL:Test/shutdown:1.0
+ //
+ public void
+ shutdown()
+ {
+ while(true)
+ {
+ if(!this._is_local())
+ {
+ org.omg.CORBA.portable.OutputStream out = null;
+ org.omg.CORBA.portable.InputStream in = null;
+ try
+ {
+ out = _request("shutdown", true);
+ in = _invoke(out);
+ return;
+ }
+ catch(org.omg.CORBA.portable.RemarshalException _ob_ex)
+ {
+ continue;
+ }
+ catch(org.omg.CORBA.portable.ApplicationException _ob_aex)
+ {
+ final String _ob_id = _ob_aex.getId();
+ in = _ob_aex.getInputStream();
+
+ throw new org.omg.CORBA.UNKNOWN("Unexpected User Exception: " + _ob_id);
+ }
+ finally
+ {
+ _releaseReply(in);
+ }
+ }
+ else
+ {
+ org.omg.CORBA.portable.ServantObject _ob_so = _servant_preinvoke("shutdown", _ob_opsClass);
+ if(_ob_so == null)
+ continue;
+ TestOperations _ob_self = (TestOperations)_ob_so.servant;
+ try
+ {
+ _ob_self.shutdown();
+ return;
+ }
+ finally
+ {
+ _servant_postinvoke(_ob_so);
+ }
+ }
+ }
+ }
+}
Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/_TestStub.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/_TestStub.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/_TestStub.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/build.xml
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/test/java/test/iiopplugin/build.xml?rev=417411&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/test/java/test/iiopplugin/build.xml (added)
+++ incubator/yoko/trunk/core/src/test/java/test/iiopplugin/build.xml Tue Jun 27 03:42:37 2006
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ 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.
+-->
+<!-- $Rev$ $Date$ -->
+<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/iiopplugin/**"/>
+ </ob.javac>
+ </target>
+
+ <!-- clean up the built items -->
+ <target name="clean">
+ <antcall target="cleanup.demos.tests"/>
+ <delete dir="../../lib/test/iiopplugin" failonerror="false"/>
+ </target>
+
+ <!-- run the demo -->
+ <target name="run" depends="build">
+ </target>
+
+</project>
Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/build.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/build.xml
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/build.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: incubator/yoko/trunk/core/src/test/java/test/iiopplugin/runtest
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/test/java/test/iiopplugin/runtest?rev=417411&view=auto
==============================================================================
--- incubator/yoko/trunk/core/src/test/java/test/iiopplugin/runtest (added)
+++ incubator/yoko/trunk/core/src/test/java/test/iiopplugin/runtest Tue Jun 27 03:42:37 2006
@@ -0,0 +1,129 @@
+#!/bin/sh
+# *
+# *
+# * 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.
+# *
+
+#
+# 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.iiopplugin.Client"
+server="$JAVA test.iiopplugin.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
Modified: incubator/yoko/trunk/core/src/test/java/test/runtests
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/core/src/test/java/test/runtests?rev=417411&r1=417410&r2=417411&view=diff
==============================================================================
--- incubator/yoko/trunk/core/src/test/java/test/runtests (original)
+++ incubator/yoko/trunk/core/src/test/java/test/runtests Tue Jun 27 03:42:37 2006
@@ -86,3 +86,6 @@
$echo
$echo "*** Running tests in \"retry\" ***"
sh $top_srcdir/test/retry/runtest 2>&1 | tee -a alltests.log
+$echo
+$echo "*** Running tests in \"iiopplugin\" ***"
+sh $top_srcdir/test/iiopplubin/runtest 2>&1 | tee -a alltests.log