【Java开源代码栏目提醒】:网学会员,鉴于大家对Java开源代码十分关注,论文会员在此为大家搜集整理了“_Cart_Stub.java”一文,供大家参考学习!
package com.borland.samples.ejb;
public class _Cart_Stub extends javax.ejb._EJBObject_Stub implements com.borland.samples.ejb.Cart, CartOperations {
final public static java.lang.Class _opsClass = com.borland.samples.ejb.CartOperations.class;
public java.lang.String[] _ids () {
return __ids;
}
private static java.lang.String[] __ids = {
"RMI:com.borland.samples.ejb.Cart:0000000000000000",
"RMI:javax.ejb.EJBObject:0000000000000000"
};
public java.lang.Integer getUserId () throws java.rmi.RemoteException {
try {
while (true) {
if (!_is_local()) {
org.omg.CORBA.portable.OutputStream _output = null;
org.omg.CORBA.portable.InputStream _input = null;
java.lang.Integer _result;
try {
_output = this._request("_get_userId", true);
_input = this._invoke(_output);
_result = (java.lang.Integer)((org.omg.CORBA_2_3.portable.InputStream)_input).read_value(java.lang.Integer.class);
return _result;
}
catch (org.omg.CORBA.portable.ApplicationException _exception) {
final org.omg.CORBA.portable.InputStream in = _exception.getInputStream();
java.lang.String _exception_id = _exception.getId();
//FIX: Wrap original Exception here?
throw new java.rmi.UnexpectedException("Unexpected User Exception: " + _exception_id);
}
catch (org.omg.CORBA.portable.RemarshalException _exception) {
continue;
}
finally {
this._releaseReply(_input);
}
} else {
final org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("_get_userId", _opsClass);
if (_so == null) {
continue;
}
final com.borland.samples.ejb.CartOperations _self = (com.borland.samples.ejb.CartOperations)_so.servant;
try {
return _self.getUserId();
}
finally {
_servant_postinvoke(_so);
}
}
}
}
catch (org.omg.CORBA.portable.UnknownException ex) {
if (ex.originalEx instanceof java.lang.RuntimeException) {
throw (java.lang.RuntimeException) ex.originalEx;
} else if (ex.originalEx instanceof Exception) {
throw new java.rmi.ServerException(ex.getMessage(), (java.lang.Exception)ex.originalEx);
} else {
throw new java.rmi.ServerError(ex.getMessage(), (java.lang.Error) ex.originalEx);
}
}
catch (org.omg.CORBA.SystemException ex) {
throw javax.rmi.CORBA.Util.mapSystemException(ex);
}
}
public void addToShoppingCart (java.lang.Integer arg0) throws java.rmi.RemoteException {
try {
while (true) {
if (!_is_local()) {
org.omg.CORBA.portable.OutputStream _output = null;
org.omg.CORBA.portable.InputStream _input = null;
try {
_output = this._request("addToShoppingCart", true);
((org.omg.CORBA_2_3.portable.OutputStream)_output).write_value((java.io.Serializable)arg0);
_input = this._invoke(_output);
}
catch (org.omg.CORBA.portable.ApplicationException _exception) {
final org.omg.CORBA.portable.InputStream in = _exception.getInputStream();
java.lang.String _exception_id = _exception.getId();
//FIX: Wrap original Exception here?
throw new java.rmi.UnexpectedException("Unexpected User Exception: " + _exception_id);
}
catch (org.omg.CORBA.portable.RemarshalException _exception) {
continue;
}
finally {
this._releaseReply(_input);
}
} else {
final org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("addToShoppingCart", _opsClass);
if (_so == null) {
continue;
}
final com.borland.samples.ejb.CartOperations _self = (com.borland.samples.ejb.CartOperations)_so.servant;
try {
_self.addToShoppingCart(arg0);
}
finally {
_servant_postinvoke(_so);
}
}
break;
}
}
catch (org.omg.CORBA.portable.UnknownException ex) {
if (ex.originalEx instanceof java.lang.RuntimeException) {
throw (java.lang.RuntimeException) ex.originalEx;
} else if (ex.originalEx instanceof Exception) {
throw new java.rmi.ServerException(ex.getMessage(), (java.lang.Exception)ex.originalEx);
} else {
throw new java.rmi.ServerError(ex.getMessage(), (java.lang.Error) ex.originalEx);
}
}
catch (org.omg.CORBA.SystemException ex) {
throw javax.rmi.CORBA.Util.mapSystemException(ex);
}
}
public boolean addUser (com.borland.dx.dataset.DataSetData[] arg0,
java.lang.String arg1) throws java.rmi.RemoteException {
try {
while (true) {
if (!_is_local()) {
org.omg.CORBA.portable.OutputStream _output = null;
org.omg.CORBA.portable.InputStream _input = null;
boolean _result;
try {
_o