org.omg.CORBA.INTERNAL Java Examples

The following examples show how to use org.omg.CORBA.INTERNAL. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: BufferManagerFactory.java    License: Apache License 2.0 6 votes vote down vote up
public static BufferManagerWrite newBufferManagerWrite(
        int strategy, byte encodingVersion, ORB orb) {
    if (encodingVersion != Message.CDR_ENC_VERSION) {
        if (strategy != BufferManagerFactory.GROW) {
            ORBUtilSystemException wrapper =
                ORBUtilSystemException.get((ORB)orb,
                                           CORBALogDomains.RPC_ENCODING);
            throw wrapper.invalidBuffMgrStrategy("newBufferManagerWrite");
        }
        return new BufferManagerWriteGrow(orb);
    }
    switch (strategy) {
        case BufferManagerFactory.GROW:
            return new BufferManagerWriteGrow(orb);
        case BufferManagerFactory.COLLECT:
            return new BufferManagerWriteCollect(orb);
        case BufferManagerFactory.STREAM:
            return new BufferManagerWriteStream(orb);
        default:
            throw new INTERNAL("Unknown buffer manager write strategy: "
                               + strategy);
    }
}
 
Example #2
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: UtilSystemException.java    License: Apache License 2.0 6 votes vote down vote up
public INTERNAL errorSetLongField( CompletionStatus cs, Throwable t, Object arg0, Object arg1, Object arg2) {
    INTERNAL exc = new INTERNAL( ERROR_SET_LONG_FIELD, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = new Object[3] ;
        parameters[0] = arg0 ;
        parameters[1] = arg1 ;
        parameters[2] = arg2 ;
        doLog( Level.WARNING, "UTIL.errorSetLongField",
            parameters, UtilSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #3
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: UtilSystemException.java    License: Apache License 2.0 6 votes vote down vote up
public INTERNAL errorSetCharField( CompletionStatus cs, Throwable t, Object arg0, Object arg1, Object arg2) {
    INTERNAL exc = new INTERNAL( ERROR_SET_CHAR_FIELD, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = new Object[3] ;
        parameters[0] = arg0 ;
        parameters[1] = arg1 ;
        parameters[2] = arg2 ;
        doLog( Level.WARNING, "UTIL.errorSetCharField",
            parameters, UtilSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #4
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: UtilSystemException.java    License: Apache License 2.0 6 votes vote down vote up
public INTERNAL errorSetByteField( CompletionStatus cs, Throwable t, Object arg0, Object arg1, Object arg2) {
    INTERNAL exc = new INTERNAL( ERROR_SET_BYTE_FIELD, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = new Object[3] ;
        parameters[0] = arg0 ;
        parameters[1] = arg1 ;
        parameters[2] = arg2 ;
        doLog( Level.WARNING, "UTIL.errorSetByteField",
            parameters, UtilSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #5
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: BufferManagerFactory.java    License: Apache License 2.0 6 votes vote down vote up
public static BufferManagerRead newBufferManagerRead(
        GIOPVersion version, byte encodingVersion, ORB orb) {

    // REVISIT - On the reading side, shouldn't we monitor the incoming
    // fragments on a given connection to determine what fragment size
    // they're using, then use that ourselves?

    if (encodingVersion != Message.CDR_ENC_VERSION) {
        return new BufferManagerReadGrow(orb);
    }

    switch (version.intValue())
    {
        case GIOPVersion.VERSION_1_0:
            return new BufferManagerReadGrow(orb);
        case GIOPVersion.VERSION_1_1:
        case GIOPVersion.VERSION_1_2:
            // The stream reader can handle fragmented and
            // non fragmented messages
            return new BufferManagerReadStream(orb);
        default:
            // REVISIT - what is appropriate?
            throw new INTERNAL("Unknown GIOP version: "
                               + version);
    }
}
 
Example #6
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: LegacyServerSocketManagerImpl.java    License: Apache License 2.0 5 votes vote down vote up
public synchronized LegacyServerSocketEndPointInfo legacyGetEndpoint(
    String name)
{
    Iterator iterator = getAcceptorIterator();
    while (iterator.hasNext()) {
        LegacyServerSocketEndPointInfo endPoint = cast(iterator.next());
        if (endPoint != null && name.equals(endPoint.getName())) {
            return endPoint;
        }
    }
    throw new INTERNAL("No acceptor for: " + name);
}
 
Example #7
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: InterceptorsSystemException.java    License: Apache License 2.0 5 votes vote down vote up
public INTERNAL exceptionUnavailable( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( EXCEPTION_UNAVAILABLE, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "INTERCEPTORS.exceptionUnavailable",
            parameters, InterceptorsSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #8
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: IORSystemException.java    License: Apache License 2.0 5 votes vote down vote up
public INTERNAL nullPoa( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( NULL_POA, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "IOR.nullPoa",
            parameters, IORSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #9
Source Project: TencentKona-8   Author: Tencent   File: LegacyServerSocketManagerImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
public synchronized LegacyServerSocketEndPointInfo legacyGetEndpoint(
    String name)
{
    Iterator iterator = getAcceptorIterator();
    while (iterator.hasNext()) {
        LegacyServerSocketEndPointInfo endPoint = cast(iterator.next());
        if (endPoint != null && name.equals(endPoint.getName())) {
            return endPoint;
        }
    }
    throw new INTERNAL("No acceptor for: " + name);
}
 
Example #10
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: InterceptorsSystemException.java    License: Apache License 2.0 5 votes vote down vote up
public INTERNAL cantPopOnlyPicurrent( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( CANT_POP_ONLY_PICURRENT, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "INTERCEPTORS.cantPopOnlyPicurrent",
            parameters, InterceptorsSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #11
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: PersistentBindingIterator.java    License: Apache License 2.0 5 votes vote down vote up
/**
* Destroys this BindingIterator by disconnecting from the ORB
* @exception org.omg.CORBA.SystemException One of a fixed set of CORBA system exceptions.
*/
 final public void Destroy()
 {
     // Remove the object from the Active Object Map.
     try {
         byte[] objectId = biPOA.servant_to_id( this );
         if( objectId != null ) {
             biPOA.deactivate_object( objectId );
         }
     }
     catch( Exception e ) {
         throw new INTERNAL( "Exception in BindingIterator.Destroy " + e );
     }
 }
 
Example #12
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: NamingSystemException.java    License: Apache License 2.0 5 votes vote down vote up
public INTERNAL namingCtxRebindAlreadyBound( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( NAMING_CTX_REBIND_ALREADY_BOUND, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "NAMING.namingCtxRebindAlreadyBound",
            parameters, NamingSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #13
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: ActivationSystemException.java    License: Apache License 2.0 5 votes vote down vote up
public INTERNAL serverNotRunning( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( SERVER_NOT_RUNNING, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "ACTIVATION.serverNotRunning",
            parameters, ActivationSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #14
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: NamingSystemException.java    License: Apache License 2.0 5 votes vote down vote up
public INTERNAL namingCtxBadBindingtype( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( NAMING_CTX_BAD_BINDINGTYPE, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "NAMING.namingCtxBadBindingtype",
            parameters, NamingSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #15
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: NamingSystemException.java    License: Apache License 2.0 5 votes vote down vote up
public INTERNAL namingCtxResolveCannotNarrowToCtx( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( NAMING_CTX_RESOLVE_CANNOT_NARROW_TO_CTX, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "NAMING.namingCtxResolveCannotNarrowToCtx",
            parameters, NamingSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #16
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: POASystemException.java    License: Apache License 2.0 5 votes vote down vote up
public INTERNAL policyMediatorBadPolicyInFactory( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( POLICY_MEDIATOR_BAD_POLICY_IN_FACTORY, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "POA.policyMediatorBadPolicyInFactory",
            parameters, POASystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #17
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: POASystemException.java    License: Apache License 2.0 5 votes vote down vote up
public INTERNAL preinvokePoaDestroyed( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( PREINVOKE_POA_DESTROYED, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "POA.preinvokePoaDestroyed",
            parameters, POASystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #18
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: POASystemException.java    License: Apache License 2.0 5 votes vote down vote up
public INTERNAL pmfCreateRetain( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( PMF_CREATE_RETAIN, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "POA.pmfCreateRetain",
            parameters, POASystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #19
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: NamingSystemException.java    License: Apache License 2.0 5 votes vote down vote up
public INTERNAL transNcNewctxGotExc( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( TRANS_NC_NEWCTX_GOT_EXC, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "NAMING.transNcNewctxGotExc",
            parameters, NamingSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #20
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: OMGSystemException.java    License: Apache License 2.0 5 votes vote down vote up
public INTERNAL xaRmfail( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( XA_RMFAIL, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "OMG.xaRmfail",
            parameters, OMGSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #21
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: POASystemException.java    License: Apache License 2.0 5 votes vote down vote up
public INTERNAL servantDispatch( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( SERVANT_DISPATCH, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "POA.servantDispatch",
            parameters, POASystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #22
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: NamingSystemException.java    License: Apache License 2.0 5 votes vote down vote up
public INTERNAL insBadSchemeSpecificPart( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( INS_BAD_SCHEME_SPECIFIC_PART, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "NAMING.insBadSchemeSpecificPart",
            parameters, NamingSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #23
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: POASystemException.java    License: Apache License 2.0 5 votes vote down vote up
public INTERNAL poaInternalGetServantError( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( POA_INTERNAL_GET_SERVANT_ERROR, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "POA.poaInternalGetServantError",
            parameters, POASystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #24
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: NamingSystemException.java    License: Apache License 2.0 5 votes vote down vote up
public INTERNAL insOther( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( INS_OTHER, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "NAMING.insOther",
            parameters, NamingSystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #25
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: POASystemException.java    License: Apache License 2.0 5 votes vote down vote up
public INTERNAL makeFactoryNotPoa( CompletionStatus cs, Throwable t, Object arg0) {
    INTERNAL exc = new INTERNAL( MAKE_FACTORY_NOT_POA, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = new Object[1] ;
        parameters[0] = arg0 ;
        doLog( Level.WARNING, "POA.makeFactoryNotPoa",
            parameters, POASystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #26
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: POASystemException.java    License: Apache License 2.0 5 votes vote down vote up
public INTERNAL invokesetup( CompletionStatus cs, Throwable t ) {
    INTERNAL exc = new INTERNAL( INVOKESETUP, cs ) ;
    if (t != null)
        exc.initCause( t ) ;
    
    if (logger.isLoggable( Level.WARNING )) {
        Object[] parameters = null ;
        doLog( Level.WARNING, "POA.invokesetup",
            parameters, POASystemException.class, exc ) ;
    }
    
    return exc ;
}
 
Example #27
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: ORBD.java    License: Apache License 2.0 4 votes vote down vote up
private void run(String[] args)
{
    try {
        // parse the args and try setting the values for these
        // properties
        processArgs(args);

        ORB orb = createORB(args);

        if (orb.orbdDebugFlag)
            System.out.println( "ORBD begins initialization." ) ;

        boolean firstRun = createSystemDirs( ORBConstants.DEFAULT_DB_DIR );

        startActivationObjects(orb);

        if (firstRun) // orbd is being run the first time
            installOrbServers(getRepository(), getActivator());

        if (orb.orbdDebugFlag) {
            System.out.println( "ORBD is ready." ) ;
            System.out.println("ORBD serverid: " +
                    System.getProperty(ORBConstants.SERVER_ID_PROPERTY));
            System.out.println("activation dbdir: " +
                    System.getProperty(ORBConstants.DB_DIR_PROPERTY));
            System.out.println("activation port: " +
                    System.getProperty(ORBConstants.ORBD_PORT_PROPERTY));

            String pollingTime = System.getProperty(
                ORBConstants.SERVER_POLLING_TIME);
            if( pollingTime == null ) {
                pollingTime = Integer.toString(
                    ORBConstants.DEFAULT_SERVER_POLLING_TIME );
            }
            System.out.println("activation Server Polling Time: " +
                    pollingTime + " milli-seconds ");

            String startupDelay = System.getProperty(
                ORBConstants.SERVER_STARTUP_DELAY);
            if( startupDelay == null ) {
                startupDelay = Integer.toString(
                    ORBConstants.DEFAULT_SERVER_STARTUP_DELAY );
            }
            System.out.println("activation Server Startup Delay: " +
                    startupDelay + " milli-seconds " );
        }

        // The following two lines start the Persistent NameService
        NameServiceStartThread theThread =
            new NameServiceStartThread( orb, dbDir );
        theThread.start( );

        orb.run();
    } catch( org.omg.CORBA.COMM_FAILURE cex ) {
        System.out.println( CorbaResourceUtil.getText("orbd.commfailure"));
        System.out.println( cex );
        cex.printStackTrace();
    } catch( org.omg.CORBA.INTERNAL iex ) {
        System.out.println( CorbaResourceUtil.getText(
            "orbd.internalexception"));
        System.out.println( iex );
        iex.printStackTrace();
    } catch (Exception ex) {
        System.out.println(CorbaResourceUtil.getText(
            "orbd.usage", "orbd"));
        System.out.println( ex );
        ex.printStackTrace();
    }
}
 
Example #28
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: InterceptorsSystemException.java    License: Apache License 2.0 4 votes vote down vote up
public INTERNAL exceptionWasNull2(  ) {
    return exceptionWasNull2( CompletionStatus.COMPLETED_NO, null  ) ;
}
 
Example #29
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: OMGSystemException.java    License: Apache License 2.0 4 votes vote down vote up
public INTERNAL xaRmerr(  ) {
    return xaRmerr( CompletionStatus.COMPLETED_NO, null  ) ;
}
 
Example #30
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: IORSystemException.java    License: Apache License 2.0 4 votes vote down vote up
public INTERNAL nullPoa( CompletionStatus cs ) {
    return nullPoa( cs, null  ) ;
}