Package org.jacorb.poa.except

Examples of org.jacorb.poa.except.POAInternalError


            {
                objectId = orb.getPOACurrent().get_object_id();
            }
            catch (org.omg.PortableServer.CurrentPackage.NoContext e)
            {
                throw new POAInternalError("error: not in invocation context (servant_to_reference)");
            }
            return getReference(objectId,
                                servant._all_interfaces(this, objectId)[0],
                                true);
        }

        if (isRetain())
        {
            if (isUniqueId())
            {
                /* the object reference encapsulating the information
                   used to activate the servant is returned */

                objectId = aom.getObjectId(servant);
                if (objectId != null)
                {
                    return getReference(objectId, servant._all_interfaces(this, objectId)[0], true);
                }
            }

            if (isImplicitActivation() && (isMultipleId() || !aom.contains(servant)) )
            {
                objectId = generateObjectId();

                /* activate the servant using a generated objectId and
                   the intfRepId associated with the servant
                   and a corresponding object reference is returned */

                try
                {
                    aom.add(objectId, servant);
                }
                catch (ObjectAlreadyActive e)
                {
                    throw new POAInternalError("error: object already active (servant_to_reference)");
                }
                catch (ServantAlreadyActive e)
                {
                    /* it's ok, another one was faster with activation
                       (only occurs if unique_id is set) */
 
View Full Code Here


        }

        public void receive_request( org.omg.PortableInterceptor.ServerRequestInfo ri )
            throws org.omg.PortableInterceptor.ForwardRequest
        {
            throw new POAInternalError("Error");
        }
View Full Code Here

            if (successful)
            {
                child = childs.get(poa_name);
                if (child == null)
                {
                    throw new POAInternalError("error: unknown_adapter returns true, but the child poa does'n extist");
                }

            }
            else
            {
View Full Code Here

                {
                    aom.add(objectId, servant);
                }
                catch (ObjectAlreadyActive e)
                {
                    throw new POAInternalError("error: object already active (servant_to_id)");
                }
                catch (ServantAlreadyActive e)
                {
                    /*  it's   ok,  a  nother  one   was  faster  with
                        activation (only occurs if unique_id is set) */
                    objectId = aom.getObjectId(servant);
                }

                orb.set_delegate(servant);

                return objectId;
            }
        }
        if (isUseDefaultServant() && servant == defaultServant &&
            isInInvocationContext(servant))
        {
            /* objectId associated with the current invocation */
            try
            {
                objectId = orb.getPOACurrent().get_object_id();
            }
            catch (org.omg.PortableServer.CurrentPackage.NoContext e)
            {
                throw new POAInternalError("error: not in invocation context (servant_to_id)");
            }
            return objectId;
        }

        throw new ServantNotActive();
View Full Code Here

            {
                objectId = orb.getPOACurrent().get_object_id();
            }
            catch (org.omg.PortableServer.CurrentPackage.NoContext e)
            {
                throw new POAInternalError("error: not in invocation context (servant_to_reference)");
            }
            return getReference(objectId,
                                servant._all_interfaces(this, objectId)[0],
                                true);
        }

        if (isRetain())
        {
            if (isUniqueId())
            {
                /* the object reference encapsulating the information
                   used to activate the servant is returned */

                objectId = aom.getObjectId(servant);
                if (objectId != null)
                {
                    return getReference(objectId, servant._all_interfaces(this, objectId)[0], true);
                }
            }

            if (isImplicitActivation() && (isMultipleId() || !aom.contains(servant)) )
            {
                objectId = generateObjectId();

                /* activate the servant using a generated objectId and
                   the intfRepId associated with the servant
                   and a corresponding object reference is returned */

                try
                {
                    aom.add(objectId, servant);
                }
                catch (ObjectAlreadyActive e)
                {
                    throw new POAInternalError("error: object already active (servant_to_reference)");
                }
                catch (ServantAlreadyActive e)
                {
                    /* it's ok, another one was faster with activation
                       (only occurs if unique_id is set) */
 
View Full Code Here

            if (successful)
            {
                child = childs.get(adapter_name);
                if (child == null)
                {
                    throw new POAInternalError("error: unknown_adapter returns true, but the child poa doesn't extist");
                }
            }
            else
            {
                throw new org.omg.CORBA.OBJECT_NOT_EXIST("poa activation is failed");
View Full Code Here

            orb.set_delegate( servant );
        }
        catch (ObjectAlreadyActive e)
        {
            throw new POAInternalError("error: object already active (activate_object)");
        }

        return objectId;
    }
View Full Code Here

    protected synchronized byte[] getObjectId(Servant servant)
    {
        if (!unique)
        {
            throw new POAInternalError("error: not UNIQUE_ID policy (getObjectId)");
        }

        ByteArrayKey oidbak = (ByteArrayKey)servantMap.get(servant);

        if (oidbak != null)
View Full Code Here

                {
                    add(oidbak, servant);
                }
                catch (ObjectAlreadyActive e)
                {
                    throw new POAInternalError("error: object already active (AOM.incarnate)");
                }
                catch (ServantAlreadyActive e)
                {
                    throw new POAInternalError("error: servant already active (AOM.incarnate)");
                }
            }
        }

        ((org.jacorb.poa.POA)poa).getORB().set_delegate(servant);
View Full Code Here

                && (i==0 || object_key[i-1] != POAConstants.MASK_BYTE))
            {
                return unmaskStr( object_key, 0, i );
            }
        }
        throw new POAInternalError("error extracting impl name from object_key: "+
                                   convert(object_key));
    }
View Full Code Here

TOP

Related Classes of org.jacorb.poa.except.POAInternalError

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.