Search in sources :

Example 1 with RequestManagerImpl

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

the class SubmitStandingQueryRequestImpl method get_request_manager.

@Override
public RequestManager get_request_manager() throws ProcessingFault, SystemFault {
    if (requestManager == null) {
        String requestManagerId = UUID.randomUUID().toString();
        RequestManagerImpl requestManagerImpl = new RequestManagerImpl();
        try {
            _poa().activate_object_with_id(requestManagerId.getBytes(Charset.forName(NsiliEndpoint.ENCODING)), requestManagerImpl);
        } catch (ServantAlreadyActive | ObjectAlreadyActive | WrongPolicy e) {
            LOGGER.debug("Error activating RequestManager: ", e);
        }
        org.omg.CORBA.Object obj = _poa().create_reference_with_id(requestManagerId.getBytes(Charset.forName(NsiliEndpoint.ENCODING)), RequestManagerHelper.id());
        requestManager = RequestManagerHelper.narrow(obj);
    }
    return requestManager;
}
Also used : WrongPolicy(org.omg.PortableServer.POAPackage.WrongPolicy) ObjectAlreadyActive(org.omg.PortableServer.POAPackage.ObjectAlreadyActive) ServantAlreadyActive(org.omg.PortableServer.POAPackage.ServantAlreadyActive) RequestManagerImpl(org.codice.alliance.nsili.endpoint.managers.RequestManagerImpl)

Aggregations

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