Example #1
0
        static void Main(string[] args)
        {
            DecompressFileApp app      = new DecompressFileApp();
            Logger            logger   = app.Logger;
            ExitCode          exitCode = ExitCode.None;

            try
            {
                logger.Info("Application started.");

                CultureInfo.CurrentCulture = CultureInfo.CreateSpecificCulture("en-GB");

                Options options = new Options();

                Parser.Default.ParseArgumentsStrict(args, options, CommandLineOptions.ArgumentParsingFailed);

                using (ICompressionService zipFileService = new CompressionService())
                {
                    zipFileService.Decompress(options.InputFileName, options.OutputPath);
                    exitCode = ExitCode.Success;
                }
            }
            catch (Exception ex)
            {
                exitCode = new ExceptionHandlingService(ex).GetExitCode();
            }
            finally
            {
                logger.Info(CultureInfo.InvariantCulture, "Application exited with code: {0}", (int)exitCode);
                Environment.Exit((int)exitCode);
            }
        }
        static void Main(string[] args)
        {
            UpdateOrganizationSettingApp app = new UpdateOrganizationSettingApp();
            Logger   logger   = app.Logger;
            ExitCode exitCode = ExitCode.None;

            try
            {
                logger.Info("Application started.");

                CultureInfo.CurrentCulture = CultureInfo.CreateSpecificCulture("en-GB");

                Options options = new Options();

                Parser.Default.ParseArgumentsStrict(args, options, CommandLineOptions.ArgumentParsingFailed);

                Connection connection = null;

                if (string.IsNullOrWhiteSpace(options.ConnectionString))
                {
                    connection = new Connection(options.AuthorityUrl, options.OrganizationUrl, options.OrganizationUrlSuffix,
                                                options.TenantId, options.ServicePrincipalId, options.ServicePrincipalSecret, options.ConnectionRetries, options.ConnectionTimeout);
                }
                else
                {
                    connection = new Connection(options.ConnectionString, options.ConnectionRetries, options.ConnectionTimeout);
                }

                //TO-DO: this is in experimental mode
                //Console.ReadLine();

                using (CrmServiceContext organizationServiceContext = new CrmServiceContext(connection.OrganizationService))
                    using (CrmService crmService = new CrmService(organizationServiceContext, connection))
                        using (DeploymentService deploymentService = new DeploymentService(organizationServiceContext, crmService))
                        {
                            var organizationSettings = new Organization
                            {
                                BlockAttachments = options.BlockAttachments,
                                EnableAccessToLegacyWebClientUI = options.EnableAccessToLegacyWebClientUI,
                                LegacyFormRendering             = options.LegacyFormRendering,
                                OrganizationName                = options.OrganizationName,
                                SessionTimeoutEnabled           = options.SessionTimeoutEnabled,
                                SessionTimeoutInMinutes         = options.SessionTimeoutInMinutes,
                                SessionTimeoutReminderInMinutes = options.SessionTimeoutReminderInMinutes,
                                SLAPauseStates = options.SLAPauseStates
                            };
                            deploymentService.UpdateOrganizationSettings(organizationSettings);
                            exitCode = ExitCode.Success;
                        }
            }
            catch (Exception ex)
            {
                exitCode = new ExceptionHandlingService(ex).GetExitCode();
            }
            finally
            {
                logger.Info(CultureInfo.InvariantCulture, "Application exited with code: {0}", (int)exitCode);
                Environment.Exit((int)exitCode);
            }
        }
Example #3
0
 public StageRuntimeServices(
     DispatchService dispatchService,
     EventBeanService eventBeanService,
     EventBeanTypedEventFactory eventBeanTypedEventFactory,
     EventTypeRepository eventTypeRepositoryBus,
     EventTypeResolvingBeanFactory eventTypeResolvingBeanFactory,
     ExceptionHandlingService exceptionHandlingService,
     NamedWindowDispatchService namedWindowDispatchService,
     string runtimeURI,
     RuntimeSettingsService runtimeSettingsService,
     StatementLifecycleService statementLifecycleService,
     TableExprEvaluatorContext tableExprEvaluatorContext,
     ThreadingService threadingService,
     VariableManagementService variableManagementService)
 {
     DispatchService = dispatchService;
     EventBeanService = eventBeanService;
     EventBeanTypedEventFactory = eventBeanTypedEventFactory;
     EventTypeRepositoryBus = eventTypeRepositoryBus;
     EventTypeResolvingBeanFactory = eventTypeResolvingBeanFactory;
     ExceptionHandlingService = exceptionHandlingService;
     NamedWindowDispatchService = namedWindowDispatchService;
     RuntimeURI = runtimeURI;
     RuntimeSettingsService = runtimeSettingsService;
     StatementLifecycleService = statementLifecycleService;
     TableExprEvaluatorContext = tableExprEvaluatorContext;
     ThreadingService = threadingService;
     VariableManagementService = variableManagementService;
 }
Example #4
0
        static void Main(string[] args)
        {
            ProcessExecutionContextApp app = new ProcessExecutionContextApp();
            Logger   logger   = app.Logger;
            ExitCode exitCode = ExitCode.None;

            try
            {
                logger.Info("Application started.");

                CultureInfo.CurrentCulture = CultureInfo.CreateSpecificCulture("en-GB");

                Options options = new Options();

                Parser.Default.ParseArgumentsStrict(args, options, CommandLineOptions.ArgumentParsingFailed);

                Connection connection = null;

                if (string.IsNullOrWhiteSpace(options.ConnectionString))
                {
                    connection = new Connection(options.AuthorityUrl, options.OrganizationUrl, options.OrganizationUrlSuffix,
                                                options.TenantId, options.ServicePrincipalId, options.ServicePrincipalSecret, options.ConnectionRetries, options.ConnectionTimeout);
                }
                else
                {
                    connection = new Connection(options.ConnectionString, options.ConnectionRetries, options.ConnectionTimeout);
                }

                using (CrmServiceContext organizationServiceContext = new CrmServiceContext(connection.OrganizationService))
                    using (CrmService crmService = new CrmService(organizationServiceContext, connection))
                        using (IExecutionContextService executionContextService = new ExecutionContextService(organizationServiceContext, connection, crmService))
                        {
                            Console.WriteLine("Press any key to start ...");
                            Console.ReadKey();
                            do
                            {
                                while (!Console.KeyAvailable)
                                {
                                    Console.WriteLine("Press ESC to stop");
                                    executionContextService.ProcessExecutionContexts();
                                    // Wait 5 secs until the next call
                                    // TO-DO: the solution must be more robust to ensure that we are not going to face any pitfalls
                                    Thread.Sleep(5000);
                                }
                            } while (Console.ReadKey(true).Key != ConsoleKey.Escape);

                            exitCode = ExitCode.Success;
                        }
            }
            catch (Exception ex)
            {
                exitCode = new ExceptionHandlingService(ex).GetExitCode();
            }
            finally
            {
                logger.Info(CultureInfo.InvariantCulture, "Application exited with code: {0}", (int)exitCode);
                Environment.Exit((int)exitCode);
            }
        }
 protected abstract NamedWindowDispatchService MakeNamedWindowDispatchService(
     SchedulingServiceSPI schedulingService,
     Configuration configurationSnapshot,
     IReaderWriterLock eventProcessingRWLock,
     ExceptionHandlingService exceptionHandlingService,
     VariableManagementService variableManagementService,
     TableManagementService tableManagementService,
     MetricReportingService metricReportingService);
Example #6
0
        public async Task HandleException_ExceptionIsNull_LogsMessage()
        {
            var mocks   = CreateMocks();
            var handler = new ExceptionHandlingService(mocks.alertService.Object, mocks.logger.Object);

            await handler.HandleException(null);

            mocks.logger.Verify(x => x.Log("Unknown Error \n"), Times.Once);
        }
Example #7
0
        public async Task HandleException_ExceptionIsNull_DisplaysAlert()
        {
            var mocks   = CreateMocks();
            var handler = new ExceptionHandlingService(mocks.alertService.Object, mocks.logger.Object);

            await handler.HandleException(null);

            mocks.alertService.Verify(x => x.DisplayAlert("Unknown Error", "Unknown Error"), Times.Once);
        }
Example #8
0
        public async Task HandleException_ValidCall_LogsMessage()
        {
            var mocks     = CreateMocks();
            var exception = new Exception("Message");
            var handler   = new ExceptionHandlingService(mocks.alertService.Object, mocks.logger.Object);

            await handler.HandleException(exception);

            mocks.logger.Verify(x => x.Log(It.IsAny <string>()), Times.Once);
        }
Example #9
0
        public async Task HandleException_ValidCall_DisplaysExceptionMessage()
        {
            var mocks     = CreateMocks();
            var exception = new Exception("Message");
            var handler   = new ExceptionHandlingService(mocks.alertService.Object, mocks.logger.Object);

            await handler.HandleException(exception);

            mocks.alertService.Verify(x => x.DisplayExceptionMessage(exception), Times.Once);
        }
Example #10
0
 public EPEventServiceExprEvaluatorContext(
     string runtimeURI,
     EventBeanService eventBeanService,
     ExceptionHandlingService exceptionHandlingService,
     SchedulingService schedulingService)
 {
     RuntimeUri = runtimeURI;
     EventBeanService = eventBeanService;
     ExceptionHandlingService = exceptionHandlingService;
     SchedulingService = schedulingService;
 }
Example #11
0
        static void Main(string[] args)
        {
            ImportSolutionApp app      = new ImportSolutionApp();
            Logger            logger   = app.Logger;
            ExitCode          exitCode = ExitCode.None;

            try
            {
                logger.Info("Application started.");

                CultureInfo.CurrentCulture = CultureInfo.CreateSpecificCulture("en-GB");

                Options options = new Options();

                Parser.Default.ParseArgumentsStrict(args, options, CommandLineOptions.ArgumentParsingFailed);

                Connection connection = null;

                if (string.IsNullOrWhiteSpace(options.ConnectionString))
                {
                    connection = new Connection(options.AuthorityUrl, options.OrganizationUrl, options.OrganizationUrlSuffix,
                                                options.TenantId, options.ServicePrincipalId, options.ServicePrincipalSecret, options.ConnectionRetries, options.ConnectionTimeout);
                }
                else
                {
                    connection = new Connection(options.ConnectionString, options.ConnectionRetries, options.ConnectionTimeout);
                }

                using (CrmServiceContext organizationServiceContext = new CrmServiceContext(connection.OrganizationService))
                    using (CrmService crmService = new CrmService(organizationServiceContext, connection))
                        using (SolutionService solutionService = new SolutionService(organizationServiceContext, connection, crmService))
                        {
                            solutionService.ImportSolution(options.SolutionName, options.InputFile,
                                                           options.HoldingSolution.GetValueOrDefault(), options.OverwriteUnmanagedCustomizations.GetValueOrDefault(),
                                                           options.PublishWorkflows.GetValueOrDefault(), options.SkipProductUpdateDependencies.GetValueOrDefault(),
                                                           options.PollingInterval, options.PollingTimeout);
                            exitCode = ExitCode.Success;
                        }
            }
            catch (Exception ex)
            {
                exitCode = new ExceptionHandlingService(ex).GetExitCode();
            }
            finally
            {
                logger.Info(CultureInfo.InvariantCulture, "Application exited with code: {0}", (int)exitCode);
                Environment.Exit((int)exitCode);
            }
        }
 /// <summary>
 /// Ctor.
 /// </summary>
 /// <param name="schedulingService">The scheduling service.</param>
 /// <param name="variableService">is for variable access</param>
 /// <param name="tableService">The table service.</param>
 /// <param name="isPrioritized">if the engine is running with prioritized execution</param>
 /// <param name="eventProcessingRWLock">The event processing rw lock.</param>
 /// <param name="exceptionHandlingService">The exception handling service.</param>
 /// <param name="metricReportingService">The metric reporting service.</param>
 public NamedWindowDispatchServiceImpl(
     SchedulingService schedulingService,
     VariableService variableService,
     TableService tableService,
     bool isPrioritized,
     IReaderWriterLock eventProcessingRWLock,
     ExceptionHandlingService exceptionHandlingService,
     MetricReportingService metricReportingService)
 {
     _schedulingService        = schedulingService;
     _variableService          = variableService;
     _tableService             = tableService;
     _isPrioritized            = isPrioritized;
     _eventProcessingRwLock    = eventProcessingRWLock;
     _exceptionHandlingService = exceptionHandlingService;
     _metricReportingService   = metricReportingService;
 }
Example #13
0
        static void Main(string[] args)
        {
            UpdateDataApp app      = new UpdateDataApp();
            Logger        logger   = app.Logger;
            ExitCode      exitCode = ExitCode.None;

            try
            {
                logger.Info("Application started.");

                CultureInfo.CurrentCulture = CultureInfo.CreateSpecificCulture("en-GB");

                Options options = new Options();

                Parser.Default.ParseArgumentsStrict(args, options, CommandLineOptions.ArgumentParsingFailed);

                Connection connection = null;

                if (string.IsNullOrWhiteSpace(options.ConnectionString))
                {
                    connection = new Connection(options.AuthorityUrl, options.OrganizationUrl, options.OrganizationUrlSuffix,
                                                options.TenantId, options.ServicePrincipalId, options.ServicePrincipalSecret, options.ConnectionRetries, options.ConnectionTimeout);
                }
                else
                {
                    connection = new Connection(options.ConnectionString, options.ConnectionRetries, options.ConnectionTimeout);
                }

                using (CrmServiceContext organizationServiceContext = new CrmServiceContext(connection.OrganizationService))
                    using (CrmService crmService = new CrmService(organizationServiceContext, connection))
                        using (IDataMigrationService dataMigrationService = new DataMigrationService(organizationServiceContext, crmService))
                        {
                            dataMigrationService.UpdateData(options.EntityName, options.PrimaryKey, options.AttributeName, options.AttributeValue);
                            exitCode = ExitCode.Success;
                        }
            }
            catch (Exception ex)
            {
                exitCode = new ExceptionHandlingService(ex).GetExitCode();
            }
            finally
            {
                logger.Info(CultureInfo.InvariantCulture, "Application exited with code: {0}", (int)exitCode);
                Environment.Exit((int)exitCode);
            }
        }
Example #14
0
 public NamedWindowDispatchServiceImpl(
     SchedulingService schedulingService,
     VariableManagementService variableService,
     TableManagementService tableManagementService,
     bool isPrioritized,
     IReaderWriterLock eventProcessingRWLock,
     ExceptionHandlingService exceptionHandlingService,
     MetricReportingService metricReportingService)
 {
     this.schedulingService = schedulingService;
     this.variableService = variableService;
     this.tableManagementService = tableManagementService;
     this.isPrioritized = isPrioritized;
     this.eventProcessingRWLock = eventProcessingRWLock;
     this.exceptionHandlingService = exceptionHandlingService;
     this.metricReportingService = metricReportingService;
 }
Example #15
0
 protected override NamedWindowDispatchService MakeNamedWindowDispatchService(
     SchedulingServiceSPI schedulingService,
     Configuration configurationSnapshot,
     IReaderWriterLock eventProcessingRWLock,
     ExceptionHandlingService exceptionHandlingService,
     VariableManagementService variableManagementService,
     TableManagementService tableManagementService,
     MetricReportingService metricReportingService)
 {
     return new NamedWindowDispatchServiceImpl(
         schedulingService,
         variableManagementService,
         tableManagementService,
         configurationSnapshot.Runtime.Execution.IsPrioritized,
         eventProcessingRWLock,
         exceptionHandlingService,
         metricReportingService);
 }
Example #16
0
        static void Main(string[] args)
        {
            ExportDataApp app      = new ExportDataApp();
            Logger        logger   = app.Logger;
            ExitCode      exitCode = ExitCode.None;

            try
            {
                logger.Info("Application started.");

                CultureInfo.CurrentCulture = CultureInfo.CreateSpecificCulture("en-GB");

                Options options = new Options();

                Parser.Default.ParseArgumentsStrict(args, options, CommandLineOptions.ArgumentParsingFailed);

                Connection connection = null;

                if (string.IsNullOrWhiteSpace(options.ConnectionString))
                {
                    connection = new Connection(options.AuthorityUrl, options.OrganizationUrl, options.OrganizationUrlSuffix,
                                                options.TenantId, options.ServicePrincipalId, options.ServicePrincipalSecret, options.ConnectionRetries, options.ConnectionTimeout);
                }
                else
                {
                    connection = new Connection(options.ConnectionString, options.ConnectionRetries, options.ConnectionTimeout);
                }

                using (IDataMigrationService dataMigrationService = new DataMigrationService(connection.CrmServiceClient))
                {
                    bool result = dataMigrationService.ExportData(options.SchemaFileName, options.OutputFileName);
                    exitCode = result == true ? ExitCode.Success : ExitCode.ConfigurationDataExportFailed;
                }
            }
            catch (Exception ex)
            {
                exitCode = new ExceptionHandlingService(ex).GetExitCode();
            }
            finally
            {
                logger.Info(CultureInfo.InvariantCulture, "Application exited with code: {0}", (int)exitCode);
                Environment.Exit((int)exitCode);
            }
        }
Example #17
0
 /// <summary>
 /// Ctor.
 /// </summary>
 /// <param name="schedulingService">The scheduling service.</param>
 /// <param name="variableService">is for variable access</param>
 /// <param name="tableService">The table service.</param>
 /// <param name="isPrioritized">if the engine is running with prioritized execution</param>
 /// <param name="eventProcessingRWLock">The event processing rw lock.</param>
 /// <param name="exceptionHandlingService">The exception handling service.</param>
 /// <param name="metricReportingService">The metric reporting service.</param>
 /// <param name="threadLocalManager">The thread local manager.</param>
 public NamedWindowDispatchServiceImpl(
     SchedulingService schedulingService,
     VariableService variableService,
     TableService tableService,
     bool isPrioritized,
     IReaderWriterLock eventProcessingRWLock,
     ExceptionHandlingService exceptionHandlingService,
     MetricReportingService metricReportingService,
     IThreadLocalManager threadLocalManager)
 {
     _threadLocal              = threadLocalManager.Create <DispatchesTL>(() => new DispatchesTL());
     _schedulingService        = schedulingService;
     _variableService          = variableService;
     _tableService             = tableService;
     _isPrioritized            = isPrioritized;
     _eventProcessingRwLock    = eventProcessingRWLock;
     _exceptionHandlingService = exceptionHandlingService;
     _metricReportingService   = metricReportingService;
 }
Example #18
0
        public static IThreadLocal <EPEventServiceThreadLocalEntry> AllocateThreadLocals(
            bool isPrioritized,
            string runtimeURI,
            EventBeanService eventBeanService,
            ExceptionHandlingService exceptionHandlingService,
            SchedulingService schedulingService)
        {
            return(new FastThreadLocal <EPEventServiceThreadLocalEntry>(
                       () => {
                DualWorkQueue <object> dualWorkQueue = new DualWorkQueue <object>();
                ArrayBackedCollection <FilterHandle> filterHandles = new ArrayBackedCollection <FilterHandle>(100);
                ArrayBackedCollection <ScheduleHandle> scheduleHandles = new ArrayBackedCollection <ScheduleHandle>(100);

                IDictionary <EPStatementAgentInstanceHandle, object> matchesPerStmt;
                IDictionary <EPStatementAgentInstanceHandle, object> schedulesPerStmt;
                if (isPrioritized)
                {
                    matchesPerStmt = new SortedDictionary <EPStatementAgentInstanceHandle, object>(EPStatementAgentInstanceHandleComparer.INSTANCE);
                    schedulesPerStmt = new SortedDictionary <EPStatementAgentInstanceHandle, object>(EPStatementAgentInstanceHandleComparer.INSTANCE);
                }
                else
                {
                    matchesPerStmt = new Dictionary <EPStatementAgentInstanceHandle, object>();
                    schedulesPerStmt = new Dictionary <EPStatementAgentInstanceHandle, object>();
                }

                ExprEvaluatorContext runtimeFilterAndDispatchTimeContext = new EPEventServiceExprEvaluatorContext(
                    runtimeURI,
                    eventBeanService,
                    exceptionHandlingService,
                    schedulingService);
                return new EPEventServiceThreadLocalEntry(
                    dualWorkQueue,
                    filterHandles,
                    scheduleHandles,
                    matchesPerStmt,
                    schedulesPerStmt,
                    runtimeFilterAndDispatchTimeContext);
            }));
        }
 /// <summary>
 /// Ctor.
 /// </summary>
 /// <param name="schedulingService">The scheduling service.</param>
 /// <param name="variableService">is for variable access</param>
 /// <param name="tableService">The table service.</param>
 /// <param name="isPrioritized">if the engine is running with prioritized execution</param>
 /// <param name="eventProcessingRWLock">The event processing rw lock.</param>
 /// <param name="exceptionHandlingService">The exception handling service.</param>
 /// <param name="enableQueryPlanLog">if set to <c>true</c> [enable query plan log].</param>
 /// <param name="metricReportingService">The metric reporting service.</param>
 public NamedWindowServiceImpl(
     SchedulingService schedulingService,
     VariableService variableService,
     TableService tableService,
     bool isPrioritized,
     IReaderWriterLock eventProcessingRWLock,
     ExceptionHandlingService exceptionHandlingService,
     bool enableQueryPlanLog,
     MetricReportingService metricReportingService)
 {
     _schedulingService        = schedulingService;
     _processors               = new Dictionary <string, NamedWindowProcessor>();
     _windowStatementLocks     = new Dictionary <string, NamedWindowLockPair>();
     _variableService          = variableService;
     _tableService             = tableService;
     _observers                = new HashSet <NamedWindowLifecycleObserver>();
     _isPrioritized            = isPrioritized;
     _eventProcessingRwLock    = eventProcessingRWLock;
     _exceptionHandlingService = exceptionHandlingService;
     _enableQueryPlanLog       = enableQueryPlanLog;
     _metricReportingService   = metricReportingService;
 }
Example #20
0
 public EPServicesContext(
     IContainer container,
     AggregationServiceFactoryService aggregationServiceFactoryService,
     BeanEventTypeFactoryPrivate beanEventTypeFactoryPrivate,
     BeanEventTypeStemService beanEventTypeStemService,
     ClassForNameProvider classForNameProvider,
     ParentClassLoader classLoaderParent,
     PathRegistry <string, ClassProvided> classProvidedPathRegistry,
     Configuration configSnapshot,
     ContextManagementService contextManagementService,
     PathRegistry <string, ContextMetaData> contextPathRegistry,
     ContextServiceFactory contextServiceFactory,
     EPDataFlowServiceImpl dataflowService,
     DataFlowFilterServiceAdapter dataFlowFilterServiceAdapter,
     DatabaseConfigServiceRuntime databaseConfigServiceRuntime,
     DeploymentLifecycleService deploymentLifecycleService,
     DispatchService dispatchService,
     RuntimeEnvContext runtimeEnvContext,
     RuntimeSettingsService runtimeSettingsService,
     string runtimeURI,
     ImportServiceRuntime importServiceRuntime,
     EPStatementFactory epStatementFactory,
     PathRegistry <string, ExpressionDeclItem> exprDeclaredPathRegistry,
     IReaderWriterLock eventProcessingRWLock,
     EPServicesHA epServicesHA,
     EPRuntimeSPI epRuntime,
     EventBeanService eventBeanService,
     EventBeanTypedEventFactory eventBeanTypedEventFactory,
     EPRenderEventServiceImpl eventRenderer,
     EventSerdeFactory eventSerdeFactory,
     EventTableIndexService eventTableIndexService,
     EventTypeAvroHandler eventTypeAvroHandler,
     EventTypeFactory eventTypeFactory,
     EventTypeIdResolver eventTypeIdResolver,
     PathRegistry <string, EventType> eventTypePathRegistry,
     EventTypeRepositoryImpl eventTypeRepositoryBus,
     EventTypeResolvingBeanFactory eventTypeResolvingBeanFactory,
     EventTypeSerdeRepository eventTypeSerdeRepository,
     ExceptionHandlingService exceptionHandlingService,
     ExpressionResultCacheService expressionResultCacheService,
     FilterBooleanExpressionFactory filterBooleanExpressionFactory,
     FilterServiceSPI filterService,
     FilterSharedBoolExprRepository filterSharedBoolExprRepository,
     FilterSharedLookupableRepository filterSharedLookupableRepository,
     HistoricalDataCacheFactory historicalDataCacheFactory,
     InternalEventRouterImpl internalEventRouter,
     MetricReportingService metricReportingService,
     MultiMatchHandlerFactory multiMatchHandlerFactory,
     NamedWindowConsumerManagementService namedWindowConsumerManagementService,
     NamedWindowDispatchService namedWindowDispatchService,
     NamedWindowFactoryService namedWindowFactoryService,
     NamedWindowManagementService namedWindowManagementService,
     PathRegistry <string, NamedWindowMetaData> namedWindowPathRegistry,
     PatternFactoryService patternFactoryService,
     PatternSubexpressionPoolRuntimeSvc patternSubexpressionPoolEngineSvc,
     ResultSetProcessorHelperFactory resultSetProcessorHelperFactory,
     RowRecogStateRepoFactory rowRecogStateRepoFactory,
     RowRecogStatePoolRuntimeSvc rowRecogStatePoolEngineSvc,
     SchedulingServiceSPI schedulingService,
     PathRegistry <NameAndParamNum, ExpressionScriptProvided> scriptPathRegistry,
     ScriptCompiler scriptCompiler,
     StageRecoveryService stageRecoveryService,
     StatementLifecycleService statementLifecycleService,
     StatementAgentInstanceLockFactory statementAgentInstanceLockFactory,
     StatementResourceHolderBuilder statementResourceHolderBuilder,
     TableExprEvaluatorContext tableExprEvaluatorContext,
     TableManagementService tableManagementService,
     PathRegistry <string, TableMetaData> tablePathRegistry,
     ThreadingService threadingService,
     TimeAbacus timeAbacus,
     TimeSourceService timeSourceService,
     TimerService timerService,
     VariableManagementService variableManagementService,
     PathRegistry <string, VariableMetaData> variablePathRegistry,
     ViewableActivatorFactory viewableActivatorFactory,
     ViewFactoryService viewFactoryService,
     ViewServicePreviousFactory viewServicePreviousFactory,
     XMLFragmentEventTypeFactory xmlFragmentEventTypeFactory)
 {
     _container = container;
     _aggregationServiceFactoryService = aggregationServiceFactoryService;
     _beanEventTypeFactoryPrivate      = beanEventTypeFactoryPrivate;
     _beanEventTypeStemService         = beanEventTypeStemService;
     _classForNameProvider             = classForNameProvider;
     _classLoaderParent            = classLoaderParent;
     _classProvidedPathRegistry    = classProvidedPathRegistry;
     _configSnapshot               = configSnapshot;
     _contextManagementService     = contextManagementService;
     _contextPathRegistry          = contextPathRegistry;
     _contextServiceFactory        = contextServiceFactory;
     _dataflowService              = dataflowService;
     _dataFlowFilterServiceAdapter = dataFlowFilterServiceAdapter;
     _databaseConfigServiceRuntime = databaseConfigServiceRuntime;
     _deploymentLifecycleService   = deploymentLifecycleService;
     _dispatchService              = dispatchService;
     _runtimeEnvContext            = runtimeEnvContext;
     _runtimeSettingsService       = runtimeSettingsService;
     _runtimeUri               = runtimeURI;
     _importServiceRuntime     = importServiceRuntime;
     _epStatementFactory       = epStatementFactory;
     _exprDeclaredPathRegistry = exprDeclaredPathRegistry;
     _eventProcessingRWLock    = eventProcessingRWLock;
     _epServicesHA             = epServicesHA;
     _epRuntime                            = epRuntime;
     _eventBeanService                     = eventBeanService;
     _eventBeanTypedEventFactory           = eventBeanTypedEventFactory;
     _eventRenderer                        = eventRenderer;
     _eventSerdeFactory                    = eventSerdeFactory;
     _eventTableIndexService               = eventTableIndexService;
     _eventTypeAvroHandler                 = eventTypeAvroHandler;
     _eventTypeFactory                     = eventTypeFactory;
     _eventTypeIdResolver                  = eventTypeIdResolver;
     _eventTypePathRegistry                = eventTypePathRegistry;
     _eventTypeRepositoryBus               = eventTypeRepositoryBus;
     _eventTypeResolvingBeanFactory        = eventTypeResolvingBeanFactory;
     _eventTypeSerdeRepository             = eventTypeSerdeRepository;
     _exceptionHandlingService             = exceptionHandlingService;
     _expressionResultCacheService         = expressionResultCacheService;
     _filterBooleanExpressionFactory       = filterBooleanExpressionFactory;
     _filterService                        = filterService;
     _filterSharedBoolExprRepository       = filterSharedBoolExprRepository;
     _filterSharedLookupableRepository     = filterSharedLookupableRepository;
     _historicalDataCacheFactory           = historicalDataCacheFactory;
     _internalEventRouter                  = internalEventRouter;
     _metricReportingService               = metricReportingService;
     _multiMatchHandlerFactory             = multiMatchHandlerFactory;
     _namedWindowConsumerManagementService = namedWindowConsumerManagementService;
     _namedWindowDispatchService           = namedWindowDispatchService;
     _namedWindowFactoryService            = namedWindowFactoryService;
     _namedWindowManagementService         = namedWindowManagementService;
     _namedWindowPathRegistry              = namedWindowPathRegistry;
     _patternFactoryService                = patternFactoryService;
     _patternSubexpressionPoolEngineSvc    = patternSubexpressionPoolEngineSvc;
     _resultSetProcessorHelperFactory      = resultSetProcessorHelperFactory;
     _rowRecogStateRepoFactory             = rowRecogStateRepoFactory;
     _rowRecogStatePoolEngineSvc           = rowRecogStatePoolEngineSvc;
     _schedulingService                    = schedulingService;
     _scriptPathRegistry                   = scriptPathRegistry;
     _stageRecoveryService                 = stageRecoveryService;
     _statementLifecycleService            = statementLifecycleService;
     _statementAgentInstanceLockFactory    = statementAgentInstanceLockFactory;
     _statementResourceHolderBuilder       = statementResourceHolderBuilder;
     _tableExprEvaluatorContext            = tableExprEvaluatorContext;
     _tableManagementService               = tableManagementService;
     _tablePathRegistry                    = tablePathRegistry;
     _threadingService                     = threadingService;
     _timeAbacus                           = timeAbacus;
     _timeSourceService                    = timeSourceService;
     _timerService                         = timerService;
     _variableManagementService            = variableManagementService;
     _variablePathRegistry                 = variablePathRegistry;
     _viewableActivatorFactory             = viewableActivatorFactory;
     _viewFactoryService                   = viewFactoryService;
     _viewServicePreviousFactory           = viewServicePreviousFactory;
     _xmlFragmentEventTypeFactory          = xmlFragmentEventTypeFactory;
     _scriptCompiler                       = scriptCompiler;
 }
 public StatementContextRuntimeServices(
     IContainer container,
     ContextManagementService contextManagementService,
     ContextServiceFactory contextServiceFactory,
     DatabaseConfigServiceRuntime databaseConfigService,
     DataFlowFilterServiceAdapter dataFlowFilterServiceAdapter,
     EPDataFlowServiceImpl dataflowService,
     string runtimeURI,
     INamingContext runtimeEnvContext,
     ImportServiceRuntime importServiceRuntime,
     RuntimeSettingsService runtimeSettingsService,
     RuntimeExtensionServices runtimeExtensionServices,
     object epRuntime,
     EPRenderEventService epRuntimeRenderEvent,
     EventServiceSendEventCommon eventServiceSendEventInternal,
     EPRuntimeEventProcessWrapped epRuntimeEventProcessWrapped,
     EventBeanService eventBeanService,
     EventBeanTypedEventFactory eventBeanTypedEventFactory,
     EventTableIndexService eventTableIndexService,
     EventTypeAvroHandler eventTypeAvroHandler,
     PathRegistry<string, EventType> eventTypePathRegistry,
     EventTypeRepositoryImpl eventTypeRepositoryPreconfigured,
     EventTypeResolvingBeanFactory eventTypeResolvingBeanFactory,
     ExceptionHandlingService exceptionHandlingService,
     ExpressionResultCacheService expressionResultCacheService,
     FilterBooleanExpressionFactory filterBooleanExpressionFactory,
     FilterSharedBoolExprRepository filterSharedBoolExprRepository,
     FilterSharedLookupableRepository filterSharedLookupableRepository,
     HistoricalDataCacheFactory historicalDataCacheFactory,
     InternalEventRouter internalEventRouter,
     MetricReportingService metricReportingService,
     NamedWindowConsumerManagementService namedWindowConsumerManagementService,
     NamedWindowManagementService namedWindowManagementService,
     PathRegistry<string, ContextMetaData> pathContextRegistry,
     PathRegistry<string, NamedWindowMetaData> pathNamedWindowRegistry,
     RowRecogStateRepoFactory rowRecogStateRepoFactory,
     ResultSetProcessorHelperFactory resultSetProcessorHelperFactory,
     StatementAgentInstanceLockFactory statementAgentInstanceLockFactory,
     StatementResourceHolderBuilder statementResourceHolderBuilder,
     TableExprEvaluatorContext tableExprEvaluatorContext,
     TableManagementService tableManagementService,
     VariableManagementService variableManagementService,
     ViewFactoryService viewFactoryService,
     ViewServicePreviousFactory viewServicePreviousFactory)
 {
     Container = container;
     ContextManagementService = contextManagementService;
     ContextServiceFactory = contextServiceFactory;
     DatabaseConfigService = databaseConfigService;
     DataFlowFilterServiceAdapter = dataFlowFilterServiceAdapter;
     DataflowService = dataflowService;
     RuntimeURI = runtimeURI;
     RuntimeEnvContext = runtimeEnvContext;
     ImportServiceRuntime = importServiceRuntime;
     RuntimeSettingsService = runtimeSettingsService;
     RuntimeExtensionServices = runtimeExtensionServices;
     Runtime = epRuntime;
     EPRuntimeRenderEvent = epRuntimeRenderEvent;
     EventServiceSendEventInternal = eventServiceSendEventInternal;
     EPRuntimeEventProcessWrapped = epRuntimeEventProcessWrapped;
     EventBeanService = eventBeanService;
     EventBeanTypedEventFactory = eventBeanTypedEventFactory;
     EventTableIndexService = eventTableIndexService;
     EventTypeAvroHandler = eventTypeAvroHandler;
     EventTypePathRegistry = eventTypePathRegistry;
     EventTypeRepositoryPreconfigured = eventTypeRepositoryPreconfigured;
     EventTypeResolvingBeanFactory = eventTypeResolvingBeanFactory;
     ExceptionHandlingService = exceptionHandlingService;
     ExpressionResultCacheService = expressionResultCacheService;
     FilterBooleanExpressionFactory = filterBooleanExpressionFactory;
     FilterSharedBoolExprRepository = filterSharedBoolExprRepository;
     FilterSharedLookupableRepository = filterSharedLookupableRepository;
     HistoricalDataCacheFactory = historicalDataCacheFactory;
     InternalEventRouter = internalEventRouter;
     MetricReportingService = metricReportingService;
     NamedWindowConsumerManagementService = namedWindowConsumerManagementService;
     NamedWindowManagementService = namedWindowManagementService;
     PathContextRegistry = pathContextRegistry;
     PathNamedWindowRegistry = pathNamedWindowRegistry;
     RowRecogStateRepoFactory = rowRecogStateRepoFactory;
     ResultSetProcessorHelperFactory = resultSetProcessorHelperFactory;
     StatementAgentInstanceLockFactory = statementAgentInstanceLockFactory;
     StatementResourceHolderBuilder = statementResourceHolderBuilder;
     TableExprEvaluatorContext = tableExprEvaluatorContext;
     TableManagementService = tableManagementService;
     VariableManagementService = variableManagementService;
     ViewFactoryService = viewFactoryService;
     ViewServicePreviousFactory = viewServicePreviousFactory;
 }
Example #22
0
        public void StoppedStatement(String contextName, String statementName, int statementId, String epl, ExceptionHandlingService exceptionHandlingService)
        {
            ContextManagerEntry entry = _contexts.Get(contextName);

            if (entry == null)
            {
                Log.Warn("Stop statement for statement '" + statementName + "' failed to locate corresponding context manager '" + contextName + "'");
                return;
            }
            try {
                entry.ContextManager.StopStatement(statementName, statementId);
            }
            catch (Exception ex)
            {
                exceptionHandlingService.HandleException(ex, statementName, epl, ExceptionHandlerExceptionType.STOP);
            }
        }