Java Code Examples for org.omg.PortableServer.ForwardRequest

The following are top voted examples for showing how to use org.omg.PortableServer.ForwardRequest. 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: ServantManagerImpl.java   Source Code and License 5 votes vote down vote up
public Servant preinvoke(byte[] oid, POA adapter, String operation,
                         CookieHolder cookie) throws ForwardRequest
{

    String objKey = new String(oid);

    Servant servant = (Servant) contexts.get(objKey);

    if (servant == null)
    {
             servant =  readInContext(objKey);
    }

    return servant;
}
 
Example 2
Project: OpenJSharp   File: POAPolicyMediatorImpl_NR_UDS.java   Source Code and License 5 votes vote down vote up
protected java.lang.Object internalGetServant( byte[] id,
    String operation ) throws ForwardRequest
{
    if (defaultServant == null)
        throw poa.invocationWrapper().poaNoDefaultServant() ;

    return defaultServant;
}
 
Example 3
Project: OpenJSharp   File: POAImpl.java   Source Code and License 5 votes vote down vote up
public void getInvocationServant( OAInvocationInfo info )
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling getInvocationServant on poa " + this ) ;
        }

        java.lang.Object servant = null ;

        try {
            servant = mediator.getInvocationServant( info.id(),
                info.getOperation() );
        } catch (ForwardRequest freq) {
            throw new ForwardException( getORB(), freq.forward_reference ) ;
        }

        info.setServant( servant ) ;
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting getInvocationServant on poa " + this ) ;
        }

        unlock() ;
    }
}
 
Example 4
Project: OpenJSharp   File: POAPolicyMediatorImpl_R_UDS.java   Source Code and License 5 votes vote down vote up
protected java.lang.Object internalGetServant( byte[] id,
    String operation ) throws ForwardRequest
{
    Servant servant = internalIdToServant( id ) ;
    if (servant == null)
        servant = defaultServant ;

    if (servant == null)
        throw poa.invocationWrapper().poaNoDefaultServant() ;

    return servant ;
}
 
Example 5
Project: OpenJSharp   File: POAPolicyMediatorBase.java   Source Code and License 5 votes vote down vote up
public final java.lang.Object getInvocationServant( byte[] id,
    String operation ) throws ForwardRequest
{
    java.lang.Object result = internalGetServant( id, operation ) ;

    return result ;
}
 
Example 6
Project: openjdk-jdk10   File: ServantManagerImpl.java   Source Code and License 5 votes vote down vote up
public Servant preinvoke(byte[] oid, POA adapter, String operation,
                         CookieHolder cookie) throws ForwardRequest
{

    String objKey = new String(oid);

    Servant servant = (Servant) contexts.get(objKey);

    if (servant == null)
    {
             servant =  readInContext(objKey);
    }

    return servant;
}
 
Example 7
Project: openjdk-jdk10   File: POAPolicyMediatorImpl_NR_UDS.java   Source Code and License 5 votes vote down vote up
protected java.lang.Object internalGetServant( byte[] id,
    String operation ) throws ForwardRequest
{
    if (defaultServant == null)
        throw poa.invocationWrapper().poaNoDefaultServant() ;

    return defaultServant;
}
 
Example 8
Project: openjdk-jdk10   File: POAImpl.java   Source Code and License 5 votes vote down vote up
public void getInvocationServant( OAInvocationInfo info )
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling getInvocationServant on poa " + this ) ;
        }

        java.lang.Object servant = null ;

        try {
            servant = mediator.getInvocationServant( info.id(),
                info.getOperation() );
        } catch (ForwardRequest freq) {
            throw new ForwardException( getORB(), freq.forward_reference ) ;
        }

        info.setServant( servant ) ;
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting getInvocationServant on poa " + this ) ;
        }

        unlock() ;
    }
}
 
Example 9
Project: openjdk-jdk10   File: POAPolicyMediatorImpl_R_UDS.java   Source Code and License 5 votes vote down vote up
protected java.lang.Object internalGetServant( byte[] id,
    String operation ) throws ForwardRequest
{
    Servant servant = internalIdToServant( id ) ;
    if (servant == null)
        servant = defaultServant ;

    if (servant == null)
        throw poa.invocationWrapper().poaNoDefaultServant() ;

    return servant ;
}
 
Example 10
Project: openjdk-jdk10   File: POAPolicyMediatorBase.java   Source Code and License 5 votes vote down vote up
public final java.lang.Object getInvocationServant( byte[] id,
    String operation ) throws ForwardRequest
{
    java.lang.Object result = internalGetServant( id, operation ) ;

    return result ;
}
 
Example 11
Project: openjdk9   File: ServantManagerImpl.java   Source Code and License 5 votes vote down vote up
public Servant preinvoke(byte[] oid, POA adapter, String operation,
                         CookieHolder cookie) throws ForwardRequest
{

    String objKey = new String(oid);

    Servant servant = (Servant) contexts.get(objKey);

    if (servant == null)
    {
             servant =  readInContext(objKey);
    }

    return servant;
}
 
Example 12
Project: openjdk9   File: POAPolicyMediatorImpl_NR_UDS.java   Source Code and License 5 votes vote down vote up
protected java.lang.Object internalGetServant( byte[] id,
    String operation ) throws ForwardRequest
{
    if (defaultServant == null)
        throw poa.invocationWrapper().poaNoDefaultServant() ;

    return defaultServant;
}
 
Example 13
Project: openjdk9   File: POAImpl.java   Source Code and License 5 votes vote down vote up
public void getInvocationServant( OAInvocationInfo info )
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling getInvocationServant on poa " + this ) ;
        }

        java.lang.Object servant = null ;

        try {
            servant = mediator.getInvocationServant( info.id(),
                info.getOperation() );
        } catch (ForwardRequest freq) {
            throw new ForwardException( getORB(), freq.forward_reference ) ;
        }

        info.setServant( servant ) ;
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting getInvocationServant on poa " + this ) ;
        }

        unlock() ;
    }
}
 
Example 14
Project: openjdk9   File: POAPolicyMediatorImpl_R_UDS.java   Source Code and License 5 votes vote down vote up
protected java.lang.Object internalGetServant( byte[] id,
    String operation ) throws ForwardRequest
{
    Servant servant = internalIdToServant( id ) ;
    if (servant == null)
        servant = defaultServant ;

    if (servant == null)
        throw poa.invocationWrapper().poaNoDefaultServant() ;

    return servant ;
}
 
Example 15
Project: openjdk9   File: POAPolicyMediatorBase.java   Source Code and License 5 votes vote down vote up
public final java.lang.Object getInvocationServant( byte[] id,
    String operation ) throws ForwardRequest
{
    java.lang.Object result = internalGetServant( id, operation ) ;

    return result ;
}
 
Example 16
Project: lookaside_java-1.8.0-openjdk   File: ServantManagerImpl.java   Source Code and License 5 votes vote down vote up
public Servant preinvoke(byte[] oid, POA adapter, String operation,
                         CookieHolder cookie) throws ForwardRequest
{

    String objKey = new String(oid);

    Servant servant = (Servant) contexts.get(objKey);

    if (servant == null)
    {
             servant =  readInContext(objKey);
    }

    return servant;
}
 
Example 17
Project: lookaside_java-1.8.0-openjdk   File: POAPolicyMediatorImpl_NR_UDS.java   Source Code and License 5 votes vote down vote up
protected java.lang.Object internalGetServant( byte[] id,
    String operation ) throws ForwardRequest
{
    if (defaultServant == null)
        throw poa.invocationWrapper().poaNoDefaultServant() ;

    return defaultServant;
}
 
Example 18
Project: lookaside_java-1.8.0-openjdk   File: POAImpl.java   Source Code and License 5 votes vote down vote up
public void getInvocationServant( OAInvocationInfo info )
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling getInvocationServant on poa " + this ) ;
        }

        java.lang.Object servant = null ;

        try {
            servant = mediator.getInvocationServant( info.id(),
                info.getOperation() );
        } catch (ForwardRequest freq) {
            throw new ForwardException( getORB(), freq.forward_reference ) ;
        }

        info.setServant( servant ) ;
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting getInvocationServant on poa " + this ) ;
        }

        unlock() ;
    }
}
 
Example 19
Project: lookaside_java-1.8.0-openjdk   File: POAPolicyMediatorImpl_R_UDS.java   Source Code and License 5 votes vote down vote up
protected java.lang.Object internalGetServant( byte[] id,
    String operation ) throws ForwardRequest
{
    Servant servant = internalIdToServant( id ) ;
    if (servant == null)
        servant = defaultServant ;

    if (servant == null)
        throw poa.invocationWrapper().poaNoDefaultServant() ;

    return servant ;
}
 
Example 20
Project: lookaside_java-1.8.0-openjdk   File: POAPolicyMediatorBase.java   Source Code and License 5 votes vote down vote up
public final java.lang.Object getInvocationServant( byte[] id,
    String operation ) throws ForwardRequest
{
    java.lang.Object result = internalGetServant( id, operation ) ;

    return result ;
}
 
Example 21
Project: jdk8u_corba   File: ServantManagerImpl.java   Source Code and License 5 votes vote down vote up
public Servant preinvoke(byte[] oid, POA adapter, String operation,
                         CookieHolder cookie) throws ForwardRequest
{

    String objKey = new String(oid);

    Servant servant = (Servant) contexts.get(objKey);

    if (servant == null)
    {
             servant =  readInContext(objKey);
    }

    return servant;
}
 
Example 22
Project: jdk8u_corba   File: POAPolicyMediatorImpl_NR_UDS.java   Source Code and License 5 votes vote down vote up
protected java.lang.Object internalGetServant( byte[] id,
    String operation ) throws ForwardRequest
{
    if (defaultServant == null)
        throw poa.invocationWrapper().poaNoDefaultServant() ;

    return defaultServant;
}
 
Example 23
Project: jdk8u_corba   File: POAImpl.java   Source Code and License 5 votes vote down vote up
public void getInvocationServant( OAInvocationInfo info )
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling getInvocationServant on poa " + this ) ;
        }

        java.lang.Object servant = null ;

        try {
            servant = mediator.getInvocationServant( info.id(),
                info.getOperation() );
        } catch (ForwardRequest freq) {
            throw new ForwardException( getORB(), freq.forward_reference ) ;
        }

        info.setServant( servant ) ;
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting getInvocationServant on poa " + this ) ;
        }

        unlock() ;
    }
}
 
Example 24
Project: jdk8u_corba   File: POAPolicyMediatorImpl_R_UDS.java   Source Code and License 5 votes vote down vote up
protected java.lang.Object internalGetServant( byte[] id,
    String operation ) throws ForwardRequest
{
    Servant servant = internalIdToServant( id ) ;
    if (servant == null)
        servant = defaultServant ;

    if (servant == null)
        throw poa.invocationWrapper().poaNoDefaultServant() ;

    return servant ;
}
 
Example 25
Project: jdk8u_corba   File: POAPolicyMediatorBase.java   Source Code and License 5 votes vote down vote up
public final java.lang.Object getInvocationServant( byte[] id,
    String operation ) throws ForwardRequest
{
    java.lang.Object result = internalGetServant( id, operation ) ;

    return result ;
}
 
Example 26
Project: javify   File: ForwardRequestHelper.java   Source Code and License 5 votes vote down vote up
/**
 * Extract the ForwardRequest from given Any.
 * This method uses the ForwardRequestHolder.
 *
 * @throws BAD_OPERATION if the passed Any does not contain ForwardRequest.
 */
public static ForwardRequest extract(Any any)
{
  try
    {
      return ((ForwardRequestHolder) any.extract_Streamable()).value;
    }
  catch (ClassCastException cex)
    {
      BAD_OPERATION bad = new BAD_OPERATION("ForwardRequest expected");
      bad.minor = Minor.Any;
      bad.initCause(cex);
      throw bad;
    }
}
 
Example 27
Project: javify   File: ForwardRequestHelper.java   Source Code and License 5 votes vote down vote up
/**
 * Read the exception from the CDR intput stream.
 *
 * @param input a org.omg.CORBA.portable stream to read from.
 */
public static ForwardRequest read(InputStream input)
{
  // Read the exception repository id.
  String id = input.read_string();
  ForwardRequest value = new ForwardRequest();

  value.forward_reference = input.read_Object();
  return value;
}
 
Example 28
Project: javify   File: ForwardRequestHelper.java   Source Code and License 5 votes vote down vote up
/**
 * Write the exception to the CDR output stream.
 *
 * @param output a org.omg.CORBA.portable stream stream to write into.
 * @param value a value to write.
 */
public static void write(OutputStream output, ForwardRequest value)
{
  // Write the exception repository id.
  output.write_string(id());
  output.write_Object(value.forward_reference);
}
 
Example 29
Project: jvm-stm   File: ForwardRequestHelper.java   Source Code and License 5 votes vote down vote up
/**
 * Extract the ForwardRequest from given Any.
 * This method uses the ForwardRequestHolder.
 *
 * @throws BAD_OPERATION if the passed Any does not contain ForwardRequest.
 */
public static ForwardRequest extract(Any any)
{
  try
    {
      return ((ForwardRequestHolder) any.extract_Streamable()).value;
    }
  catch (ClassCastException cex)
    {
      BAD_OPERATION bad = new BAD_OPERATION("ForwardRequest expected");
      bad.minor = Minor.Any;
      bad.initCause(cex);
      throw bad;
    }
}
 
Example 30
Project: jvm-stm   File: ForwardRequestHelper.java   Source Code and License 5 votes vote down vote up
/**
 * Read the exception from the CDR intput stream.
 *
 * @param input a org.omg.CORBA.portable stream to read from.
 */
public static ForwardRequest read(InputStream input)
{
  // Read the exception repository id.
  String id = input.read_string();
  ForwardRequest value = new ForwardRequest();

  value.forward_reference = input.read_Object();
  return value;
}
 
Example 31
Project: jvm-stm   File: ForwardRequestHelper.java   Source Code and License 5 votes vote down vote up
/**
 * Write the exception to the CDR output stream.
 *
 * @param output a org.omg.CORBA.portable stream stream to write into.
 * @param value a value to write.
 */
public static void write(OutputStream output, ForwardRequest value)
{
  // Write the exception repository id.
  output.write_string(id());
  output.write_Object(value.forward_reference);
}
 
Example 32
Project: infobip-open-jdk-8   File: ServantManagerImpl.java   Source Code and License 5 votes vote down vote up
public Servant preinvoke(byte[] oid, POA adapter, String operation,
                         CookieHolder cookie) throws ForwardRequest
{

    String objKey = new String(oid);

    Servant servant = (Servant) contexts.get(objKey);

    if (servant == null)
    {
             servant =  readInContext(objKey);
    }

    return servant;
}
 
Example 33
Project: infobip-open-jdk-8   File: POAPolicyMediatorImpl_NR_UDS.java   Source Code and License 5 votes vote down vote up
protected java.lang.Object internalGetServant( byte[] id,
    String operation ) throws ForwardRequest
{
    if (defaultServant == null)
        throw poa.invocationWrapper().poaNoDefaultServant() ;

    return defaultServant;
}
 
Example 34
Project: infobip-open-jdk-8   File: POAImpl.java   Source Code and License 5 votes vote down vote up
public void getInvocationServant( OAInvocationInfo info )
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling getInvocationServant on poa " + this ) ;
        }

        java.lang.Object servant = null ;

        try {
            servant = mediator.getInvocationServant( info.id(),
                info.getOperation() );
        } catch (ForwardRequest freq) {
            throw new ForwardException( getORB(), freq.forward_reference ) ;
        }

        info.setServant( servant ) ;
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting getInvocationServant on poa " + this ) ;
        }

        unlock() ;
    }
}
 
Example 35
Project: infobip-open-jdk-8   File: POAPolicyMediatorImpl_R_UDS.java   Source Code and License 5 votes vote down vote up
protected java.lang.Object internalGetServant( byte[] id,
    String operation ) throws ForwardRequest
{
    Servant servant = internalIdToServant( id ) ;
    if (servant == null)
        servant = defaultServant ;

    if (servant == null)
        throw poa.invocationWrapper().poaNoDefaultServant() ;

    return servant ;
}
 
Example 36
Project: infobip-open-jdk-8   File: POAPolicyMediatorBase.java   Source Code and License 5 votes vote down vote up
public final java.lang.Object getInvocationServant( byte[] id,
    String operation ) throws ForwardRequest
{
    java.lang.Object result = internalGetServant( id, operation ) ;

    return result ;
}
 
Example 37
Project: openjdk-source-code-learn   File: ServantManagerImpl.java   Source Code and License 5 votes vote down vote up
public Servant preinvoke(byte[] oid, POA adapter, String operation,
                         CookieHolder cookie) throws ForwardRequest
{

    String objKey = new String(oid);

    Servant servant = (Servant) contexts.get(objKey);

    if (servant == null)
    {
             servant =  readInContext(objKey);
    }

    return servant;
}
 
Example 38
Project: openjdk-source-code-learn   File: POAPolicyMediatorImpl_NR_UDS.java   Source Code and License 5 votes vote down vote up
protected java.lang.Object internalGetServant( byte[] id,
    String operation ) throws ForwardRequest
{
    if (defaultServant == null)
        throw poa.invocationWrapper().poaNoDefaultServant() ;

    return defaultServant;
}
 
Example 39
Project: openjdk-source-code-learn   File: POAImpl.java   Source Code and License 5 votes vote down vote up
public void getInvocationServant( OAInvocationInfo info )
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling getInvocationServant on poa " + this ) ;
        }

        java.lang.Object servant = null ;

        try {
            servant = mediator.getInvocationServant( info.id(),
                info.getOperation() );
        } catch (ForwardRequest freq) {
            throw new ForwardException( getORB(), freq.forward_reference ) ;
        }

        info.setServant( servant ) ;
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting getInvocationServant on poa " + this ) ;
        }

        unlock() ;
    }
}
 
Example 40
Project: openjdk-source-code-learn   File: POAPolicyMediatorImpl_R_UDS.java   Source Code and License 5 votes vote down vote up
protected java.lang.Object internalGetServant( byte[] id,
    String operation ) throws ForwardRequest
{
    Servant servant = internalIdToServant( id ) ;
    if (servant == null)
        servant = defaultServant ;

    if (servant == null)
        throw poa.invocationWrapper().poaNoDefaultServant() ;

    return servant ;
}
 
Example 41
Project: openjdk-source-code-learn   File: POAPolicyMediatorBase.java   Source Code and License 5 votes vote down vote up
public final java.lang.Object getInvocationServant( byte[] id,
    String operation ) throws ForwardRequest
{
    java.lang.Object result = internalGetServant( id, operation ) ;

    return result ;
}
 
Example 42
Project: OLD-OpenJDK8   File: ServantManagerImpl.java   Source Code and License 5 votes vote down vote up
public Servant preinvoke(byte[] oid, POA adapter, String operation,
                         CookieHolder cookie) throws ForwardRequest
{

    String objKey = new String(oid);

    Servant servant = (Servant) contexts.get(objKey);

    if (servant == null)
    {
             servant =  readInContext(objKey);
    }

    return servant;
}
 
Example 43
Project: OLD-OpenJDK8   File: POAPolicyMediatorImpl_NR_UDS.java   Source Code and License 5 votes vote down vote up
protected java.lang.Object internalGetServant( byte[] id,
    String operation ) throws ForwardRequest
{
    if (defaultServant == null)
        throw poa.invocationWrapper().poaNoDefaultServant() ;

    return defaultServant;
}
 
Example 44
Project: OLD-OpenJDK8   File: POAImpl.java   Source Code and License 5 votes vote down vote up
public void getInvocationServant( OAInvocationInfo info )
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling getInvocationServant on poa " + this ) ;
        }

        java.lang.Object servant = null ;

        try {
            servant = mediator.getInvocationServant( info.id(),
                info.getOperation() );
        } catch (ForwardRequest freq) {
            throw new ForwardException( getORB(), freq.forward_reference ) ;
        }

        info.setServant( servant ) ;
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting getInvocationServant on poa " + this ) ;
        }

        unlock() ;
    }
}
 
Example 45
Project: OLD-OpenJDK8   File: POAPolicyMediatorImpl_R_UDS.java   Source Code and License 5 votes vote down vote up
protected java.lang.Object internalGetServant( byte[] id,
    String operation ) throws ForwardRequest
{
    Servant servant = internalIdToServant( id ) ;
    if (servant == null)
        servant = defaultServant ;

    if (servant == null)
        throw poa.invocationWrapper().poaNoDefaultServant() ;

    return servant ;
}
 
Example 46
Project: OLD-OpenJDK8   File: POAPolicyMediatorBase.java   Source Code and License 5 votes vote down vote up
public final java.lang.Object getInvocationServant( byte[] id,
    String operation ) throws ForwardRequest
{
    java.lang.Object result = internalGetServant( id, operation ) ;

    return result ;
}
 
Example 47
Project: JamVM-PH   File: ForwardRequestHelper.java   Source Code and License 5 votes vote down vote up
/**
 * Extract the ForwardRequest from given Any.
 * This method uses the ForwardRequestHolder.
 *
 * @throws BAD_OPERATION if the passed Any does not contain ForwardRequest.
 */
public static ForwardRequest extract(Any any)
{
  try
    {
      return ((ForwardRequestHolder) any.extract_Streamable()).value;
    }
  catch (ClassCastException cex)
    {
      BAD_OPERATION bad = new BAD_OPERATION("ForwardRequest expected");
      bad.minor = Minor.Any;
      bad.initCause(cex);
      throw bad;
    }
}
 
Example 48
Project: JamVM-PH   File: ForwardRequestHelper.java   Source Code and License 5 votes vote down vote up
/**
 * Read the exception from the CDR intput stream.
 *
 * @param input a org.omg.CORBA.portable stream to read from.
 */
public static ForwardRequest read(InputStream input)
{
  // Read the exception repository id.
  String id = input.read_string();
  ForwardRequest value = new ForwardRequest();

  value.forward_reference = input.read_Object();
  return value;
}
 
Example 49
Project: JamVM-PH   File: ForwardRequestHelper.java   Source Code and License 5 votes vote down vote up
/**
 * Write the exception to the CDR output stream.
 *
 * @param output a org.omg.CORBA.portable stream stream to write into.
 * @param value a value to write.
 */
public static void write(OutputStream output, ForwardRequest value)
{
  // Write the exception repository id.
  output.write_string(id());
  output.write_Object(value.forward_reference);
}
 
Example 50
Project: openjdk-orb   File: ServantManagerImpl.java   Source Code and License 5 votes vote down vote up
public Servant preinvoke(byte[] oid, POA adapter, String operation,
                         CookieHolder cookie) throws ForwardRequest
{

    String objKey = new String(oid);

    Servant servant = (Servant) contexts.get(objKey);

    if (servant == null)
    {
             servant =  readInContext(objKey);
    }

    return servant;
}
 
Example 51
Project: openjdk-orb   File: POAPolicyMediatorImpl_NR_UDS.java   Source Code and License 5 votes vote down vote up
protected java.lang.Object internalGetServant( byte[] id,
    String operation ) throws ForwardRequest
{
    if (defaultServant == null)
        throw poa.invocationWrapper().poaNoDefaultServant() ;

    return defaultServant;
}
 
Example 52
Project: openjdk-orb   File: POAImpl.java   Source Code and License 5 votes vote down vote up
public void getInvocationServant( OAInvocationInfo info )
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling getInvocationServant on poa " + this ) ;
        }

        java.lang.Object servant = null ;

        try {
            servant = mediator.getInvocationServant( info.id(),
                info.getOperation() );
        } catch (ForwardRequest freq) {
            throw new ForwardException( getORB(), freq.forward_reference ) ;
        }

        info.setServant( servant ) ;
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting getInvocationServant on poa " + this ) ;
        }

        unlock() ;
    }
}
 
Example 53
Project: openjdk-orb   File: POAPolicyMediatorImpl_R_UDS.java   Source Code and License 5 votes vote down vote up
protected java.lang.Object internalGetServant( byte[] id,
    String operation ) throws ForwardRequest
{
    Servant servant = internalIdToServant( id ) ;
    if (servant == null)
        servant = defaultServant ;

    if (servant == null)
        throw poa.invocationWrapper().poaNoDefaultServant() ;

    return servant ;
}
 
Example 54
Project: openjdk-orb   File: POAPolicyMediatorBase.java   Source Code and License 5 votes vote down vote up
public final java.lang.Object getInvocationServant( byte[] id,
    String operation ) throws ForwardRequest
{
    java.lang.Object result = internalGetServant( id, operation ) ;

    return result ;
}
 
Example 55
Project: classpath   File: ForwardRequestHelper.java   Source Code and License 5 votes vote down vote up
/**
 * Extract the ForwardRequest from given Any.
 * This method uses the ForwardRequestHolder.
 *
 * @throws BAD_OPERATION if the passed Any does not contain ForwardRequest.
 */
public static ForwardRequest extract(Any any)
{
  try
    {
      return ((ForwardRequestHolder) any.extract_Streamable()).value;
    }
  catch (ClassCastException cex)
    {
      BAD_OPERATION bad = new BAD_OPERATION("ForwardRequest expected");
      bad.minor = Minor.Any;
      bad.initCause(cex);
      throw bad;
    }
}
 
Example 56
Project: classpath   File: ForwardRequestHelper.java   Source Code and License 5 votes vote down vote up
/**
 * Read the exception from the CDR intput stream.
 *
 * @param input a org.omg.CORBA.portable stream to read from.
 */
public static ForwardRequest read(InputStream input)
{
  // Read the exception repository id.
  String id = input.read_string();
  ForwardRequest value = new ForwardRequest();

  value.forward_reference = input.read_Object();
  return value;
}
 
Example 57
Project: classpath   File: ForwardRequestHelper.java   Source Code and License 5 votes vote down vote up
/**
 * Write the exception to the CDR output stream.
 *
 * @param output a org.omg.CORBA.portable stream stream to write into.
 * @param value a value to write.
 */
public static void write(OutputStream output, ForwardRequest value)
{
  // Write the exception repository id.
  output.write_string(id());
  output.write_Object(value.forward_reference);
}
 
Example 58
Project: openjdk-icedtea7   File: ServantManagerImpl.java   Source Code and License 5 votes vote down vote up
public Servant preinvoke(byte[] oid, POA adapter, String operation,
                         CookieHolder cookie) throws ForwardRequest
{

    String objKey = new String(oid);

    Servant servant = (Servant) contexts.get(objKey);

    if (servant == null)
    {
             servant =  readInContext(objKey);
    }

    return servant;
}
 
Example 59
Project: openjdk-icedtea7   File: POAPolicyMediatorImpl_NR_UDS.java   Source Code and License 5 votes vote down vote up
protected java.lang.Object internalGetServant( byte[] id,
    String operation ) throws ForwardRequest
{
    if (defaultServant == null)
        throw poa.invocationWrapper().poaNoDefaultServant() ;

    return defaultServant;
}
 
Example 60
Project: openjdk-icedtea7   File: POAImpl.java   Source Code and License 5 votes vote down vote up
public void getInvocationServant( OAInvocationInfo info )
{
    try {
        lock() ;

        if (debug) {
            ORBUtility.dprint( this,
                "Calling getInvocationServant on poa " + this ) ;
        }

        java.lang.Object servant = null ;

        try {
            servant = mediator.getInvocationServant( info.id(),
                info.getOperation() );
        } catch (ForwardRequest freq) {
            throw new ForwardException( getORB(), freq.forward_reference ) ;
        }

        info.setServant( servant ) ;
    } finally {
        if (debug) {
            ORBUtility.dprint( this,
                "Exiting getInvocationServant on poa " + this ) ;
        }

        unlock() ;
    }
}