【Java开源代码栏目提醒】:网学会员在Java开源代码频道为大家收集整理了_ShoppingCart_Stub.java提供大家参考,希望对大家有所帮助!
package com.borland.samples.ejb;
public class _ShoppingCart_Stub extends javax.ejb._EJBObject_Stub implements com.borland.samples.ejb.ShoppingCart, ShoppingCartOperations {
final public static java.lang.Class _opsClass = com.borland.samples.ejb.ShoppingCartOperations.class;
public java.lang.String[] _ids () {
return __ids;
}
private static java.lang.String[] __ids = {
"RMI:com.borland.samples.ejb.ShoppingCart:0000000000000000",
"RMI:javax.ejb.EJBObject:0000000000000000"
};
public java.lang.Short getQuantity () 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.Short _result;
try {
_output = this._request("_get_quantity", true);
_input = this._invoke(_output);
_result = (java.lang.Short)((org.omg.CORBA_2_3.portable.InputStream)_input).read_value(java.lang.Short.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_quantity", _opsClass);
if (_so == null) {
continue;
}
final com.borland.samples.ejb.ShoppingCartOperations _self = (com.borland.samples.ejb.ShoppingCartOperations)_so.servant;
try {
return _self.getQuantity();
}
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 setQuantity (java.lang.Short quantity) 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("_set_quantity", true);
((org.omg.CORBA_2_3.portable.OutputStream)_output).write_value((java.io.Serializable)quantity);
_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("_set_quantity", _opsClass);
if (_so == null) {
continue;
}
final com.borland.samples.ejb.ShoppingCartOperations _self = (com.borland.samples.ejb.ShoppingCartOperations)_so.servant;
try {
_self.setQuantity(quantity);
}
finally {
_servant_postinvoke(_so);
}
}
break;
}
}
catch (org.omg.CORBA.portable.UnknownException ex) {
if (ex.original