Search in sources :

Example 16 with NO_IMPLEMENT

use of org.omg.CORBA.NO_IMPLEMENT in project narayana by jbosstm.

the class JavaIdlRCManager method makeRC.

/**
 * We create a RecoveryCoordinator reference, but without (we think)
 * actually making the implementation object available to the orb.
 * The data needed to construct the RecoveryCoordinator is put in
 * the ObjectId. If a replay_completion is received, it will be sent,
 * via the locationd daemon, to the RecoveryManager.
 */
public RecoveryCoordinator makeRC(Uid RCUid, Uid tranUid, Uid processUid, boolean isServerTransaction) {
    initialise();
    RecoveryCoordinator rc = null;
    try {
        String rcObjectId = GenericRecoveryCoordinator.makeId(RCUid, tranUid, processUid, isServerTransaction);
        if (ref_ReCoo != null) {
            // New for IOR template
            String new_ior = RecoverIOR.getIORFromString(ORBManager.getORB().orb(), ref_ReCoo, rcObjectId);
            org.omg.CORBA.Object rcAsObject = ORBManager.getORB().orb().string_to_object(new_ior);
            // End for IOR Template
            rc = RecoveryCoordinatorHelper.narrow(rcAsObject);
            if (jtsLogger.logger.isDebugEnabled()) {
                jtsLogger.logger.debug("JavaIdlRCManager: Created reference for tran " + tranUid + " = " + rc);
            }
        } else {
            if (JavaIdlRCManager._runWithoutDaemon)
                throw new NO_IMPLEMENT();
            else {
                jtsLogger.i18NLogger.warn_orbspecific_jacorb_recoverycoordinators_JacOrbRCManager_3();
                rc = null;
            }
        }
    } catch (Exception ex) {
        jtsLogger.i18NLogger.warn_orbspecific_jacorb_recoverycoordinators_JacOrbRCManager_2(ex);
    }
    return rc;
}
Also used : NO_IMPLEMENT(org.omg.CORBA.NO_IMPLEMENT) RecoveryCoordinator(org.omg.CosTransactions.RecoveryCoordinator) GenericRecoveryCoordinator(com.arjuna.ats.internal.jts.orbspecific.recovery.recoverycoordinators.GenericRecoveryCoordinator) SystemException(org.omg.CORBA.SystemException)

Example 17 with NO_IMPLEMENT

use of org.omg.CORBA.NO_IMPLEMENT in project alliance by codice.

the class GetParametersRequestImpl method complete.

@Override
public State complete(DAGHolder parameters) throws ProcessingFault, SystemFault {
    Filter filter = filterBuilder.attribute(Metacard.ID).is().equalTo().text(productIdStr);
    Query query = new QueryImpl(filter);
    Result result = getResult(query);
    if (result == null) {
        return State.COMPLETED;
    }
    Map<String, List<String>> mandatoryAttributes = new HashMap<>();
    if (outgoingValidationEnabled) {
        NsiliDataModel nsiliDataModel = new NsiliDataModel();
        mandatoryAttributes = nsiliDataModel.getRequiredAttrsForView(NsiliConstants.NSIL_ALL_VIEW);
    }
    try {
        if (desiredParameters != null) {
            if (isParamContained(desiredParameters, "ALL")) {
                parameters.value = ResultDAGConverter.convertResult(result, _orb(), _poa(), new ArrayList<>(), mandatoryAttributes);
            } else if (isParamContained(desiredParameters, "CORE")) {
                throw new NO_IMPLEMENT("CORE desired_parameter not supported");
            } else if (isParamContained(desiredParameters, "ORDER")) {
                throw new NO_IMPLEMENT("ORDER desired_parameter not supported");
            } else {
                parameters.value = ResultDAGConverter.convertResult(result, _orb(), _poa(), Arrays.asList(desiredParameters), mandatoryAttributes);
            }
        } else {
            if (result != null) {
                parameters.value = ResultDAGConverter.convertResult(result, _orb(), _poa(), new ArrayList<>(), mandatoryAttributes);
            }
        }
    } catch (DagParsingException dpe) {
        LOGGER.debug("DAG could not be parsed and will not be returned to caller:", dpe);
    }
    return State.COMPLETED;
}
Also used : NO_IMPLEMENT(org.omg.CORBA.NO_IMPLEMENT) DagParsingException(org.codice.alliance.nsili.common.DagParsingException) QueryImpl(ddf.catalog.operation.impl.QueryImpl) Query(ddf.catalog.operation.Query) Filter(org.opengis.filter.Filter) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) ArrayList(java.util.ArrayList) List(java.util.List) NsiliDataModel(org.codice.alliance.nsili.common.datamodel.NsiliDataModel) Result(ddf.catalog.data.Result)

Aggregations

NO_IMPLEMENT (org.omg.CORBA.NO_IMPLEMENT)17 CBDescIn (alma.ACS.CBDescIn)6 SystemException (org.omg.CORBA.SystemException)5 RecoveryCoordinator (org.omg.CosTransactions.RecoveryCoordinator)4 GenericRecoveryCoordinator (com.arjuna.ats.internal.jts.orbspecific.recovery.recoverycoordinators.GenericRecoveryCoordinator)3 ComponentLifecycleException (alma.acs.component.ComponentLifecycleException)2 EventDescription (alma.acsnc.EventDescription)2 ArrayList (java.util.ArrayList)2 BAD_OPERATION (org.omg.CORBA.BAD_OPERATION)2 BAD_PARAM (org.omg.CORBA.BAD_PARAM)2 Inactive (org.omg.CosTransactions.Inactive)2 NoSuchCharacteristic (alma.ACS.NoSuchCharacteristic)1 PropertySetImpl (alma.ACS.jbaci.PropertySetImpl)1 CDBFieldDoesNotExistEx (alma.cdbErrType.CDBFieldDoesNotExistEx)1 WrongCDBDataTypeEx (alma.cdbErrType.WrongCDBDataTypeEx)1 ArjunaFactory (com.arjuna.ArjunaOTS.ArjunaFactory)1 OTSAbstractRecord (com.arjuna.ArjunaOTS.OTSAbstractRecord)1 UidCoordinator (com.arjuna.ArjunaOTS.UidCoordinator)1 Uid (com.arjuna.ats.arjuna.common.Uid)1 AbstractRecord (com.arjuna.ats.arjuna.coordinator.AbstractRecord)1