Java Code Examples for org.omg.CORBA.portable.ApplicationException

The following are top voted examples for showing how to use org.omg.CORBA.portable.ApplicationException. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: OpenJSharp   File: ExceptionHandlerImpl.java   Source Code and License 6 votes vote down vote up
public Exception readException( ApplicationException ae )
{
    // Note that the exception ID is present in both ae
    // and in the input stream from ae.  The exception
    // reader must actually read the exception ID from
    // the stream.
    InputStream is = (InputStream)ae.getInputStream() ;
    String excName = ae.getId() ;
    int index = findDeclaredException( excName ) ;
    if (index < 0) {
        excName = is.read_string() ;
        Exception res = new UnexpectedException( excName ) ;
        res.initCause( ae ) ;
        return res ;
    }

    return rws[index].read( is ) ;
}
 
Example 2
Project: openjdk-jdk10   File: ExceptionHandlerImpl.java   Source Code and License 6 votes vote down vote up
public Exception readException( ApplicationException ae )
{
    // Note that the exception ID is present in both ae
    // and in the input stream from ae.  The exception
    // reader must actually read the exception ID from
    // the stream.
    InputStream is = (InputStream)ae.getInputStream() ;
    String excName = ae.getId() ;
    int index = findDeclaredException( excName ) ;
    if (index < 0) {
        excName = is.read_string() ;
        Exception res = new UnexpectedException( excName ) ;
        res.initCause( ae ) ;
        return res ;
    }

    return rws[index].read( is ) ;
}
 
Example 3
Project: openjdk9   File: ExceptionHandlerImpl.java   Source Code and License 6 votes vote down vote up
public Exception readException( ApplicationException ae )
{
    // Note that the exception ID is present in both ae
    // and in the input stream from ae.  The exception
    // reader must actually read the exception ID from
    // the stream.
    InputStream is = (InputStream)ae.getInputStream() ;
    String excName = ae.getId() ;
    int index = findDeclaredException( excName ) ;
    if (index < 0) {
        excName = is.read_string() ;
        Exception res = new UnexpectedException( excName ) ;
        res.initCause( ae ) ;
        return res ;
    }

    return rws[index].read( is ) ;
}
 
Example 4
Project: lookaside_java-1.8.0-openjdk   File: ExceptionHandlerImpl.java   Source Code and License 6 votes vote down vote up
public Exception readException( ApplicationException ae )
{
    // Note that the exception ID is present in both ae
    // and in the input stream from ae.  The exception
    // reader must actually read the exception ID from
    // the stream.
    InputStream is = (InputStream)ae.getInputStream() ;
    String excName = ae.getId() ;
    int index = findDeclaredException( excName ) ;
    if (index < 0) {
        excName = is.read_string() ;
        Exception res = new UnexpectedException( excName ) ;
        res.initCause( ae ) ;
        return res ;
    }

    return rws[index].read( is ) ;
}
 
Example 5
Project: jdk8u_corba   File: ExceptionHandlerImpl.java   Source Code and License 6 votes vote down vote up
public Exception readException( ApplicationException ae )
{
    // Note that the exception ID is present in both ae
    // and in the input stream from ae.  The exception
    // reader must actually read the exception ID from
    // the stream.
    InputStream is = (InputStream)ae.getInputStream() ;
    String excName = ae.getId() ;
    int index = findDeclaredException( excName ) ;
    if (index < 0) {
        excName = is.read_string() ;
        Exception res = new UnexpectedException( excName ) ;
        res.initCause( ae ) ;
        return res ;
    }

    return rws[index].read( is ) ;
}
 
Example 6
Project: javify   File: _DemoTesterStub.java   Source Code and License 6 votes vote down vote up
/**
 * One way call of the remote method.
 */
public void sayHello()
{
  InputStream in = null;
  try
    {
      // As we do not expect any response, the second
      // parameter is 'false'.
      OutputStream out = _request("sayHello", false);
      in = _invoke(out);
    }
  catch (ApplicationException ex)
    {
      in = ex.getInputStream();
      throw new MARSHAL(ex.getId());
    }
  catch (RemarshalException _rm)
    {
      sayHello();
    }
  finally
    {
      _releaseReply(in);
    }
}
 
Example 7
Project: javify   File: _DemoTesterStub.java   Source Code and License 6 votes vote down vote up
/**
 * Set the field value.
 */
public void theField(int newTheField)
{
  InputStream in = null;
  try
    {
      // The special name of operation instructs just to set
      // the field value rather than calling the method.
      OutputStream out = _request("_set_theField", true);
      out.write_long(newTheField);
      in = _invoke(out);
    }
  catch (ApplicationException ex)
    {
      in = ex.getInputStream();
      throw new MARSHAL(ex.getId());
    }
  catch (RemarshalException _rm)
    {
      theField(newTheField);
    }
  finally
    {
      _releaseReply(in);
    }
}
 
Example 8
Project: javify   File: _PolicyStub.java   Source Code and License 6 votes vote down vote up
/** {@inheritDoc} */
public void destroy()
{
  InputStream input = null;
  try
    {
      OutputStream output = _request("destroy", true);
      input = _invoke(output);
    }
  catch (ApplicationException ex)
    {
      input = ex.getInputStream();

      String id = ex.getId();
      throw new MARSHAL(id);
    }
  catch (RemarshalException remarsh)
    {
      destroy();
    }
  finally
    {
      _releaseReply(input);
    }
}
 
Example 9
Project: javify   File: _PolicyStub.java   Source Code and License 6 votes vote down vote up
/** {@inheritDoc} */
public Policy copy()
{
  InputStream input = null;
  try
    {
      OutputStream output = _request("copy", true);
      input = _invoke(output);
      return PolicyHelper.read(input);
    }
  catch (ApplicationException ex)
    {
      input = ex.getInputStream();

      String id = ex.getId();
      throw new MARSHAL(id);
    }
  catch (RemarshalException remarsh)
    {
      return copy();
    }
  finally
    {
      _releaseReply(input);
    }
}
 
Example 10
Project: javify   File: _IDLTypeStub.java   Source Code and License 6 votes vote down vote up
/**
 * Get the definition kind of the remote IDL type object. The method is
 * written following OMG specification, treating the typecode
 * as a read only attribute rather than a method. This means,
 * the operation name is "_get_def_kind".
 *
 * @return a definition kind, returned by remote IDL type object.
 */
public DefinitionKind def_kind()
{
  InputStream in = null;
  try
    {
      OutputStream out = _request("_get_def_kind", true);
      in = _invoke(out);
      return DefinitionKindHelper.read(in);
    }
  catch (ApplicationException ex)
    {
      in = ex.getInputStream();
      throw new org.omg.CORBA.MARSHAL(ex.getId());
    }
  catch (RemarshalException rex)
    {
      return def_kind();
    }
  finally
    {
      _releaseReply(in);
    }
}
 
Example 11
Project: javify   File: _IDLTypeStub.java   Source Code and License 6 votes vote down vote up
/**
 * Destroy the remote IDL type object.
 */
public void destroy()
{
  InputStream in = null;
  try
    {
      OutputStream out = _request("destroy", true);
      in = _invoke(out);
    }
  catch (ApplicationException ex)
    {
      in = ex.getInputStream();
      throw new org.omg.CORBA.MARSHAL(ex.getId());
    }
  catch (RemarshalException rex)
    {
      destroy();
    }
  finally
    {
      _releaseReply(in);
    }
}
 
Example 12
Project: javify   File: _NamingContextStub.java   Source Code and License 6 votes vote down vote up
/** {@inheritDoc} */
public NamingContext new_context()
{
  InputStream in = null;
  try
    {
      OutputStream out = _request("new_context", true);
      in = _invoke(out);

      NamingContext __result = NamingContextHelper.read(in);
      return __result;
    }
  catch (ApplicationException ex)
    {
      in = ex.getInputStream();
      throw new MARSHAL(ex.getId());
    }
  catch (RemarshalException remarsh)
    {
      return new_context();
    }
  finally
    {
      _releaseReply(in);
    }
}
 
Example 13
Project: javify   File: _IORInterceptor_3_0Stub.java   Source Code and License 6 votes vote down vote up
/** {@inheritDoc} */
public void components_established(IORInfo info)
{
  InputStream input = null;
  try
    {
      OutputStream output = _request("components_established", true);
      output.write_Object(info);
      input = _invoke(output);

    }
  catch (ApplicationException ex)
    {
      input = ex.getInputStream();
      String id = ex.getId();
      throw new MARSHAL(id);
    }
  catch (RemarshalException remarsh)
    {
      components_established(info);
    }
  finally
    {
      _releaseReply(input);
    }
}
 
Example 14
Project: javify   File: _IORInterceptor_3_0Stub.java   Source Code and License 6 votes vote down vote up
/** {@inheritDoc} */
public void establish_components(IORInfo info)
{
  InputStream input = null;
  try
    {
      OutputStream output = _request("establish_components", true);
      output.write_Object(info);
      input = _invoke(output);

    }
  catch (ApplicationException ex)
    {
      input = ex.getInputStream();
      String id = ex.getId();
      throw new MARSHAL(id);
    }
  catch (RemarshalException remarsh)
    {
      establish_components(info);
    }
  finally
    {
      _releaseReply(input);
    }
}
 
Example 15
Project: javify   File: _IORInterceptor_3_0Stub.java   Source Code and License 6 votes vote down vote up
/** {@inheritDoc} */
public void destroy()
{
  InputStream input = null;
  try
    {
      OutputStream output = _request("destroy", true);
      input = _invoke(output);

    }
  catch (ApplicationException ex)
    {
      input = ex.getInputStream();
      String id = ex.getId();
      throw new MARSHAL(id);
    }
  catch (RemarshalException remarsh)
    {
      destroy();
    }
  finally
    {
      _releaseReply(input);
    }
}
 
Example 16
Project: jvm-stm   File: _DemoTesterStub.java   Source Code and License 6 votes vote down vote up
/**
 * One way call of the remote method.
 */
public void sayHello()
{
  InputStream in = null;
  try
    {
      // As we do not expect any response, the second
      // parameter is 'false'.
      OutputStream out = _request("sayHello", false);
      in = _invoke(out);
    }
  catch (ApplicationException ex)
    {
      in = ex.getInputStream();
      throw new MARSHAL(ex.getId());
    }
  catch (RemarshalException _rm)
    {
      sayHello();
    }
  finally
    {
      _releaseReply(in);
    }
}
 
Example 17
Project: jvm-stm   File: _DemoTesterStub.java   Source Code and License 6 votes vote down vote up
/**
 * Set the field value.
 */
public void theField(int newTheField)
{
  InputStream in = null;
  try
    {
      // The special name of operation instructs just to set
      // the field value rather than calling the method.
      OutputStream out = _request("_set_theField", true);
      out.write_long(newTheField);
      in = _invoke(out);
    }
  catch (ApplicationException ex)
    {
      in = ex.getInputStream();
      throw new MARSHAL(ex.getId());
    }
  catch (RemarshalException _rm)
    {
      theField(newTheField);
    }
  finally
    {
      _releaseReply(in);
    }
}
 
Example 18
Project: jvm-stm   File: _PolicyStub.java   Source Code and License 6 votes vote down vote up
/** {@inheritDoc} */
public void destroy()
{
  InputStream input = null;
  try
    {
      OutputStream output = _request("destroy", true);
      input = _invoke(output);
    }
  catch (ApplicationException ex)
    {
      input = ex.getInputStream();

      String id = ex.getId();
      throw new MARSHAL(id);
    }
  catch (RemarshalException remarsh)
    {
      destroy();
    }
  finally
    {
      _releaseReply(input);
    }
}
 
Example 19
Project: jvm-stm   File: _PolicyStub.java   Source Code and License 6 votes vote down vote up
/** {@inheritDoc} */
public Policy copy()
{
  InputStream input = null;
  try
    {
      OutputStream output = _request("copy", true);
      input = _invoke(output);
      return PolicyHelper.read(input);
    }
  catch (ApplicationException ex)
    {
      input = ex.getInputStream();

      String id = ex.getId();
      throw new MARSHAL(id);
    }
  catch (RemarshalException remarsh)
    {
      return copy();
    }
  finally
    {
      _releaseReply(input);
    }
}
 
Example 20
Project: jvm-stm   File: _IDLTypeStub.java   Source Code and License 6 votes vote down vote up
/**
 * Get the definition kind of the remote IDL type object. The method is
 * written following OMG specification, treating the typecode
 * as a read only attribute rather than a method. This means,
 * the operation name is "_get_def_kind".
 *
 * @return a definition kind, returned by remote IDL type object.
 */
public DefinitionKind def_kind()
{
  InputStream in = null;
  try
    {
      OutputStream out = _request("_get_def_kind", true);
      in = _invoke(out);
      return DefinitionKindHelper.read(in);
    }
  catch (ApplicationException ex)
    {
      in = ex.getInputStream();
      throw new org.omg.CORBA.MARSHAL(ex.getId());
    }
  catch (RemarshalException rex)
    {
      return def_kind();
    }
  finally
    {
      _releaseReply(in);
    }
}
 
Example 21
Project: jvm-stm   File: _IDLTypeStub.java   Source Code and License 6 votes vote down vote up
/**
 * Destroy the remote IDL type object.
 */
public void destroy()
{
  InputStream in = null;
  try
    {
      OutputStream out = _request("destroy", true);
      in = _invoke(out);
    }
  catch (ApplicationException ex)
    {
      in = ex.getInputStream();
      throw new org.omg.CORBA.MARSHAL(ex.getId());
    }
  catch (RemarshalException rex)
    {
      destroy();
    }
  finally
    {
      _releaseReply(in);
    }
}
 
Example 22
Project: jvm-stm   File: _NamingContextStub.java   Source Code and License 6 votes vote down vote up
/** {@inheritDoc} */
public NamingContext new_context()
{
  InputStream in = null;
  try
    {
      OutputStream out = _request("new_context", true);
      in = _invoke(out);

      NamingContext __result = NamingContextHelper.read(in);
      return __result;
    }
  catch (ApplicationException ex)
    {
      in = ex.getInputStream();
      throw new MARSHAL(ex.getId());
    }
  catch (RemarshalException remarsh)
    {
      return new_context();
    }
  finally
    {
      _releaseReply(in);
    }
}
 
Example 23
Project: jvm-stm   File: _IORInterceptor_3_0Stub.java   Source Code and License 6 votes vote down vote up
/** {@inheritDoc} */
public void components_established(IORInfo info)
{
  InputStream input = null;
  try
    {
      OutputStream output = _request("components_established", true);
      output.write_Object(info);
      input = _invoke(output);

    }
  catch (ApplicationException ex)
    {
      input = ex.getInputStream();
      String id = ex.getId();
      throw new MARSHAL(id);
    }
  catch (RemarshalException remarsh)
    {
      components_established(info);
    }
  finally
    {
      _releaseReply(input);
    }
}
 
Example 24
Project: jvm-stm   File: _IORInterceptor_3_0Stub.java   Source Code and License 6 votes vote down vote up
/** {@inheritDoc} */
public void establish_components(IORInfo info)
{
  InputStream input = null;
  try
    {
      OutputStream output = _request("establish_components", true);
      output.write_Object(info);
      input = _invoke(output);

    }
  catch (ApplicationException ex)
    {
      input = ex.getInputStream();
      String id = ex.getId();
      throw new MARSHAL(id);
    }
  catch (RemarshalException remarsh)
    {
      establish_components(info);
    }
  finally
    {
      _releaseReply(input);
    }
}
 
Example 25
Project: jvm-stm   File: _IORInterceptor_3_0Stub.java   Source Code and License 6 votes vote down vote up
/** {@inheritDoc} */
public void destroy()
{
  InputStream input = null;
  try
    {
      OutputStream output = _request("destroy", true);
      input = _invoke(output);

    }
  catch (ApplicationException ex)
    {
      input = ex.getInputStream();
      String id = ex.getId();
      throw new MARSHAL(id);
    }
  catch (RemarshalException remarsh)
    {
      destroy();
    }
  finally
    {
      _releaseReply(input);
    }
}
 
Example 26
Project: infobip-open-jdk-8   File: ExceptionHandlerImpl.java   Source Code and License 6 votes vote down vote up
public Exception readException( ApplicationException ae )
{
    // Note that the exception ID is present in both ae
    // and in the input stream from ae.  The exception
    // reader must actually read the exception ID from
    // the stream.
    InputStream is = (InputStream)ae.getInputStream() ;
    String excName = ae.getId() ;
    int index = findDeclaredException( excName ) ;
    if (index < 0) {
        excName = is.read_string() ;
        Exception res = new UnexpectedException( excName ) ;
        res.initCause( ae ) ;
        return res ;
    }

    return rws[index].read( is ) ;
}
 
Example 27
Project: openjdk-source-code-learn   File: ExceptionHandlerImpl.java   Source Code and License 6 votes vote down vote up
public Exception readException( ApplicationException ae )
{
    // Note that the exception ID is present in both ae
    // and in the input stream from ae.  The exception
    // reader must actually read the exception ID from
    // the stream.
    InputStream is = (InputStream)ae.getInputStream() ;
    String excName = ae.getId() ;
    int index = findDeclaredException( excName ) ;
    if (index < 0) {
        excName = is.read_string() ;
        Exception res = new UnexpectedException( excName ) ;
        res.initCause( ae ) ;
        return res ;
    }

    return rws[index].read( is ) ;
}
 
Example 28
Project: OLD-OpenJDK8   File: ExceptionHandlerImpl.java   Source Code and License 6 votes vote down vote up
public Exception readException( ApplicationException ae )
{
    // Note that the exception ID is present in both ae
    // and in the input stream from ae.  The exception
    // reader must actually read the exception ID from
    // the stream.
    InputStream is = (InputStream)ae.getInputStream() ;
    String excName = ae.getId() ;
    int index = findDeclaredException( excName ) ;
    if (index < 0) {
        excName = is.read_string() ;
        Exception res = new UnexpectedException( excName ) ;
        res.initCause( ae ) ;
        return res ;
    }

    return rws[index].read( is ) ;
}
 
Example 29
Project: JamVM-PH   File: _DemoTesterStub.java   Source Code and License 6 votes vote down vote up
/**
 * One way call of the remote method.
 */
public void sayHello()
{
  InputStream in = null;
  try
    {
      // As we do not expect any response, the second
      // parameter is 'false'.
      OutputStream out = _request("sayHello", false);
      in = _invoke(out);
    }
  catch (ApplicationException ex)
    {
      in = ex.getInputStream();
      throw new MARSHAL(ex.getId());
    }
  catch (RemarshalException _rm)
    {
      sayHello();
    }
  finally
    {
      _releaseReply(in);
    }
}
 
Example 30
Project: JamVM-PH   File: _DemoTesterStub.java   Source Code and License 6 votes vote down vote up
/**
 * Set the field value.
 */
public void theField(int newTheField)
{
  InputStream in = null;
  try
    {
      // The special name of operation instructs just to set
      // the field value rather than calling the method.
      OutputStream out = _request("_set_theField", true);
      out.write_long(newTheField);
      in = _invoke(out);
    }
  catch (ApplicationException ex)
    {
      in = ex.getInputStream();
      throw new MARSHAL(ex.getId());
    }
  catch (RemarshalException _rm)
    {
      theField(newTheField);
    }
  finally
    {
      _releaseReply(in);
    }
}
 
Example 31
Project: JamVM-PH   File: _PolicyStub.java   Source Code and License 6 votes vote down vote up
/** {@inheritDoc} */
public void destroy()
{
  InputStream input = null;
  try
    {
      OutputStream output = _request("destroy", true);
      input = _invoke(output);
    }
  catch (ApplicationException ex)
    {
      input = ex.getInputStream();

      String id = ex.getId();
      throw new MARSHAL(id);
    }
  catch (RemarshalException remarsh)
    {
      destroy();
    }
  finally
    {
      _releaseReply(input);
    }
}
 
Example 32
Project: JamVM-PH   File: _PolicyStub.java   Source Code and License 6 votes vote down vote up
/** {@inheritDoc} */
public Policy copy()
{
  InputStream input = null;
  try
    {
      OutputStream output = _request("copy", true);
      input = _invoke(output);
      return PolicyHelper.read(input);
    }
  catch (ApplicationException ex)
    {
      input = ex.getInputStream();

      String id = ex.getId();
      throw new MARSHAL(id);
    }
  catch (RemarshalException remarsh)
    {
      return copy();
    }
  finally
    {
      _releaseReply(input);
    }
}
 
Example 33
Project: JamVM-PH   File: _IDLTypeStub.java   Source Code and License 6 votes vote down vote up
/**
 * Get the definition kind of the remote IDL type object. The method is
 * written following OMG specification, treating the typecode
 * as a read only attribute rather than a method. This means,
 * the operation name is "_get_def_kind".
 *
 * @return a definition kind, returned by remote IDL type object.
 */
public DefinitionKind def_kind()
{
  InputStream in = null;
  try
    {
      OutputStream out = _request("_get_def_kind", true);
      in = _invoke(out);
      return DefinitionKindHelper.read(in);
    }
  catch (ApplicationException ex)
    {
      in = ex.getInputStream();
      throw new org.omg.CORBA.MARSHAL(ex.getId());
    }
  catch (RemarshalException rex)
    {
      return def_kind();
    }
  finally
    {
      _releaseReply(in);
    }
}
 
Example 34
Project: JamVM-PH   File: _IDLTypeStub.java   Source Code and License 6 votes vote down vote up
/**
 * Destroy the remote IDL type object.
 */
public void destroy()
{
  InputStream in = null;
  try
    {
      OutputStream out = _request("destroy", true);
      in = _invoke(out);
    }
  catch (ApplicationException ex)
    {
      in = ex.getInputStream();
      throw new org.omg.CORBA.MARSHAL(ex.getId());
    }
  catch (RemarshalException rex)
    {
      destroy();
    }
  finally
    {
      _releaseReply(in);
    }
}
 
Example 35
Project: JamVM-PH   File: _NamingContextStub.java   Source Code and License 6 votes vote down vote up
/** {@inheritDoc} */
public NamingContext new_context()
{
  InputStream in = null;
  try
    {
      OutputStream out = _request("new_context", true);
      in = _invoke(out);

      NamingContext __result = NamingContextHelper.read(in);
      return __result;
    }
  catch (ApplicationException ex)
    {
      in = ex.getInputStream();
      throw new MARSHAL(ex.getId());
    }
  catch (RemarshalException remarsh)
    {
      return new_context();
    }
  finally
    {
      _releaseReply(in);
    }
}
 
Example 36
Project: JamVM-PH   File: _IORInterceptor_3_0Stub.java   Source Code and License 6 votes vote down vote up
/** {@inheritDoc} */
public void components_established(IORInfo info)
{
  InputStream input = null;
  try
    {
      OutputStream output = _request("components_established", true);
      output.write_Object(info);
      input = _invoke(output);

    }
  catch (ApplicationException ex)
    {
      input = ex.getInputStream();
      String id = ex.getId();
      throw new MARSHAL(id);
    }
  catch (RemarshalException remarsh)
    {
      components_established(info);
    }
  finally
    {
      _releaseReply(input);
    }
}
 
Example 37
Project: JamVM-PH   File: _IORInterceptor_3_0Stub.java   Source Code and License 6 votes vote down vote up
/** {@inheritDoc} */
public void establish_components(IORInfo info)
{
  InputStream input = null;
  try
    {
      OutputStream output = _request("establish_components", true);
      output.write_Object(info);
      input = _invoke(output);

    }
  catch (ApplicationException ex)
    {
      input = ex.getInputStream();
      String id = ex.getId();
      throw new MARSHAL(id);
    }
  catch (RemarshalException remarsh)
    {
      establish_components(info);
    }
  finally
    {
      _releaseReply(input);
    }
}
 
Example 38
Project: JamVM-PH   File: _IORInterceptor_3_0Stub.java   Source Code and License 6 votes vote down vote up
/** {@inheritDoc} */
public void destroy()
{
  InputStream input = null;
  try
    {
      OutputStream output = _request("destroy", true);
      input = _invoke(output);

    }
  catch (ApplicationException ex)
    {
      input = ex.getInputStream();
      String id = ex.getId();
      throw new MARSHAL(id);
    }
  catch (RemarshalException remarsh)
    {
      destroy();
    }
  finally
    {
      _releaseReply(input);
    }
}
 
Example 39
Project: openjdk-orb   File: ExceptionHandlerImpl.java   Source Code and License 6 votes vote down vote up
public Exception readException( ApplicationException ae )
{
    // Note that the exception ID is present in both ae
    // and in the input stream from ae.  The exception
    // reader must actually read the exception ID from
    // the stream.
    InputStream is = (InputStream)ae.getInputStream() ;
    String excName = ae.getId() ;
    int index = findDeclaredException( excName ) ;
    if (index < 0) {
        excName = is.read_string() ;
        Exception res = new UnexpectedException( excName ) ;
        res.initCause( ae ) ;
        return res ;
    }

    return rws[index].read( is ) ;
}
 
Example 40
Project: classpath   File: _DemoTesterStub.java   Source Code and License 6 votes vote down vote up
/**
 * One way call of the remote method.
 */
public void sayHello()
{
  InputStream in = null;
  try
    {
      // As we do not expect any response, the second
      // parameter is 'false'.
      OutputStream out = _request("sayHello", false);
      in = _invoke(out);
    }
  catch (ApplicationException ex)
    {
      in = ex.getInputStream();
      throw new MARSHAL(ex.getId());
    }
  catch (RemarshalException _rm)
    {
      sayHello();
    }
  finally
    {
      _releaseReply(in);
    }
}
 
Example 41
Project: classpath   File: _DemoTesterStub.java   Source Code and License 6 votes vote down vote up
/**
 * Set the field value.
 */
public void theField(int newTheField)
{
  InputStream in = null;
  try
    {
      // The special name of operation instructs just to set
      // the field value rather than calling the method.
      OutputStream out = _request("_set_theField", true);
      out.write_long(newTheField);
      in = _invoke(out);
    }
  catch (ApplicationException ex)
    {
      in = ex.getInputStream();
      throw new MARSHAL(ex.getId());
    }
  catch (RemarshalException _rm)
    {
      theField(newTheField);
    }
  finally
    {
      _releaseReply(in);
    }
}
 
Example 42
Project: classpath   File: _PolicyStub.java   Source Code and License 6 votes vote down vote up
/** {@inheritDoc} */
public void destroy()
{
  InputStream input = null;
  try
    {
      OutputStream output = _request("destroy", true);
      input = _invoke(output);
    }
  catch (ApplicationException ex)
    {
      input = ex.getInputStream();

      String id = ex.getId();
      throw new MARSHAL(id);
    }
  catch (RemarshalException remarsh)
    {
      destroy();
    }
  finally
    {
      _releaseReply(input);
    }
}
 
Example 43
Project: classpath   File: _PolicyStub.java   Source Code and License 6 votes vote down vote up
/** {@inheritDoc} */
public Policy copy()
{
  InputStream input = null;
  try
    {
      OutputStream output = _request("copy", true);
      input = _invoke(output);
      return PolicyHelper.read(input);
    }
  catch (ApplicationException ex)
    {
      input = ex.getInputStream();

      String id = ex.getId();
      throw new MARSHAL(id);
    }
  catch (RemarshalException remarsh)
    {
      return copy();
    }
  finally
    {
      _releaseReply(input);
    }
}
 
Example 44
Project: classpath   File: _IDLTypeStub.java   Source Code and License 6 votes vote down vote up
/**
 * Get the definition kind of the remote IDL type object. The method is
 * written following OMG specification, treating the typecode
 * as a read only attribute rather than a method. This means,
 * the operation name is "_get_def_kind".
 *
 * @return a definition kind, returned by remote IDL type object.
 */
public DefinitionKind def_kind()
{
  InputStream in = null;
  try
    {
      OutputStream out = _request("_get_def_kind", true);
      in = _invoke(out);
      return DefinitionKindHelper.read(in);
    }
  catch (ApplicationException ex)
    {
      in = ex.getInputStream();
      throw new org.omg.CORBA.MARSHAL(ex.getId());
    }
  catch (RemarshalException rex)
    {
      return def_kind();
    }
  finally
    {
      _releaseReply(in);
    }
}
 
Example 45
Project: classpath   File: _IDLTypeStub.java   Source Code and License 6 votes vote down vote up
/**
 * Destroy the remote IDL type object.
 */
public void destroy()
{
  InputStream in = null;
  try
    {
      OutputStream out = _request("destroy", true);
      in = _invoke(out);
    }
  catch (ApplicationException ex)
    {
      in = ex.getInputStream();
      throw new org.omg.CORBA.MARSHAL(ex.getId());
    }
  catch (RemarshalException rex)
    {
      destroy();
    }
  finally
    {
      _releaseReply(in);
    }
}
 
Example 46
Project: classpath   File: _NamingContextStub.java   Source Code and License 6 votes vote down vote up
/** {@inheritDoc} */
public NamingContext new_context()
{
  InputStream in = null;
  try
    {
      OutputStream out = _request("new_context", true);
      in = _invoke(out);

      NamingContext __result = NamingContextHelper.read(in);
      return __result;
    }
  catch (ApplicationException ex)
    {
      in = ex.getInputStream();
      throw new MARSHAL(ex.getId());
    }
  catch (RemarshalException remarsh)
    {
      return new_context();
    }
  finally
    {
      _releaseReply(in);
    }
}
 
Example 47
Project: classpath   File: _IORInterceptor_3_0Stub.java   Source Code and License 6 votes vote down vote up
/** {@inheritDoc} */
public void components_established(IORInfo info)
{
  InputStream input = null;
  try
    {
      OutputStream output = _request("components_established", true);
      output.write_Object(info);
      input = _invoke(output);

    }
  catch (ApplicationException ex)
    {
      input = ex.getInputStream();
      String id = ex.getId();
      throw new MARSHAL(id);
    }
  catch (RemarshalException remarsh)
    {
      components_established(info);
    }
  finally
    {
      _releaseReply(input);
    }
}
 
Example 48
Project: classpath   File: _IORInterceptor_3_0Stub.java   Source Code and License 6 votes vote down vote up
/** {@inheritDoc} */
public void establish_components(IORInfo info)
{
  InputStream input = null;
  try
    {
      OutputStream output = _request("establish_components", true);
      output.write_Object(info);
      input = _invoke(output);

    }
  catch (ApplicationException ex)
    {
      input = ex.getInputStream();
      String id = ex.getId();
      throw new MARSHAL(id);
    }
  catch (RemarshalException remarsh)
    {
      establish_components(info);
    }
  finally
    {
      _releaseReply(input);
    }
}
 
Example 49
Project: classpath   File: _IORInterceptor_3_0Stub.java   Source Code and License 6 votes vote down vote up
/** {@inheritDoc} */
public void destroy()
{
  InputStream input = null;
  try
    {
      OutputStream output = _request("destroy", true);
      input = _invoke(output);

    }
  catch (ApplicationException ex)
    {
      input = ex.getInputStream();
      String id = ex.getId();
      throw new MARSHAL(id);
    }
  catch (RemarshalException remarsh)
    {
      destroy();
    }
  finally
    {
      _releaseReply(input);
    }
}
 
Example 50
Project: openjdk-icedtea7   File: ExceptionHandlerImpl.java   Source Code and License 6 votes vote down vote up
public Exception readException( ApplicationException ae )
{
    // Note that the exception ID is present in both ae
    // and in the input stream from ae.  The exception
    // reader must actually read the exception ID from
    // the stream.
    InputStream is = (InputStream)ae.getInputStream() ;
    String excName = ae.getId() ;
    int index = findDeclaredException( excName ) ;
    if (index < 0) {
        excName = is.read_string() ;
        Exception res = new UnexpectedException( excName ) ;
        res.initCause( ae ) ;
        return res ;
    }

    return rws[index].read( is ) ;
}
 
Example 51
Project: OpenJSharp   File: CorbaClientDelegateImpl.java   Source Code and License 5 votes vote down vote up
public InputStream invoke(org.omg.CORBA.Object self, OutputStream output)
    throws
        ApplicationException,
        RemarshalException
{
    ClientRequestDispatcher subcontract = getClientRequestDispatcher();
    return (InputStream)
        subcontract.marshalingComplete((Object)self, (OutputObject)output);
}
 
Example 52
Project: OpenJSharp   File: ClientRequestInfoImpl.java   Source Code and License 5 votes vote down vote up
/**
 * The CORBA::RepositoryId of the exception to be returned to the client.
 */
public String received_exception_id (){
    checkAccess( MID_RECEIVED_EXCEPTION_ID );

    if( cachedReceivedExceptionId == null ) {
        String result = null;

        if( exception == null ) {
            // Note: exception should never be null here since we will
            // throw a BAD_INV_ORDER if this is not called from
            // receive_exception.
            throw wrapper.exceptionWasNull() ;
        } else if( exception instanceof SystemException ) {
            String name = exception.getClass().getName();
            result = ORBUtility.repositoryIdOf(name);
        } else if( exception instanceof ApplicationException ) {
            result = ((ApplicationException)exception).getId();
        }

        // _REVISIT_ We need to be able to handle a UserException in the
        // DII case.  How do we extract the ID from a UserException?

        cachedReceivedExceptionId = result;
    }

    return cachedReceivedExceptionId;
}
 
Example 53
Project: openjdk-jdk10   File: CorbaClientDelegateImpl.java   Source Code and License 5 votes vote down vote up
public InputStream invoke(org.omg.CORBA.Object self, OutputStream output)
    throws
        ApplicationException,
        RemarshalException
{
    ClientRequestDispatcher subcontract = getClientRequestDispatcher();
    return (InputStream)
        subcontract.marshalingComplete((Object)self, (OutputObject)output);
}
 
Example 54
Project: openjdk-jdk10   File: ClientRequestInfoImpl.java   Source Code and License 5 votes vote down vote up
/**
 * The CORBA::RepositoryId of the exception to be returned to the client.
 */
public String received_exception_id (){
    checkAccess( MID_RECEIVED_EXCEPTION_ID );

    if( cachedReceivedExceptionId == null ) {
        String result = null;

        if( exception == null ) {
            // Note: exception should never be null here since we will
            // throw a BAD_INV_ORDER if this is not called from
            // receive_exception.
            throw wrapper.exceptionWasNull() ;
        } else if( exception instanceof SystemException ) {
            String name = exception.getClass().getName();
            result = ORBUtility.repositoryIdOf(name);
        } else if( exception instanceof ApplicationException ) {
            result = ((ApplicationException)exception).getId();
        }

        // _REVISIT_ We need to be able to handle a UserException in the
        // DII case.  How do we extract the ID from a UserException?

        cachedReceivedExceptionId = result;
    }

    return cachedReceivedExceptionId;
}
 
Example 55
Project: openjdk9   File: CorbaClientRequestDispatcherImpl.java   Source Code and License 5 votes vote down vote up
public InputObject marshalingComplete(java.lang.Object self,
                                      OutputObject outputObject)
    throws
        ApplicationException,
        org.omg.CORBA.portable.RemarshalException
{
    ORB orb = null;
    CorbaMessageMediator messageMediator = null;
    try {
        messageMediator = (CorbaMessageMediator)
            outputObject.getMessageMediator();

        orb = (ORB) messageMediator.getBroker();

        if (orb.subcontractDebugFlag) {
            dprint(".marshalingComplete->: " + opAndId(messageMediator));
        }

        InputObject inputObject =
            marshalingComplete1(orb, messageMediator);

        return processResponse(orb, messageMediator, inputObject);

    } finally {
        if (orb.subcontractDebugFlag) {
            dprint(".marshalingComplete<-: " + opAndId(messageMediator));
        }
    }
}
 
Example 56
Project: openjdk9   File: CorbaClientDelegateImpl.java   Source Code and License 5 votes vote down vote up
public InputStream invoke(org.omg.CORBA.Object self, OutputStream output)
    throws
        ApplicationException,
        RemarshalException
{
    ClientRequestDispatcher subcontract = getClientRequestDispatcher();
    return (InputStream)
        subcontract.marshalingComplete((Object)self, (OutputObject)output);
}
 
Example 57
Project: openjdk9   File: ClientRequestInfoImpl.java   Source Code and License 5 votes vote down vote up
/**
 * The CORBA::RepositoryId of the exception to be returned to the client.
 */
public String received_exception_id (){
    checkAccess( MID_RECEIVED_EXCEPTION_ID );

    if( cachedReceivedExceptionId == null ) {
        String result = null;

        if( exception == null ) {
            // Note: exception should never be null here since we will
            // throw a BAD_INV_ORDER if this is not called from
            // receive_exception.
            throw wrapper.exceptionWasNull() ;
        } else if( exception instanceof SystemException ) {
            String name = exception.getClass().getName();
            result = ORBUtility.repositoryIdOf(name);
        } else if( exception instanceof ApplicationException ) {
            result = ((ApplicationException)exception).getId();
        }

        // _REVISIT_ We need to be able to handle a UserException in the
        // DII case.  How do we extract the ID from a UserException?

        cachedReceivedExceptionId = result;
    }

    return cachedReceivedExceptionId;
}
 
Example 58
Project: lookaside_java-1.8.0-openjdk   File: CorbaClientRequestDispatcherImpl.java   Source Code and License 5 votes vote down vote up
public InputObject marshalingComplete(java.lang.Object self,
                                      OutputObject outputObject)
    throws
        ApplicationException,
        org.omg.CORBA.portable.RemarshalException
{
    ORB orb = null;
    CorbaMessageMediator messageMediator = null;
    try {
        messageMediator = (CorbaMessageMediator)
            outputObject.getMessageMediator();

        orb = (ORB) messageMediator.getBroker();

        if (orb.subcontractDebugFlag) {
            dprint(".marshalingComplete->: " + opAndId(messageMediator));
        }

        InputObject inputObject =
            marshalingComplete1(orb, messageMediator);

        return processResponse(orb, messageMediator, inputObject);

    } finally {
        if (orb.subcontractDebugFlag) {
            dprint(".marshalingComplete<-: " + opAndId(messageMediator));
        }
    }
}
 
Example 59
Project: lookaside_java-1.8.0-openjdk   File: CorbaClientDelegateImpl.java   Source Code and License 5 votes vote down vote up
public InputStream invoke(org.omg.CORBA.Object self, OutputStream output)
    throws
        ApplicationException,
        RemarshalException
{
    ClientRequestDispatcher subcontract = getClientRequestDispatcher();
    return (InputStream)
        subcontract.marshalingComplete((Object)self, (OutputObject)output);
}
 
Example 60
Project: lookaside_java-1.8.0-openjdk   File: ClientRequestInfoImpl.java   Source Code and License 5 votes vote down vote up
/**
 * The CORBA::RepositoryId of the exception to be returned to the client.
 */
public String received_exception_id (){
    checkAccess( MID_RECEIVED_EXCEPTION_ID );

    if( cachedReceivedExceptionId == null ) {
        String result = null;

        if( exception == null ) {
            // Note: exception should never be null here since we will
            // throw a BAD_INV_ORDER if this is not called from
            // receive_exception.
            throw wrapper.exceptionWasNull() ;
        } else if( exception instanceof SystemException ) {
            String name = exception.getClass().getName();
            result = ORBUtility.repositoryIdOf(name);
        } else if( exception instanceof ApplicationException ) {
            result = ((ApplicationException)exception).getId();
        }

        // _REVISIT_ We need to be able to handle a UserException in the
        // DII case.  How do we extract the ID from a UserException?

        cachedReceivedExceptionId = result;
    }

    return cachedReceivedExceptionId;
}