Bug 514674: Regenerate RMIRemoteCommandConnectionImpl_Tie. Include _Stub
class.

Signed-off-by: Will Dazey <dazeydev.3@gmail.com>
Reviewed-by: Lukas Jungmann <lukas.jungmann@oracle.com>
diff --git a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/coordination/rmi/_RMIRemoteCommandConnection_Stub.java b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/coordination/rmi/_RMIRemoteCommandConnection_Stub.java
new file mode 100644
index 0000000..111b170
--- /dev/null
+++ b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/coordination/rmi/_RMIRemoteCommandConnection_Stub.java
@@ -0,0 +1,136 @@
+/*******************************************************************************
+ * Copyright (c) 1998, 2017 IBM Corporation, Oracle and/or its affiliates. All rights reserved.
+ * This program and the accompanying materials are made available under the 
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
+ * which accompanies this distribution. 
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at 
+ * http://www.eclipse.org/org/documents/edl-v10.php.
+ *
+ * Contributors:
+ *     Oracle - initial API and implementation from Oracle TopLink
+ ******************************************************************************/
+// Stub class generated by rmic, do not edit.
+// Contents subject to change without notice.
+
+package org.eclipse.persistence.internal.sessions.coordination.rmi;
+
+import java.io.Serializable;
+import java.lang.Object;
+import java.lang.String;
+import java.lang.Throwable;
+import java.rmi.RemoteException;
+import java.rmi.UnexpectedException;
+import javax.rmi.CORBA.Stub;
+import javax.rmi.CORBA.Util;
+import org.eclipse.persistence.sessions.coordination.Command;
+import org.omg.CORBA.SystemException;
+import org.omg.CORBA.portable.ApplicationException;
+import org.omg.CORBA.portable.RemarshalException;
+import org.omg.CORBA.portable.ServantObject;
+import org.omg.CORBA_2_3.portable.InputStream;
+import org.omg.CORBA_2_3.portable.OutputStream;
+
+public class _RMIRemoteCommandConnection_Stub extends Stub implements RMIRemoteCommandConnection {
+    
+    private static final String[] _type_ids = {
+        "RMI:org.eclipse.persistence.internal.sessions.coordination.rmi.RMIRemoteCommandConnection:0000000000000000"
+    };
+    
+    public String[] _ids() { 
+        return (String [] )  _type_ids.clone();
+    }
+    
+    public Object executeCommand(Command arg0) throws RemoteException {
+        while(true) {
+            if (!Util.isLocal(this)) {
+                InputStream in = null;
+                try {
+                    try {
+                        OutputStream out = 
+                            (OutputStream)
+                            _request("executeCommand__org_eclipse_persistence_sessions_coordination_Command", true);
+                        out.write_value(arg0,Command.class);
+                        in = (InputStream)_invoke(out);
+                        return Util.readAny(in);
+                    } catch (ApplicationException ex) {
+                        in = (InputStream) ex.getInputStream();
+                        String id = in.read_string();
+                        throw new UnexpectedException(id);
+                    } catch (RemarshalException ex) {
+                        continue;
+                    }
+                } catch (SystemException ex) {
+                    throw Util.mapSystemException(ex);
+                } finally {
+                    _releaseReply(in);
+                }
+            } else {
+                ServantObject so = _servant_preinvoke("executeCommand__org_eclipse_persistence_sessions_coordination_Command",org.eclipse.persistence.internal.sessions.coordination.rmi.RMIRemoteCommandConnection.class);
+                if (so == null) {
+                    continue;
+                }
+                try {
+                    Command arg0Copy = (Command) Util.copyObject(arg0,_orb());
+                    Object result = ((org.eclipse.persistence.internal.sessions.coordination.rmi.RMIRemoteCommandConnection)so.servant).executeCommand(arg0Copy);
+                    return (Object)Util.copyObject(result,_orb());
+                } catch (Throwable ex) {
+                    Throwable exCopy = (Throwable)Util.copyObject(ex,_orb());
+                    throw Util.wrapException(exCopy);
+                } finally {
+                    _servant_postinvoke(so);
+                }
+            }
+        }
+    }
+    
+    public Object executeCommand(byte[] arg0) throws RemoteException {
+        while(true) {
+            if (!Util.isLocal(this)) {
+                InputStream in = null;
+                try {
+                    try {
+                        OutputStream out = 
+                            (OutputStream)
+                            _request("executeCommand__org_omg_boxedRMI_seq1_octet", true);
+                        out.write_value(cast_array(arg0),byte[].class);
+                        in = (InputStream)_invoke(out);
+                        return Util.readAny(in);
+                    } catch (ApplicationException ex) {
+                        in = (InputStream) ex.getInputStream();
+                        String id = in.read_string();
+                        throw new UnexpectedException(id);
+                    } catch (RemarshalException ex) {
+                        continue;
+                    }
+                } catch (SystemException ex) {
+                    throw Util.mapSystemException(ex);
+                } finally {
+                    _releaseReply(in);
+                }
+            } else {
+                ServantObject so = _servant_preinvoke("executeCommand__org_omg_boxedRMI_seq1_octet",org.eclipse.persistence.internal.sessions.coordination.rmi.RMIRemoteCommandConnection.class);
+                if (so == null) {
+                    continue;
+                }
+                try {
+                    byte[] arg0Copy = (byte[]) Util.copyObject(arg0,_orb());
+                    Object result = ((org.eclipse.persistence.internal.sessions.coordination.rmi.RMIRemoteCommandConnection)so.servant).executeCommand(arg0Copy);
+                    return (Object)Util.copyObject(result,_orb());
+                } catch (Throwable ex) {
+                    Throwable exCopy = (Throwable)Util.copyObject(ex,_orb());
+                    throw Util.wrapException(exCopy);
+                } finally {
+                    _servant_postinvoke(so);
+                }
+            }
+        }
+    }
+    
+    // This method is required as a work-around for
+    // a bug in the JDK 1.1.6 verifier.
+    
+    private Serializable cast_array(Object obj) {
+        return (Serializable)obj;
+    }
+}
diff --git a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/coordination/rmi/iiop/_RMIRemoteCommandConnectionImpl_Tie.java b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/coordination/rmi/iiop/_RMIRemoteCommandConnectionImpl_Tie.java
index f4f05bd..06fe2f0 100644
--- a/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/coordination/rmi/iiop/_RMIRemoteCommandConnectionImpl_Tie.java
+++ b/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/coordination/rmi/iiop/_RMIRemoteCommandConnectionImpl_Tie.java
@@ -1,5 +1,5 @@
 /*******************************************************************************

- * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved.

+ * Copyright (c) 1998, 2017 IBM Corporation, Oracle and/or its affiliates. All rights reserved.
  * This program and the accompanying materials are made available under the 

  * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 

  * which accompanies this distribution. 

@@ -14,6 +14,9 @@
 // Contents subject to change without notice.

 package org.eclipse.persistence.internal.sessions.coordination.rmi.iiop;

 

+import java.lang.Object;

+import java.lang.String;

+import java.lang.Throwable;

 import java.rmi.Remote;

 import javax.rmi.CORBA.Tie;

 import javax.rmi.CORBA.Util;

@@ -21,18 +24,23 @@
 import org.omg.CORBA.BAD_OPERATION;

 import org.omg.CORBA.ORB;

 import org.omg.CORBA.SystemException;

+import org.omg.CORBA.portable.Delegate;

 import org.omg.CORBA.portable.InputStream;

 import org.omg.CORBA.portable.OutputStream;

 import org.omg.CORBA.portable.ResponseHandler;

 import org.omg.CORBA.portable.UnknownException;

-import org.omg.CORBA_2_3.portable.ObjectImpl;

 

-public class _RMIRemoteCommandConnectionImpl_Tie extends ObjectImpl implements Tie {

+public class _RMIRemoteCommandConnectionImpl_Tie extends org.omg.CORBA_2_3.portable.ObjectImpl implements Tie {

+

     private RMIRemoteCommandConnectionImpl target = null;

-    private static final String[] _type_ids = { "RMI:org.eclipse.persistence.internal.sessions.coordination.rmi.RMIRemoteCommandConnection:0000000000000000" };

+    private ORB orb = null;

+

+    private static final String[] _type_ids = {

+        "RMI:org.eclipse.persistence.internal.sessions.coordination.rmi.RMIRemoteCommandConnection:0000000000000000"

+    };

 

     public void setTarget(Remote target) {

-        this.target = (RMIRemoteCommandConnectionImpl)target;

+        this.target = (RMIRemoteCommandConnectionImpl) target;

     }

 

     public Remote getTarget() {

@@ -44,9 +52,10 @@
     }

 

     public void deactivate() {

-        _orb().disconnect(this);

-        _set_delegate(null);

-        target = null;

+        if (orb != null) {

+            orb.disconnect(this);

+            _set_delegate(null);

+        }

     }

 

     public ORB orb() {

@@ -57,19 +66,31 @@
         orb.connect(this);

     }

 

-    public String[] _ids() {

-        return _type_ids;

+    public void _set_delegate(Delegate del) {

+        super._set_delegate(del);

+        if (del != null)

+            orb = _orb();

+        else

+            orb = null;

+    }

+

+    public String[] _ids() { 

+        return (String [] )  _type_ids.clone();

     }

 

     public OutputStream _invoke(String method, InputStream _in, ResponseHandler reply) throws SystemException {

         try {

-            org.omg.CORBA_2_3.portable.InputStream in = (org.omg.CORBA_2_3.portable.InputStream)_in;

-            if (method.equals("executeCommand")) {

-                Command arg0 = (Command)in.read_value(Command.class);

-                Object result = target.executeCommand(arg0);

-                OutputStream out = reply.createReply();

-                Util.writeAny(out, result);

-                return out;

+            org.omg.CORBA_2_3.portable.InputStream in = 

+                (org.omg.CORBA_2_3.portable.InputStream) _in;

+            switch (method.length()) {

+                case 43: 

+                    if (method.equals("executeCommand__org_omg_boxedRMI_seq1_octet")) {

+                        return executeCommand__org_omg_boxedRMI_seq1_octet(in, reply);

+                    }

+                case 69: 

+                    if (method.equals("executeCommand__org_eclipse_persistence_sessions_coordination_Command")) {

+                        return executeCommand__org_eclipse_persistence_sessions_coordination_Command(in, reply);

+                    }

             }

             throw new BAD_OPERATION();

         } catch (SystemException ex) {

@@ -78,4 +99,20 @@
             throw new UnknownException(ex);

         }

     }

+

+    private OutputStream executeCommand__org_eclipse_persistence_sessions_coordination_Command(org.omg.CORBA_2_3.portable.InputStream in , ResponseHandler reply) throws Throwable {

+        Command arg0 = (Command) in.read_value(Command.class);

+        Object result = target.executeCommand(arg0);

+        OutputStream out = reply.createReply();

+        Util.writeAny(out,result);

+        return out;

+    }

+

+    private OutputStream executeCommand__org_omg_boxedRMI_seq1_octet(org.omg.CORBA_2_3.portable.InputStream in , ResponseHandler reply) throws Throwable {

+        byte[] arg0 = (byte[]) in.read_value(byte[].class);

+        Object result = target.executeCommand(arg0);

+        OutputStream out = reply.createReply();

+        Util.writeAny(out,result);

+        return out;

+    }

 }