Search in sources :

Example 1 with DataModelMgrImpl

use of org.codice.alliance.nsili.endpoint.managers.DataModelMgrImpl in project alliance by codice.

the class LibraryImpl method getDataModelMgrObject.

private Object getDataModelMgrObject(String managerId) {
    Object obj;
    DataModelMgrImpl dataModelMgr = new DataModelMgrImpl();
    if (!CorbaUtils.isIdActive(poa, managerId.getBytes(Charset.forName(NsiliEndpoint.ENCODING)))) {
        try {
            poa.activate_object_with_id(managerId.getBytes(Charset.forName(NsiliEndpoint.ENCODING)), dataModelMgr);
        } catch (ServantAlreadyActive | ObjectAlreadyActive | WrongPolicy e) {
            LOGGER.info("Error activating DataModelMgr: ", e);
        }
    }
    obj = poa.create_reference_with_id(managerId.getBytes(Charset.forName(NsiliEndpoint.ENCODING)), DataModelMgrHelper.id());
    return obj;
}
Also used : WrongPolicy(org.omg.PortableServer.POAPackage.WrongPolicy) DataModelMgrImpl(org.codice.alliance.nsili.endpoint.managers.DataModelMgrImpl) ObjectAlreadyActive(org.omg.PortableServer.POAPackage.ObjectAlreadyActive) Object(org.omg.CORBA.Object) ServantAlreadyActive(org.omg.PortableServer.POAPackage.ServantAlreadyActive)

Aggregations

DataModelMgrImpl (org.codice.alliance.nsili.endpoint.managers.DataModelMgrImpl)1 Object (org.omg.CORBA.Object)1 ObjectAlreadyActive (org.omg.PortableServer.POAPackage.ObjectAlreadyActive)1 ServantAlreadyActive (org.omg.PortableServer.POAPackage.ServantAlreadyActive)1 WrongPolicy (org.omg.PortableServer.POAPackage.WrongPolicy)1