【Java开源代码栏目提醒】:文章导读:在新的一年中,各位网友都进入紧张的学习或是工作阶段。网学会员整理了Java开源代码-_InventoryHome_Stub.java的相关内容供大家参考,祝大家在新的一年里工作和学习顺利!
package com.borland.samples.ejb;
public class _InventoryHome_Stub extends javax.ejb._EJBHome_Stub implements com.borland.samples.ejb.InventoryHome, InventoryHomeOperations {
final public static java.lang.Class _opsClass = com.borland.samples.ejb.InventoryHomeOperations.class;
public java.lang.String[] _ids () {
return __ids;
}
private static java.lang.String[] __ids = {
"RMI:com.borland.samples.ejb.InventoryHome:0000000000000000",
"RMI:javax.ejb.EJBHome:0000000000000000"
};
public com.borland.samples.ejb.Inventory create (java.lang.Integer arg0,
java.lang.String arg1,
java.lang.String arg2,
java.lang.Float arg3,
java.lang.Short arg4) throws java.rmi.RemoteException, javax.ejb.CreateException {
try {
while (true) {
if (!_is_local()) {
org.omg.CORBA.portable.OutputStream _output = null;
org.omg.CORBA.portable.InputStream _input = null;
com.borland.samples.ejb.Inventory _result;
try {
_output = this._request("create__java_lang_Integer__CORBA_WStringValue__CORBA_WStringValue__java_lang_Float__java_lang_Short", true);
((org.omg.CORBA_2_3.portable.OutputStream)_output).write_value((java.io.Serializable)arg0);
org.omg.CORBA.WStringValueHelper.write(_output, arg1);
org.omg.CORBA.WStringValueHelper.write(_output, arg2);
((org.omg.CORBA_2_3.portable.OutputStream)_output).write_value((java.io.Serializable)arg3);
((org.omg.CORBA_2_3.portable.OutputStream)_output).write_value((java.io.Serializable)arg4);
_input = this._invoke(_output);
//FIX: Cannot use helper class because of potential stub downloading
_result = (com.borland.samples.ejb.Inventory)javax.rmi.PortableRemoteObject.narrow(_input.read_Object(com.borland.samples.ejb.Inventory.class), com.borland.samples.ejb.Inventory.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();
if (_exception_id.equals("IDL:javax/ejb/CreateEx:1.0")) {
_exception_id = in.read_string();
throw (javax.ejb.CreateException)((org.omg.CORBA_2_3.portable.InputStream)in).read_value();
}
//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("create__java_lang_Integer__CORBA_WStringValue__CORBA_WStringValue__java_lang_Float__java_lang_Short", _opsClass);
if (_so == null) {
continue;
}
final com.borland.samples.ejb.InventoryHomeOperations _self = (com.borland.samples.ejb.InventoryHomeOperations)_so.servant;
try {
return _self.create(arg0, arg1, arg2, arg3, arg4);
}
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 java.util.Collection findExactTitle (java.lan