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;
}
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);
}
});
}
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);
}
Aggregations