⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 _cart_stub.java

📁 EJB 实例
💻 JAVA
📖 第 1 页 / 共 2 页
字号:

package ejb;

public class _Cart_Stub extends org.omg.stub.javax.ejb._EJBObject_Stub implements ejb.Cart, CartOperations {
  final public static java.lang.Class _opsClass = ejb.CartOperations.class;

  public java.lang.String[] _ids () {
    return __ids;
  }

  private static java.lang.String[] __ids = {
    "RMI:ejb.Cart:0000000000000000",
    "RMI:javax.ejb.EJBObject:0000000000000000"
  };

  public void removeItem (ejb.Item 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("removeItem", 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) {
            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.NO_RESPONSE _vis_nm ) {
            if(_vis_nm.minor == (org.omg.CORBA.OMGVMCID.value | 99)) {
              return;
            }
            throw _vis_nm;
          }
          catch (org.omg.CORBA.portable.RemarshalException _exception) {
            continue;
          }
          finally {
            this._releaseReply(_input);
          }
        } else {
          ejb.CartOperations _self = null;
          final org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("removeItem", _opsClass);
          if (_so == null) {
            continue;
          }
          try {
            _self = (ejb.CartOperations)_so.servant;
          } catch (java.lang.ClassCastException _vis_ce) {
            org.omg.CORBA.portable.OutputStream _output = null;
            org.omg.CORBA.portable.InputStream  _input  = null;

            try {
              _output = _orb().create_output_stream();
              final org.omg.CORBA.portable.OutputStream _response_output = _orb().create_output_stream();
              final org.omg.CORBA.portable.OutputStream _response_ex_output = _orb().create_output_stream();
              com.inprise.vbroker.orb.VBResponseHandler _vis_vbr = com.inprise.vbroker.orb.VBResponseHandler.getResponseHandler(_response_output,_response_ex_output);
              ((org.omg.CORBA_2_3.portable.OutputStream)_output).write_value((java.io.Serializable)arg0);
              org.omg.CORBA.portable.OutputStream _result_output = (((org.omg.CORBA.portable.InvokeHandler)_so.servant)._invoke("removeItem",_output.create_input_stream(),_vis_vbr));
              _input = _result_output.create_input_stream();

              if (_so instanceof org.omg.CORBA.portable.ServantObjectExt) {
                ((org.omg.CORBA.portable.ServantObjectExt)_so).normalCompletion();
              }
              return;

            } catch (java.lang.RuntimeException _vis_re) {
              if (_so instanceof org.omg.CORBA.portable.ServantObjectExt) {
                ((org.omg.CORBA.portable.ServantObjectExt)_so).exceptionalCompletion((Throwable)_vis_re);
              }
              throw _vis_re;
            } catch (java.lang.Error _vis_err) {
              if (_so instanceof org.omg.CORBA.portable.ServantObjectExt) {
                ((org.omg.CORBA.portable.ServantObjectExt)_so).exceptionalCompletion((Throwable)_vis_err);
              }
              throw _vis_err;
            } finally {
              _servant_postinvoke(_so);
              this._releaseReply(_input);
            }
          }
          try {
            _self.removeItem(arg0);
            if (_so instanceof org.omg.CORBA.portable.ServantObjectExt) {
              ((org.omg.CORBA.portable.ServantObjectExt)_so).normalCompletion();
            }
          } catch (java.rmi.RemoteException _vis_rm) {
            if (_so instanceof org.omg.CORBA.portable.ServantObjectExt) {
             ((org.omg.CORBA.portable.ServantObjectExt)_so).exceptionalCompletion((Throwable)_vis_rm);
            }
            throw _vis_rm;
          } catch (java.lang.RuntimeException _vis_re) {
            if (_so instanceof org.omg.CORBA.portable.ServantObjectExt) {
              ((org.omg.CORBA.portable.ServantObjectExt)_so).exceptionalCompletion((Throwable)_vis_re);
            }
            throw _vis_re;
          } catch (java.lang.Error _vis_err) {
            if (_so instanceof org.omg.CORBA.portable.ServantObjectExt) {
              ((org.omg.CORBA.portable.ServantObjectExt)_so).exceptionalCompletion((Throwable)_vis_err);
            }
            throw _vis_err;
          } 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 void add (ejb.Item 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("add", 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) {
            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.NO_RESPONSE _vis_nm ) {
            if(_vis_nm.minor == (org.omg.CORBA.OMGVMCID.value | 99)) {
              return;
            }
            throw _vis_nm;
          }
          catch (org.omg.CORBA.portable.RemarshalException _exception) {
            continue;
          }
          finally {
            this._releaseReply(_input);
          }
        } else {
          ejb.CartOperations _self = null;
          final org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("add", _opsClass);
          if (_so == null) {
            continue;
          }
          try {
            _self = (ejb.CartOperations)_so.servant;
          } catch (java.lang.ClassCastException _vis_ce) {
            org.omg.CORBA.portable.OutputStream _output = null;
            org.omg.CORBA.portable.InputStream  _input  = null;

            try {
              _output = _orb().create_output_stream();
              final org.omg.CORBA.portable.OutputStream _response_output = _orb().create_output_stream();
              final org.omg.CORBA.portable.OutputStream _response_ex_output = _orb().create_output_stream();
              com.inprise.vbroker.orb.VBResponseHandler _vis_vbr = com.inprise.vbroker.orb.VBResponseHandler.getResponseHandler(_response_output,_response_ex_output);
              ((org.omg.CORBA_2_3.portable.OutputStream)_output).write_value((java.io.Serializable)arg0);
              org.omg.CORBA.portable.OutputStream _result_output = (((org.omg.CORBA.portable.InvokeHandler)_so.servant)._invoke("add",_output.create_input_stream(),_vis_vbr));
              _input = _result_output.create_input_stream();

              if (_so instanceof org.omg.CORBA.portable.ServantObjectExt) {
                ((org.omg.CORBA.portable.ServantObjectExt)_so).normalCompletion();
              }
              return;

            } catch (java.lang.RuntimeException _vis_re) {
              if (_so instanceof org.omg.CORBA.portable.ServantObjectExt) {
                ((org.omg.CORBA.portable.ServantObjectExt)_so).exceptionalCompletion((Throwable)_vis_re);
              }
              throw _vis_re;
            } catch (java.lang.Error _vis_err) {
              if (_so instanceof org.omg.CORBA.portable.ServantObjectExt) {
                ((org.omg.CORBA.portable.ServantObjectExt)_so).exceptionalCompletion((Throwable)_vis_err);
              }
              throw _vis_err;
            } finally {
              _servant_postinvoke(_so);
              this._releaseReply(_input);
            }
          }
          try {
            _self.add(arg0);
            if (_so instanceof org.omg.CORBA.portable.ServantObjectExt) {
              ((org.omg.CORBA.portable.ServantObjectExt)_so).normalCompletion();
            }
          } catch (java.rmi.RemoteException _vis_rm) {
            if (_so instanceof org.omg.CORBA.portable.ServantObjectExt) {
             ((org.omg.CORBA.portable.ServantObjectExt)_so).exceptionalCompletion((Throwable)_vis_rm);
            }
            throw _vis_rm;
          } catch (java.lang.RuntimeException _vis_re) {
            if (_so instanceof org.omg.CORBA.portable.ServantObjectExt) {
              ((org.omg.CORBA.portable.ServantObjectExt)_so).exceptionalCompletion((Throwable)_vis_re);
            }
            throw _vis_re;
          } catch (java.lang.Error _vis_err) {
            if (_so instanceof org.omg.CORBA.portable.ServantObjectExt) {
              ((org.omg.CORBA.portable.ServantObjectExt)_so).exceptionalCompletion((Throwable)_vis_err);
            }
            throw _vis_err;
          } 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 void purchase () 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("purchase", true);
            _input = this._invoke(_output);
          }
          catch (org.omg.CORBA.portable.ApplicationException _exception) {
            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.NO_RESPONSE _vis_nm ) {
            if(_vis_nm.minor == (org.omg.CORBA.OMGVMCID.value | 99)) {
              return;
            }
            throw _vis_nm;
          }
          catch (org.omg.CORBA.portable.RemarshalException _exception) {
            continue;
          }
          finally {
            this._releaseReply(_input);
          }
        } else {
          ejb.CartOperations _self = null;
          final org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("purchase", _opsClass);
          if (_so == null) {
            continue;
          }
          try {
            _self = (ejb.CartOperations)_so.servant;
          } catch (java.lang.ClassCastException _vis_ce) {
            org.omg.CORBA.portable.OutputStream _output = null;
            org.omg.CORBA.portable.InputStream  _input  = null;

            try {
              _output = _orb().create_output_stream();
              final org.omg.CORBA.portable.OutputStream _response_output = _orb().create_output_stream();
              final org.omg.CORBA.portable.OutputStream _response_ex_output = _orb().create_output_stream();
              com.inprise.vbroker.orb.VBResponseHandler _vis_vbr = com.inprise.vbroker.orb.VBResponseHandler.getResponseHandler(_response_output,_response_ex_output);
              org.omg.CORBA.portable.OutputStream _result_output = (((org.omg.CORBA.portable.InvokeHandler)_so.servant)._invoke("purchase",_output.create_input_stream(),_vis_vbr));
              _input = _result_output.create_input_stream();

              if (_so instanceof org.omg.CORBA.portable.ServantObjectExt) {
                ((org.omg.CORBA.portable.ServantObjectExt)_so).normalCompletion();
              }
              return;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -