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

📄 _carthome_stub.java

📁 EJB 实例
💻 JAVA
字号:

package ejb;

public class _CartHome_Stub extends org.omg.stub.javax.ejb._EJBHome_Stub implements ejb.CartHome, CartHomeOperations {
  final public static java.lang.Class _opsClass = ejb.CartHomeOperations.class;

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

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

  public ejb.Cart create (java.lang.String arg0, 
                          java.lang.String arg1, 
                          java.util.Date arg2) 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;
          ejb.Cart _result;
          try {
            _output = this._request("create", true);
            org.omg.CORBA.WStringValueHelper.write(_output, arg0);
            org.omg.CORBA.WStringValueHelper.write(_output, arg1);
            ((org.omg.CORBA_2_3.portable.OutputStream)_output).write_value((java.io.Serializable)arg2);
            _input = this._invoke(_output);
            //FIX: Cannot use helper class because of potential stub downloading
            _result = (ejb.Cart)javax.rmi.PortableRemoteObject.narrow(_input.read_Object(ejb.Cart.class), ejb.Cart.class);
            return _result;
          }
          catch (org.omg.CORBA.portable.ApplicationException _exception) {
            java.lang.String _exception_id = _exception.getId();
            if (_exception_id.equals("IDL:javax/ejb/CreateEx:1.0")) {
              final org.omg.CORBA.portable.InputStream in = _exception.getInputStream();
              _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.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.CartHomeOperations _self = null;
          final org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke("create", _opsClass);
          if (_so == null) {
            continue;
          }
          try {
            _self = (ejb.CartHomeOperations)_so.servant;
          } catch (java.lang.ClassCastException _vis_ce) {
            org.omg.CORBA.portable.OutputStream _output = null;
            org.omg.CORBA.portable.InputStream  _input  = null;
            ejb.Cart _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.WStringValueHelper.write(_output, arg0);
              org.omg.CORBA.WStringValueHelper.write(_output, arg1);
              ((org.omg.CORBA_2_3.portable.OutputStream)_output).write_value((java.io.Serializable)arg2);
              org.omg.CORBA.portable.OutputStream _result_output = (((org.omg.CORBA.portable.InvokeHandler)_so.servant)._invoke("create",_output.create_input_stream(),_vis_vbr));
              _input = _result_output.create_input_stream();

              if(_vis_vbr.get_exflag()) {
                java.lang.String ex_repid = _input.read_string();
                if(ex_repid.equals("IDL:javax/ejb/CreateEx:1.0")) {
                  org.omg.CORBA_2_3.portable.InputStream _vis_in = ((org.omg.CORBA_2_3.portable.InputStream)_result_output.create_input_stream());
                  _vis_in.read_string();
                  throw (javax.ejb.CreateException)(_vis_in.read_value());
                }
              }

              //FIX: Cannot use helper class because of potential stub downloading
              _result = (ejb.Cart)javax.rmi.PortableRemoteObject.narrow(_input.read_Object(ejb.Cart.class), ejb.Cart.class);

              if (_so instanceof org.omg.CORBA.portable.ServantObjectExt) {
                ((org.omg.CORBA.portable.ServantObjectExt)_so).normalCompletion();
              }
              return _result;
            } catch (javax.ejb.CreateException x_1) {
              if (_so instanceof org.omg.CORBA.portable.ServantObjectExt) {
                ((org.omg.CORBA.portable.ServantObjectExt)_so).exceptionalCompletion((Throwable)x_1);
              }
              throw x_1;

            } 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 {
            ejb.Cart _ret = _self.create(arg0, arg1, arg2);
            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 (javax.ejb.CreateException x_1) {
              if (_so instanceof org.omg.CORBA.portable.ServantObjectExt) {
                ((org.omg.CORBA.portable.ServantObjectExt)_so).exceptionalCompletion((Throwable)x_1);
              }
            throw x_1;
          } 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 + -