Package org.jacorb.poa.util

Examples of org.jacorb.poa.util.ByteArrayKey


                           ServantActivator servantActivator,
                           POA poa,
                           boolean cleanupInProgress)
        throws ObjectNotActive
    {
        ByteArrayKey oidbak = new ByteArrayKey( oid );

        // check that the same oid is not already being deactivated
        // (this must be synchronized to avoid having two independent
        // threads register the same oid)
        synchronized( deactivationListLock )
View Full Code Here


                              boolean cleanup_in_progress )
    {
        final Iterator i = new HashSet(objectMap.keySet()).iterator();
        while (i.hasNext())
        {
            final ByteArrayKey oid = (ByteArrayKey) i.next();
            _remove(oid, null, servant_activator, poa, cleanup_in_progress);
        }
    }
View Full Code Here

            useServantManager() ? (ServantActivator)servantManager : null,
            this,
            false
                  );

        createdReferences.remove( new ByteArrayKey(oid));
    }
View Full Code Here

        offset += pid_length;
        object_key[offset] = POAConstants.OBJECT_KEY_SEP_BYTE;
        offset++;
        System.arraycopy (object_id, 0, object_key, offset, oid_length);

        ByteArrayKey key = new ByteArrayKey (oid);

        org.omg.CORBA.Object result =
            (org.omg.CORBA.Object) createdReferences.get (key);

        if (result == null)
View Full Code Here

                            "reference_to_servant: oid not previously generated!");
            }
            throw new WrongAdapter();
        }

        ByteArrayKey oid = new ByteArrayKey (objectId);

        if ( ( aom != null && aom.isDeactivating (oid) )
             || requestController.isDeactivating (oid))
        {
            if (logger.isWarnEnabled())
View Full Code Here

    /**
     * <code>testKey1</code> tests that JacORB can handle a null key.
     */
    public void testKey1 ()
    {
        ByteArrayKey bk = new ByteArrayKey( (byte[])null );

        try
        {
            bk.toString();
            bk.getBytes();
            bk.hashCode();

            if( System.identityHashCode( bk.toString() ) !=
                System.identityHashCode( bk.toString() )  )
            {
                fail( "Different Strings returned on toString" );
            }
        }
        catch( Exception e )
View Full Code Here

    /**
     * <code>testKey2</code> does some basic tests.
     */
    public void testKey2 ()
    {
        ByteArrayKey bk = new ByteArrayKey( ( "bytearraykeytest" ).getBytes() );

        try
        {
            bk.toString();
            bk.getBytes();
            bk.hashCode();

            if( System.identityHashCode( bk.toString() ) !=
                System.identityHashCode( bk.toString() )  )
            {
                fail( "Different Strings returned on toString" );
            }
        }
        catch( Exception e )
View Full Code Here

     * <code>testKey1</code> tests that JacORB can handle a null key.
     */
    @Test
    public void testKey1 ()
    {
        ByteArrayKey bk = new ByteArrayKey( (byte[])null );

        try
        {
            bk.toString();
            bk.getBytes();
            bk.hashCode();

            if( System.identityHashCode( bk.toString() ) !=
                System.identityHashCode( bk.toString() )  )
            {
                fail( "Different Strings returned on toString" );
            }
        }
        catch( Exception e )
View Full Code Here

     * <code>testKey2</code> does some basic tests.
     */
    @Test
    public void testKey2 ()
    {
        ByteArrayKey bk = new ByteArrayKey( ( "bytearraykeytest" ).getBytes() );

        try
        {
            bk.toString();
            bk.getBytes();
            bk.hashCode();

            if( System.identityHashCode( bk.toString() ) !=
                System.identityHashCode( bk.toString() )  )
            {
                fail( "Different Strings returned on toString" );
            }
        }
        catch( Exception e )
View Full Code Here

    public synchronized ByteArrayKey objectIdAsByteArrayKey()
    {
        if (byteArrayKey == null)
        {
            byteArrayKey = new ByteArrayKey(oid);
        }

        return byteArrayKey;
    }
View Full Code Here

TOP

Related Classes of org.jacorb.poa.util.ByteArrayKey

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.