Search in sources :

Example 6 with CleaningDaemonThreadFactory

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

the class ComponentClient method initAcs.

private void initAcs(String managerLoc, POA rootPOA) throws Exception {
    try {
        ManagerClient clImpl = new ManagerClient(m_clientName, m_logger) {

            public void disconnect() {
                m_logger.info("disconnected from manager");
                m_acsManagerProxy.logoutFromManager();
                m_acsManagerProxy = null;
                throw new RuntimeException("disconnected from the manager");
            }
        };
        m_managerClient = clImpl._this(acsCorba.getORB());
        m_acsManagerProxy = new AcsManagerProxy(managerLoc, acsCorba.getORB(), m_logger);
        m_acsManagerProxy.loginToManager(m_managerClient, 1);
        DAL cdb = DALHelper.narrow(m_acsManagerProxy.get_service("CDB", false));
        m_threadFactory = new CleaningDaemonThreadFactory(m_clientName, m_logger);
        m_containerServices = new ContainerServicesImpl(m_acsManagerProxy, cdb, rootPOA, acsCorba, m_logger, 0, m_clientName, null, m_threadFactory);
        clImpl.setContainerServices(m_containerServices);
        initAlarmSystem();
    } catch (Exception ex) {
        //										"or to set up the container services.", ex);
        if (acsCorba.getORB() != null) {
            acsCorba.getORB().destroy();
        }
        throw ex;
    }
}
Also used : ContainerServicesImpl(alma.acs.container.ContainerServicesImpl) CleaningDaemonThreadFactory(alma.acs.container.CleaningDaemonThreadFactory) DAL(com.cosylab.CDB.DAL) AcsManagerProxy(alma.acs.container.AcsManagerProxy)

Aggregations

CleaningDaemonThreadFactory (alma.acs.container.CleaningDaemonThreadFactory)6 ContainerServicesImpl (alma.acs.container.ContainerServicesImpl)4 AcsManagerProxy (alma.acs.container.AcsManagerProxy)3 DAL (com.cosylab.CDB.DAL)3 AcsJContainerServicesEx (alma.JavaContainerError.wrappers.AcsJContainerServicesEx)2 AcsLogger (alma.acs.logging.AcsLogger)2 AcsCorba (alma.acs.container.corba.AcsCorba)1 ThreadFactory (java.util.concurrent.ThreadFactory)1 POA (org.omg.PortableServer.POA)1 Client (si.ijs.maci.Client)1