Search in sources :

Example 6 with AcsCorba

use of alma.acs.container.corba.AcsCorba in project ACS by ACS-Community.

the class Firestarter method giveAcsCorba.

public AcsCorba giveAcsCorba() throws OrbInitException {
    if (acsCorba == null) {
        acsCorba = new AcsCorba(logger);
        acsCorba.setPortOptions(orbPort, orbPortSearchRetry);
    }
    if (!acsCorba.isInitialized()) {
        try {
            boolean isAdmin = true;
            acsCorba.initCorbaForClient(isAdmin);
        } catch (Exception exc) {
            throw new OrbInitException("acsCorba.initCorbaForClient(true) failed", exc);
        }
    }
    return acsCorba;
}
Also used : AcsCorba(alma.acs.container.corba.AcsCorba)

Example 7 with AcsCorba

use of alma.acs.container.corba.AcsCorba in project ACS by ACS-Community.

the class ExecuteContainer method startLocalJava.

public void startLocalJava(RunModel runModel, NativeCommand.Listener listener) {
    // note: this variant doesn't care for the containerType, it's always java
    final String contName = runModel.getContainerName();
    final String managerHost = runModel.getContainerAgainstManagerHost();
    final String managerPort = runModel.getContainerAgainstManagerPort();
    final Integer orbport = Integer.valueOf(runModel.getContainerLocalJavaPort());
    final String mgrLoc = AcsLocations.convertToManagerLocation(managerHost, managerPort);
    // set system properties
    Properties props = new DefaultProperties();
    props.setProperty("ACS.manager", mgrLoc);
    // run in same vm
    Executor.localInProc(props, startLocalJavaPexpect, listener, new Executor.RunMain() {

        public void runMain() throws Throwable {
            if (acsCorba == null) {
                // determine acscorba logger
                if (acsCorbaLogger == null) {
                    acsCorbaLogger = log;
                }
                // create acscorba
                acsCorba = new AcsCorba(acsCorbaLogger);
                acsCorba.initCorba(new String[] {}, orbport.intValue());
                acsCorba.runCorba();
            }
            // run container
            customAcsEmbeddedContainerRunner = new CustomAcsEmbeddedContainerRunner();
            customAcsEmbeddedContainerRunner.run(acsCorba, contName, mgrLoc);
        }
    });
}
Also used : AcsCorba(alma.acs.container.corba.AcsCorba) Properties(java.util.Properties)

Example 8 with AcsCorba

use of alma.acs.container.corba.AcsCorba in project ACS by ACS-Community.

the class ContainerHandleTest method setUp.

@Override
protected void setUp() throws Exception {
    m_logger = ClientLogManager.getAcsLogManager().getLoggerForApplication(APP_NAME, false);
    acsCorba = new AcsCorba(m_logger);
    acsCorba.initCorbaForClient(false);
}
Also used : AcsCorba(alma.acs.container.corba.AcsCorba)

Aggregations

AcsCorba (alma.acs.container.corba.AcsCorba)8 Completion (alma.ACSErr.Completion)1 OrbInitException (alma.acs.commandcenter.meta.Firestarter.OrbInitException)1 PreparedString (alma.acs.commandcenter.util.PreparedString)1 CleaningDaemonThreadFactory (alma.acs.container.CleaningDaemonThreadFactory)1 ContainerServicesImpl (alma.acs.container.ContainerServicesImpl)1 AcsJCompletion (alma.acs.exceptions.AcsJCompletion)1 AcsJException (alma.acs.exceptions.AcsJException)1 AcsLogger (alma.acs.logging.AcsLogger)1 Clobber (alma.acs.monitoring.DAO.Clobber)1 TestMonitorPointExpert (alma.acs.monitoring.blobber.TestBlobber.TestMonitorPointExpert)1 StopWatch (alma.acs.util.StopWatch)1 DaemonSequenceCallback (alma.acsdaemon.DaemonSequenceCallback)1 DaemonSequenceCallbackPOA (alma.acsdaemon.DaemonSequenceCallbackPOA)1 ServicesDaemon (alma.acsdaemon.ServicesDaemon)1 DAL (com.cosylab.CDB.DAL)1 IOException (java.io.IOException)1 Properties (java.util.Properties)1 ArrayBlockingQueue (java.util.concurrent.ArrayBlockingQueue)1 ExecutionException (java.util.concurrent.ExecutionException)1