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

📄 _cart_stub.java

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

            } 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.purchase();
            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 java.util.List getContents () 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.util.List _result;
          try {
            _output = this._request("_get_contents", true);
            _input = this._invoke(_output);
            _result = (java.util.List)((org.omg.CORBA_2_3.portable.InputStream)_input).read_value(java.util.List.class);
            return _result;
          }
          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 null;
            }
            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("_get_contents", _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;
            java.util.List _result;

            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("_get_contents",_output.create_input_stream(),_vis_vbr));
              _input = _result_output.create_input_stream();

              _result = (java.util.List)((org.omg.CORBA_2_3.portable.InputStream)_input).read_value(java.util.List.class);

              if (_so instanceof org.omg.CORBA.portable.ServantObjectExt) {
                ((org.omg.CORBA.portable.ServantObjectExt)_so).normalCompletion();
              }
              return _result;
            } 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 {
            java.util.List _ret = _self.getContents();
            if (_so instanceof org.omg.CORBA.portable.ServantObjectExt) {
              ((org.omg.CORBA.portable.ServantObjectExt)_so).normalCompletion();
            }
            return _ret;
          } 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);
          }
        }
      }

    }
    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 float getTotalPrice () throws java.rmi.RemoteException {

    try {
      while (true) {
        if (!_is_local()) {
          org.omg.CORBA.portable.OutputStream _output = null;
          org.omg.CORBA.portable.InputStream  _input  = null;
          float _result;
          try {
            _output = this._request("_get_totalPrice", true);
            _input = this._invoke(_output);
            _result = _input.read_float();
            return _result;
          }
          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 0.0F;
            }
            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("_get_totalPrice", _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;
            float _result;

            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("_get_totalPrice",_output.create_input_stream(),_vis_vbr));
              _input = _result_output.create_input_stream();

              _result = _input.read_float();

              if (_so instanceof org.omg.CORBA.portable.ServantObjectExt) {
                ((org.omg.CORBA.portable.ServantObjectExt)_so).normalCompletion();
              }
              return _result;
            } 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 {
            float _ret = _self.getTotalPrice();
            if (_so instanceof org.omg.CORBA.portable.ServantObjectExt) {
              ((org.omg.CORBA.portable.ServantObjectExt)_so).normalCompletion();
            }
            return _ret;
          } 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);
          }
        }
      }

    }
    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);
    }
  }

}

⌨️ 快捷键说明

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