_salesfacade_stub.java
来自「一个简单的EJB实例.用DB2连接.JSP页面.很好用.供大家学习」· Java 代码 · 共 394 行 · 第 1/2 页
JAVA
394 行
return in.read_boolean();
} catch (ApplicationException ex) {
in = ex.getInputStream();
String id = in.read_string();
throw new UnexpectedException(id);
} catch (RemarshalException ex) {
return isIdentical(arg0);
} finally {
_releaseReply(in);
}
} catch (SystemException ex) {
throw Util.mapSystemException(ex);
}
} else {
ServantObject so = _servant_preinvoke("isIdentical",javax.ejb.EJBObject.class);
if (so == null) {
return isIdentical(arg0);
}
try {
EJBObject arg0Copy = (EJBObject) Util.copyObject(arg0,_orb());
return ((javax.ejb.EJBObject)so.servant).isIdentical(arg0Copy);
} catch (Throwable ex) {
Throwable exCopy = (Throwable)Util.copyObject(ex,_orb());
throw Util.wrapException(exCopy);
} finally {
_servant_postinvoke(so);
}
}
}
public String echo(String arg0) throws RemoteException {
if (!Util.isLocal(this)) {
try {
org.omg.CORBA_2_3.portable.InputStream in = null;
try {
org.omg.CORBA_2_3.portable.OutputStream out =
(org.omg.CORBA_2_3.portable.OutputStream)
_request("echo", true);
out.write_value(arg0,String.class);
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 echo(arg0);
} finally {
_releaseReply(in);
}
} catch (SystemException ex) {
throw Util.mapSystemException(ex);
}
} else {
ServantObject so = _servant_preinvoke("echo",com.xyz.ejb.SalesFacade.class);
if (so == null) {
return echo(arg0);
}
try {
return ((com.xyz.ejb.SalesFacade)so.servant).echo(arg0);
} catch (Throwable ex) {
Throwable exCopy = (Throwable)Util.copyObject(ex,_orb());
throw Util.wrapException(exCopy);
} finally {
_servant_postinvoke(so);
}
}
}
public ItemVO[] getAllItems() throws RemoteException {
if (!Util.isLocal(this)) {
try {
org.omg.CORBA_2_3.portable.InputStream in = null;
try {
org.omg.CORBA.portable.OutputStream out = _request("_get_allItems", true);
in = (org.omg.CORBA_2_3.portable.InputStream)_invoke(out);
return (ItemVO[]) in.read_value(ItemVO[].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 getAllItems();
} finally {
_releaseReply(in);
}
} catch (SystemException ex) {
throw Util.mapSystemException(ex);
}
} else {
ServantObject so = _servant_preinvoke("_get_allItems",com.xyz.ejb.SalesFacade.class);
if (so == null) {
return getAllItems();
}
try {
ItemVO[] result = ((com.xyz.ejb.SalesFacade)so.servant).getAllItems();
return (ItemVO[])Util.copyObject(result,_orb());
} catch (Throwable ex) {
Throwable exCopy = (Throwable)Util.copyObject(ex,_orb());
throw Util.wrapException(exCopy);
} finally {
_servant_postinvoke(so);
}
}
}
public boolean makePurchase(String arg0, Long[] arg1) throws RemoteException {
if (!Util.isLocal(this)) {
try {
org.omg.CORBA_2_3.portable.InputStream in = null;
try {
org.omg.CORBA_2_3.portable.OutputStream out =
(org.omg.CORBA_2_3.portable.OutputStream)
_request("makePurchase", true);
out.write_value(arg0,String.class);
out.write_value(cast_array(arg1),Long[].class);
in = (org.omg.CORBA_2_3.portable.InputStream)_invoke(out);
return in.read_boolean();
} 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 makePurchase(arg0,arg1);
} finally {
_releaseReply(in);
}
} catch (SystemException ex) {
throw Util.mapSystemException(ex);
}
} else {
ServantObject so = _servant_preinvoke("makePurchase",com.xyz.ejb.SalesFacade.class);
if (so == null) {
return makePurchase(arg0, arg1);
}
try {
Object[] copies = Util.copyObjects(new Object[]{arg0,arg1},_orb());
String arg0Copy = (String) copies[0];
Long[] arg1Copy = (Long[]) copies[1];
return ((com.xyz.ejb.SalesFacade)so.servant).makePurchase(arg0Copy, arg1Copy);
} catch (Throwable ex) {
Throwable exCopy = (Throwable)Util.copyObject(ex,_orb());
throw Util.wrapException(exCopy);
} finally {
_servant_postinvoke(so);
}
}
}
public LocationVO getLocation(String arg0) throws RemoteException {
if (!Util.isLocal(this)) {
try {
org.omg.CORBA_2_3.portable.InputStream in = null;
try {
org.omg.CORBA_2_3.portable.OutputStream out =
(org.omg.CORBA_2_3.portable.OutputStream)
_request("getLocation", true);
out.write_value(arg0,String.class);
in = (org.omg.CORBA_2_3.portable.InputStream)_invoke(out);
return (LocationVO) in.read_value(LocationVO.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 getLocation(arg0);
} finally {
_releaseReply(in);
}
} catch (SystemException ex) {
throw Util.mapSystemException(ex);
}
} else {
ServantObject so = _servant_preinvoke("getLocation",com.xyz.ejb.SalesFacade.class);
if (so == null) {
return getLocation(arg0);
}
try {
LocationVO result = ((com.xyz.ejb.SalesFacade)so.servant).getLocation(arg0);
return (LocationVO)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;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?