// Stub class generated by rmic, do not edit.
// Contents subject to change without notice.
package org.objectweb.jotm;
import java.io.Serializable;
import java.rmi.Remote;
import java.rmi.RemoteException;
import java.rmi.UnexpectedException;
import javax.rmi.CORBA.Stub;
import javax.rmi.CORBA.Util;
import javax.rmi.PortableRemoteObject;
import org.omg.CORBA.ORB;
import org.omg.CORBA.SystemException;
import org.omg.CORBA.portable.ApplicationException;
import org.omg.CORBA.portable.InputStream;
import org.omg.CORBA.portable.OutputStream;
import org.omg.CORBA.portable.RemarshalException;
import org.omg.CORBA.portable.ResponseHandler;
import org.omg.CORBA.portable.ServantObject;
public class _ControlImpl_Stub extends Stub implements Control,
Resource,
Coordinator,
Terminator,
RecoveryCoordinator {
private static final String[] _type_ids = {
"RMI:org.objectweb.jotm.ControlImpl:0000000000000000",
"RMI:org.objectweb.jotm.Control:0000000000000000",
"RMI:org.objectweb.jotm.Resource:0000000000000000",
"RMI:org.objectweb.jotm.Coordinator:0000000000000000",
"RMI:org.objectweb.jotm.Terminator:0000000000000000",
"RMI:org.objectweb.jotm.RecoveryCoordinator:0000000000000000"
};
public String[] _ids() {
return _type_ids;
}
public Terminator get_terminator() throws RemoteException {
if (!Util.isLocal(this)) {
try {
org.omg.CORBA.portable.InputStream in = null;
try {
OutputStream out = _request("_get_J_terminator", true);
in = _invoke(out);
return (Terminator) PortableRemoteObject.narrow(in.read_Object(), Terminator.class);
} catch (ApplicationException ex) {
in = ex.getInputStream();
String id = in.read_string();
throw new UnexpectedException(id);
} catch (RemarshalException ex) {
return get_terminator();
} finally {
_releaseReply(in);
}
} catch (SystemException ex) {
throw Util.mapSystemException(ex);
}
} else {
ServantObject so = _servant_preinvoke("_get_J_terminator",ControlImpl.class);
if (so == null) {
return get_terminator();
}
try {
Terminator result = ((ControlImpl)so.servant).get_terminator();
return (Terminator)Util.copyObject(result,_orb());
} catch (Throwable ex) {
Throwable exCopy = (Throwable)Util.copyObject(ex,_orb());
throw Util.wrapException(exCopy);
} finally {
_servant_postinvoke(so);
}
}
}
public Coordinator get_coordinator() throws RemoteException {
if (!Util.isLocal(this)) {
try {
org.omg.CORBA.portable.InputStream in = null;
try {
OutputStream out = _request("_get_J_coordinator", true);
in = _invoke(out);
return (Coordinator) PortableRemoteObject.narrow(in.read_Object(), Coordinator.class);
} catch (ApplicationException ex) {
in = ex.getInputStream();
String id = in.read_string();
throw new UnexpectedException(id);
} catch (RemarshalException ex) {
return get_coordinator();
} finally {
_releaseReply(in);
}
} catch (SystemException ex) {
throw Util.mapSystemException(ex);
}
} else {
ServantObject so = _servant_preinvoke("_get_J_coordinator",ControlImpl.class);
if (so == null) {
return get_coordinator();
}
try {
Coordinator result = ((ControlImpl)so.servant).get_coordinator();
return (Coordinator)Util.copyObject(result,_orb());
} catch (Throwable ex) {
Throwable exCopy = (Throwable)Util.copyObject(ex,_orb());
throw Util.wrapException(exCopy);
} finally {
_servant_postinvoke(so);
}
}
}
public int prepare() throws RemoteException {
if (!Util.isLocal(this)) {
try {
org.omg.CORBA.portable.InputStream in = null;
try {
OutputStream out = _request("prepare", true);
in = _invoke(out);
return in.read_long();
} catch (ApplicationException ex) {
in = ex.getInputStream();
String id = in.read_string();
throw new UnexpectedException(id);
} catch (RemarshalException ex) {
return prepare();
} finally {
_releaseReply(in);
}
} catch (SystemException ex) {
throw Util.mapSystemException(ex);
}
} else {
ServantObject so = _servant_preinvoke("prepare",ControlImpl.class);
if (so == null) {
return prepare();
}
try {
return ((ControlImpl)so.servant).prepare();
} catch (Throwable ex) {
Throwable exCopy = (Throwable)Util.copyObject(ex,_orb());
throw Util.wrapException(exCopy);
} finally {
_servant_postinvoke(so);
}
}
}
public void rollback() throws RemoteException {
if (!Util.isLocal(this)) {
try {
org.omg.CORBA.portable.InputStream in = null;
try {
OutputStream out = _request("rollback", true);
_invoke(out);
} catch (ApplicationException ex) {
in = ex.getInputStream();
String id = in.read_string();
throw new UnexpectedException(id);
} catch (RemarshalException ex) {
rollback();
} finally {
_releaseReply(in);
}
} catch (SystemException ex) {
throw Util.mapSystemException(ex);
}
} else {
ServantObject so = _servant_preinvoke("rollback",ControlImpl.class);
if (so == null) {
rollback();
return ;
}
try {
((ControlImpl)so.servant).rollback();
} catch (Throwable ex) {
Throwable exCopy = (Throwable)Util.copyObject(ex,_orb());
throw Util.wrapException(exCopy);
} finally {
_servant_postinvoke(so);
}
}
}
public void commit() throws RemoteException {
if (!Util.isLocal(this)) {
try {
org.omg.CORBA.portable.InputStream in = null;
try {
OutputStream out = _request("commit__", true);
_invoke(out);
} catch (ApplicationException ex) {
in = ex.getInputStream();
String id = in.read_string();
throw new UnexpectedException(id);
} catch (RemarshalException ex) {
commit();
} finally {
_releaseReply(in);
}
} catch (SystemException ex) {
throw Util.mapSystemException(ex);
}
} else {
ServantObject so = _servant_preinvoke("commit__",ControlImpl.class);
if (so == null) {
commit();
return ;
}
try {
((ControlImpl)so.servant).commit();
} catch (Throwable ex) {
Throwable exCopy = (Throwable)Util.copyObject(ex,_orb());
throw Util.wrapException(exCopy);
} finally {
_servant_postinvoke(so);
}
}
}
public void commit_one_phase() throws RemoteException {
if (!Util.isLocal(this)) {
try {
org.omg.CORBA.portable.InputStream in = null;
try {
OutputStream out = _request("commit_one_phase", true);
_invoke(out);
} catch (ApplicationException ex) {
in = ex.getInputStream();
String id = in.read_string();
throw new UnexpectedException(id);
} catch (RemarshalException ex) {
commit_one_phase();
} finally {
_releaseReply(in);
}
} catch (SystemException ex) {
throw Util.mapSystemException(ex);
}
} else {
ServantObject so = _servant_preinvoke("commit_one_phase",ControlImpl.class);
if (so == null) {
commit_one_phase();
return ;
}
try {
((ControlImpl)so.servant).commit_one_phase();
} catch (Throwable ex) {
Throwable exCopy = (Throwable)Util.copyObject(ex,_orb());
throw Util.wrapException(exCopy);
} finally {
_servant_postinvoke(so);
}
}
}
public void forget() throws RemoteException {
if (!Util.isLocal(this)) {
try {
org.omg.CORBA.portable.InputStream in = null;
try {
OutputStream out = _request("forget", true);
_invoke(out);
} catch (ApplicationException ex) {
in = ex.getInputStream();
String id = in.read_string();
throw new UnexpectedException(id);
} catch (RemarshalException ex) {
forget();
} finally {
_releaseReply(in);
}
} catch (SystemException ex) {
throw Util.mapSystemException(ex);
}
} else {
ServantObject so = _servant_preinvoke("forget",ControlImpl.class);
if (so == null) {
forget();
return ;
}
try {
((ControlImpl)so.servant).forget();
} catch (Throwable ex) {
Throwable exCopy = (Throwable)Util.copyObject(ex,_orb());
throw Util.wrapException(exCopy);
} finally {
_servant_postinvoke(so);
}
}
}
public int get_status() throws RemoteException {
if (!Util.isLocal(this)) {
try {
org.omg.CORBA.portable.InputStream in = null;
try {
OutputStream out = _request("_get_J_status", true);
in = _invoke(out);
return in.read_long();
} catch (ApplicationException ex) {
in = ex.getInputStream();
String id = in.read_string();
throw new UnexpectedException(id);
} catch (RemarshalException ex) {
return get_status();
} finally {
_releaseReply(in);
}
} catch (SystemException ex) {
throw Util.mapSystemException(ex);
}
} else {
ServantObject so = _servant_preinvoke("_get_J_status",ControlImpl.class);
if (so == null) {
return get_status();
}
try {
return ((ControlImpl)so.servant).get_status();
} catch (Throwable ex) {
Throwable exCopy = (Throwable)Util.copyObject(ex,_orb());
throw Util.wrapException(exCopy);
} finally {
_servant_postinvoke(so);
}
}
}
public boolean is_same_transaction(Coordinator arg0) throws RemoteException {
if (!Util.isLocal(this)) {
try {
org.omg.CORBA.portable.InputStream in = null;
try {
OutputStream out = _request("is_same_transaction", true);
Util.writeRemoteObject(out,arg0);
in = _invoke(out);
return in.read_boolean();
} catch (ApplicationException ex) {
in = ex.getInputStream();
String id = in.read_string();
throw new UnexpectedException(id);
} catch (RemarshalException ex) {
return is_same_transaction(arg0);
} finally {
_releaseReply(in);
}
} catch (SystemException ex) {
throw Util.mapSystemException(ex);
}
} else {
ServantObject so = _servant_preinvoke("is_same_transaction",ControlImpl.class);
if (so == null) {
return is_same_transaction(arg0);
}
try {
Coordinator arg0Copy = (Coordinator) Util.copyObject(arg0,_orb());
return ((ControlImpl)so.servant).is_same_transaction(arg0Copy);
} catch (Throwable ex) {
Throwable exCopy = (Throwable)Util.copyObject(ex,_orb());
throw Util.wrapException(exCopy);
} finally {
_servant_postinvoke(so);
}
}
}
public RecoveryCoordinator register_resource(Resource arg0) throws RemoteException {
if (!Util.isLocal(this)) {
try {
org.omg.CORBA.portable.InputStream in = null;
try {
OutputStream out = _request("register_resource", true);
Util.writeRemoteObject(out,arg0);
in = _invoke(out);
return (RecoveryCoordinator) PortableRemoteObject.narrow(in.read_Object(), RecoveryCoordinator.class);
} catch (ApplicationException ex) {
in = ex.getInputStream();
String id = in.read_string();
throw new UnexpectedException(id);
} catch (RemarshalException ex) {
return register_resource(arg0);
} finally {
_releaseReply(in);
}
} catch (SystemException ex) {
throw Util.mapSystemException(ex);
}
} else {
ServantObject so = _servant_preinvoke("register_resource",ControlImpl.class);
if (so == null) {
return register_resource(arg0);
}
try {
Resource arg0Copy = (Resource) Util.copyObject(arg0,_orb());
RecoveryCoordinator result = ((ControlImpl)so.servant).register_resource(arg0Copy);
return (RecoveryCoordinator)Util.copyObject(result,_orb());
} catch (Throwable ex) {
Throwable exCopy = (Throwable)Util.copyObject(ex,_orb());
throw Util.wrapException(exCopy);
} finally {
_servant_postinvoke(so);
}
}
}
public void register_synchronization(RemoteSynchro arg0) throws RemoteException {
if (!Util.isLocal(this)) {
try {
org.omg.CORBA.portable.InputStream in = null;
try {
OutputStream out = _request("register_synchronization", true);
Util.writeRemoteObject(out,arg0);
_invoke(out);
} catch (ApplicationException ex) {
in = ex.getInputStream();
String id = in.read_string();
throw new UnexpectedException(id);
} catch (RemarshalException ex) {
register_synchronization(arg0);
} finally {
_releaseReply(in);
}
} catch (SystemException ex) {
throw Util.mapSystemException(ex);
}
} else {
ServantObject so = _servant_preinvoke("register_synchronization",ControlImpl.class);
if (so == null) {
register_synchronization(arg0);
return ;
}
try {
RemoteSynchro arg0Copy = (RemoteSynchro) Util.copyObject(arg0,_orb());
((ControlImpl)so.servant).register_synchronization(arg0Copy);
} catch (Throwable ex) {
Throwable exCopy = (Throwable)Util.copyObject(ex,_orb());
throw Util.wrapException(exCopy);
} finally {
_servant_postinvoke(so);
}
}
}
public void rollback_only() throws RemoteException {
if (!Util.isLocal(this)) {
try {
org.omg.CORBA.portable.InputStream in = null;
try {
OutputStream out = _request("rollback_only", true);
_invoke(out);
} catch (ApplicationException ex) {
in = ex.getInputStream();
String id = in.read_string();
throw new UnexpectedException(id);
} catch (RemarshalException ex) {
rollback_only();
} finally {
_releaseReply(in);
}
} catch (SystemException ex) {
throw Util.mapSystemException(ex);
}
} else {
ServantObject so = _servant_preinvoke("rollback_only",ControlImpl.class);
if (so == null) {
rollback_only();
return ;
}
try {
((ControlImpl)so.servant).rollback_only();
} catch (Throwable ex) {
Throwable exCopy = (Throwable)Util.copyObject(ex,_orb());
throw Util.wrapException(exCopy);
} finally {
_servant_postinvoke(so);
}
}
}
public String get_transaction_name() throws RemoteException {
if (!Util.isLocal(this)) {
try {
org.omg.CORBA_2_3.portable.InputStream in = null;
try {
OutputStream out = _request("_get_J_transaction_name", true);
in = (org.omg.CORBA_2_3.portable.InputStream)_invoke(out);
return (String) in.read_value(String.class);
} catch (ApplicationException ex) {
in = (org.omg.CORBA_2_3.portable.InputStream) ex.getInputStream();
String id = in.read_string();
throw new UnexpectedException(id);
} catch (RemarshalException ex) {
return get_transaction_name();
} finally {
_releaseReply(in);
}
} catch (SystemException ex) {
throw Util.mapSystemException(ex);
}
} else {
ServantObject so = _servant_preinvoke("_get_J_transaction_name",ControlImpl.class);
if (so == null) {
return get_transaction_name();
}
try {
return ((ControlImpl)so.servant).get_transaction_name();
} catch (Throwable ex) {
Throwable exCopy = (Throwable)Util.copyObject(ex,_orb());
throw Util.wrapException(exCopy);
} finally {
_servant_postinvoke(so);
}
}
}
public void commit(boolean arg0) throws RemoteException {
if (!Util.isLocal(this)) {
try {
org.omg.CORBA.portable.InputStream in = null;
try {
OutputStream out = _request("commit__boolean", true);
out.write_boolean(arg0);
_invoke(out);
} catch (ApplicationException ex) {
in = ex.getInputStream();
String id = in.read_string();
throw new UnexpectedException(id);
} catch (RemarshalException ex) {
commit(arg0);
} finally {
_releaseReply(in);
}
} catch (SystemException ex) {
throw Util.mapSystemException(ex);
}
} else {
ServantObject so = _servant_preinvoke("commit__boolean",ControlImpl.class);
if (so == null) {
commit(arg0);
return ;
}
try {
((ControlImpl)so.servant).commit(arg0);
} catch (Throwable ex) {
Throwable exCopy = (Throwable)Util.copyObject(ex,_orb());
throw Util.wrapException(exCopy);
} finally {
_servant_postinvoke(so);
}
}
}
public int replay_completion(Resource arg0) throws RemoteException {
if (!Util.isLocal(this)) {
try {
org.omg.CORBA.portable.InputStream in = null;
try {
OutputStream out = _request("replay_completion", true);
Util.writeRemoteObject(out,arg0);
in = _invoke(out);
return in.read_long();
} catch (ApplicationException ex) {
in = ex.getInputStream();
String id = in.read_string();
throw new UnexpectedException(id);
} catch (RemarshalException ex) {
return replay_completion(arg0);
} finally {
_releaseReply(in);
}
} catch (SystemException ex) {
throw Util.mapSystemException(ex);
}
} else {
ServantObject so = _servant_preinvoke("replay_completion",ControlImpl.class);
if (so == null) {
return replay_completion(arg0);
}
try {
Resource arg0Copy = (Resource) Util.copyObject(arg0,_orb());
return ((ControlImpl)so.servant).replay_completion(arg0Copy);
} catch (Throwable ex) {
Throwable exCopy = (Throwable)Util.copyObject(ex,_orb());
throw Util.wrapException(exCopy);
} finally {
_servant_postinvoke(so);
}
}
}
}