├── .editorconfig
├── .gitattributes
├── .github
├── ISSUE_TEMPLATE
│ ├── 00-use-case.md
│ ├── 01-compatible-certification-request.md
│ ├── 10-clarification.md
│ ├── 20-bug-report.md
│ └── 30-spec-change-proposal.md
└── workflows
│ └── build.yml
├── .gitignore
├── CONTRIBUTING.adoc
├── LICENSE
├── NOTICE
├── README.adoc
├── api
├── .gitignore
├── bnd.bnd
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── org
│ │ └── eclipse
│ │ └── microprofile
│ │ └── faulttolerance
│ │ ├── Asynchronous.java
│ │ ├── Bulkhead.java
│ │ ├── CircuitBreaker.java
│ │ ├── ExecutionContext.java
│ │ ├── Fallback.java
│ │ ├── FallbackHandler.java
│ │ ├── Retry.java
│ │ ├── Timeout.java
│ │ ├── exceptions
│ │ ├── BulkheadException.java
│ │ ├── CircuitBreakerOpenException.java
│ │ ├── FaultToleranceDefinitionException.java
│ │ ├── FaultToleranceException.java
│ │ ├── TimeoutException.java
│ │ └── package-info.java
│ │ └── package-info.java
│ └── resources
│ └── META-INF
│ ├── LICENSE
│ └── NOTICE
├── pom.xml
├── site.yaml
├── spec
├── Gemfile
├── Guardfile
├── NOTICE
├── README.adoc
├── guard.sh
├── pom.xml
├── preview.bat
├── preview.sh
└── src
│ └── main
│ ├── asciidoc
│ ├── architecture.asciidoc
│ ├── asynchronous.asciidoc
│ ├── bulkhead.asciidoc
│ ├── circuitbreaker.asciidoc
│ ├── configuration.asciidoc
│ ├── execution.asciidoc
│ ├── fallback.asciidoc
│ ├── fault-tolerance-interceptor.asciidoc
│ ├── license-alv2.asciidoc
│ ├── license-efsl.adoc
│ ├── metrics.asciidoc
│ ├── microprofile-fault-tolerance-spec.asciidoc
│ ├── optional-container-integration.asciidoc
│ ├── relationship.asciidoc
│ ├── release_notes.asciidoc
│ ├── retry.asciidoc
│ └── timeout.asciidoc
│ └── resources
│ └── META-INF
│ ├── LICENSE
│ └── NOTICE
└── tck
├── .gitignore
├── NOTICE
├── README.adoc
├── formatter.xml
├── pom.xml
└── src
├── main
├── java
│ └── org
│ │ └── eclipse
│ │ └── microprofile
│ │ └── fault
│ │ └── tolerance
│ │ └── tck
│ │ ├── AsyncCancellationTest.java
│ │ ├── AsyncFallbackTest.java
│ │ ├── AsyncTimeoutTest.java
│ │ ├── AsynchronousCSTest.java
│ │ ├── AsynchronousTest.java
│ │ ├── CircuitBreakerBulkheadTest.java
│ │ ├── CircuitBreakerExceptionHierarchyTest.java
│ │ ├── CircuitBreakerInitialSuccessTest.java
│ │ ├── CircuitBreakerLateSuccessTest.java
│ │ ├── CircuitBreakerRetryTest.java
│ │ ├── CircuitBreakerTest.java
│ │ ├── CircuitBreakerTimeoutTest.java
│ │ ├── ConfigTest.java
│ │ ├── FallbackExceptionHierarchyTest.java
│ │ ├── FallbackTest.java
│ │ ├── Misc.java
│ │ ├── RetryConditionTest.java
│ │ ├── RetryExceptionHierarchyTest.java
│ │ ├── RetryTest.java
│ │ ├── RetryTimeoutTest.java
│ │ ├── TimeoutGlobalConfigTest.java
│ │ ├── TimeoutMethodConfigTest.java
│ │ ├── TimeoutTest.java
│ │ ├── TimeoutUninterruptableTest.java
│ │ ├── ZeroRetryJitterTest.java
│ │ ├── asynchronous
│ │ ├── AsyncApplicationScopeClient.java
│ │ ├── AsyncCancellationClient.java
│ │ ├── AsyncClassLevelClient.java
│ │ ├── AsyncClient.java
│ │ ├── AsyncRequestScopeClient.java
│ │ ├── CompletableFutureHelper.java
│ │ └── fallback
│ │ │ └── AsyncFallbackClient.java
│ │ ├── asyncretry
│ │ └── clientserver
│ │ │ └── AsyncRetryClient.java
│ │ ├── asynctimeout
│ │ └── clientserver
│ │ │ ├── AsyncClassLevelTimeoutClient.java
│ │ │ └── AsyncTimeoutClient.java
│ │ ├── bulkhead
│ │ ├── BulkheadAsynchRetryTest.java
│ │ ├── BulkheadAsynchTest.java
│ │ ├── BulkheadFutureTest.java
│ │ ├── BulkheadPressureTest.java
│ │ ├── BulkheadSynchConfigTest.java
│ │ ├── BulkheadSynchRetryTest.java
│ │ ├── BulkheadSynchTest.java
│ │ ├── clientserver
│ │ │ ├── Bulkhead10ClassAsynchronousBean.java
│ │ │ ├── Bulkhead10ClassSemaphoreBean.java
│ │ │ ├── Bulkhead10MethodAsynchronousBean.java
│ │ │ ├── Bulkhead10MethodSemaphoreBean.java
│ │ │ ├── Bulkhead1Retry0MethodSyncBean.java
│ │ │ ├── Bulkhead1Retry1SyncClassBean.java
│ │ │ ├── Bulkhead1Retry1SyncMethodBean.java
│ │ │ ├── Bulkhead1RetryManySyncClassBean.java
│ │ │ ├── Bulkhead1RetryManySyncMethodBean.java
│ │ │ ├── Bulkhead33RetryManyAsyncClassBean.java
│ │ │ ├── Bulkhead33RetryManyAsyncMethodBean.java
│ │ │ ├── Bulkhead3ClassAsynchronousBean.java
│ │ │ ├── Bulkhead3ClassSemaphoreBean.java
│ │ │ ├── Bulkhead3MethodAsynchronousBean.java
│ │ │ ├── Bulkhead3MethodSemaphoreBean.java
│ │ │ ├── Bulkhead3TaskQueueSemaphoreBean.java
│ │ │ ├── Bulkhead55RapidRetry10ClassAsynchBean.java
│ │ │ ├── Bulkhead55RapidRetry10MethodAsynchBean.java
│ │ │ ├── BulkheadClassAsynchronousDefaultBean.java
│ │ │ ├── BulkheadClassAsynchronousQueueingBean.java
│ │ │ ├── BulkheadClassSemaphoreDefaultBean.java
│ │ │ ├── BulkheadCompletionStageBean.java
│ │ │ ├── BulkheadFutureClassBean.java
│ │ │ ├── BulkheadFutureMethodBean.java
│ │ │ ├── BulkheadMethodAsynchronousDefaultBean.java
│ │ │ ├── BulkheadMethodAsynchronousQueueingBean.java
│ │ │ ├── BulkheadMethodSemaphoreDefaultBean.java
│ │ │ ├── BulkheadPressureBean.java
│ │ │ ├── BulkheadRetryAbortOnAsyncBean.java
│ │ │ ├── BulkheadRetryAbortOnSyncBean.java
│ │ │ ├── BulkheadRetryDelayAsyncBean.java
│ │ │ └── BulkheadRetryQueueAsyncBean.java
│ │ └── lifecycle
│ │ │ ├── BulkheadLifecycleService1.java
│ │ │ ├── BulkheadLifecycleService2.java
│ │ │ ├── BulkheadLifecycleServiceSubclass1.java
│ │ │ ├── BulkheadLifecycleServiceSubclass2.java
│ │ │ ├── BulkheadLifecycleServiceSuperclass.java
│ │ │ ├── BulkheadLifecycleTest.java
│ │ │ └── MutlipleMethodsBulkheadLifecycleService.java
│ │ ├── circuitbreaker
│ │ ├── CircuitBreakerConfigGlobalTest.java
│ │ ├── CircuitBreakerConfigOnMethodTest.java
│ │ ├── clientserver
│ │ │ ├── CircuitBreakerClassLevelClientWithDelay.java
│ │ │ ├── CircuitBreakerClassLevelClientWithRetry.java
│ │ │ ├── CircuitBreakerClientDefaultSuccessThreshold.java
│ │ │ ├── CircuitBreakerClientHigherSuccessThreshold.java
│ │ │ ├── CircuitBreakerClientNoDelay.java
│ │ │ ├── CircuitBreakerClientRollingWindow.java
│ │ │ ├── CircuitBreakerClientWithAsyncBulkhead.java
│ │ │ ├── CircuitBreakerClientWithAsyncBulkheadNoFail.java
│ │ │ ├── CircuitBreakerClientWithDelay.java
│ │ │ ├── CircuitBreakerClientWithRetry.java
│ │ │ ├── CircuitBreakerClientWithRetryAsync.java
│ │ │ ├── CircuitBreakerClientWithSyncBulkhead.java
│ │ │ └── CircuitBreakerClientWithTimeout.java
│ │ ├── exception
│ │ │ └── hierarchy
│ │ │ │ └── CircuitBreakerService.java
│ │ └── lifecycle
│ │ │ ├── BaseCircuitBreakerOnClass.java
│ │ │ ├── BaseCircuitBreakerOnClassAndMethod.java
│ │ │ ├── BaseCircuitBreakerOnMethod.java
│ │ │ ├── CircuitBreakerLifecycleService.java
│ │ │ ├── CircuitBreakerLifecycleService1.java
│ │ │ ├── CircuitBreakerLifecycleService2.java
│ │ │ ├── CircuitBreakerLifecycleTest.java
│ │ │ ├── DerivedCircuitBreakerOnClassAndMethodNoAnnotationOnOverriddenMethod.java
│ │ │ ├── DerivedCircuitBreakerOnClassAndMethodNoRedefinition.java
│ │ │ ├── DerivedCircuitBreakerOnClassAndMethodOverrideOnClass.java
│ │ │ ├── DerivedCircuitBreakerOnClassAndMethodOverrideOnClassWithOverriddenMethod.java
│ │ │ ├── DerivedCircuitBreakerOnClassAndMethodOverrideOnMethod.java
│ │ │ ├── DerivedCircuitBreakerOnClassNoAnnotationOnOverriddenMethod.java
│ │ │ ├── DerivedCircuitBreakerOnClassNoRedefinition.java
│ │ │ ├── DerivedCircuitBreakerOnClassOverrideOnClass.java
│ │ │ ├── DerivedCircuitBreakerOnClassOverrideOnClassWithOverriddenMethod.java
│ │ │ ├── DerivedCircuitBreakerOnClassOverrideOnMethod.java
│ │ │ ├── DerivedCircuitBreakerOnMethodNoAnnotationOnOverriddenMethod.java
│ │ │ ├── DerivedCircuitBreakerOnMethodNoRedefinition.java
│ │ │ ├── DerivedCircuitBreakerOnMethodOverrideOnClass.java
│ │ │ ├── DerivedCircuitBreakerOnMethodOverrideOnClassWithOverriddenMethod.java
│ │ │ ├── DerivedCircuitBreakerOnMethodOverrideOnMethod.java
│ │ │ └── MutlipleMethodsCircuitBreakerLifecycleService.java
│ │ ├── config
│ │ ├── BeanWithRetry.java
│ │ ├── BulkheadConfigBean.java
│ │ ├── BulkheadConfigTest.java
│ │ ├── CircuitBreakerConfigBean.java
│ │ ├── CircuitBreakerConfigTest.java
│ │ ├── CircuitBreakerSkipOnConfigTest.java
│ │ ├── ConfigAnnotationAsset.java
│ │ ├── ConfigPropertyGlobalVsClassTest.java
│ │ ├── ConfigPropertyGlobalVsClassVsMethodTest.java
│ │ ├── ConfigPropertyOnClassAndMethodTest.java
│ │ ├── FallbackApplyOnConfigTest.java
│ │ ├── FallbackConfigBean.java
│ │ ├── FallbackConfigTest.java
│ │ ├── FallbackHandlerA.java
│ │ ├── FallbackHandlerB.java
│ │ ├── FallbackSkipOnConfigTest.java
│ │ ├── RetryConfigBean.java
│ │ ├── RetryConfigTest.java
│ │ ├── TestConfigExceptionA.java
│ │ ├── TestConfigExceptionB.java
│ │ ├── TestConfigExceptionB1.java
│ │ ├── TimeoutConfigBean.java
│ │ ├── TimeoutConfigTest.java
│ │ └── clientserver
│ │ │ ├── ConfigClassLevelClient.java
│ │ │ ├── ConfigClassLevelMaxDurationClient.java
│ │ │ └── ConfigClient.java
│ │ ├── disableEnv
│ │ ├── DisableAnnotationClient.java
│ │ ├── DisableAnnotationGloballyEnableOnClassDisableOnMethod.java
│ │ ├── DisableAnnotationGloballyEnableOnClassTest.java
│ │ ├── DisableAnnotationGloballyEnableOnMethodTest.java
│ │ ├── DisableAnnotationGloballyTest.java
│ │ ├── DisableAnnotationOnClassEnableOnMethodTest.java
│ │ ├── DisableAnnotationOnClassTest.java
│ │ ├── DisableAnnotationOnMethodsTest.java
│ │ ├── DisableClient.java
│ │ ├── DisableConfigAsset.java
│ │ ├── DisableFTEnableGloballyTest.java
│ │ ├── DisableFTEnableOnClassTest.java
│ │ ├── DisableFTEnableOnMethodTest.java
│ │ └── DisableTest.java
│ │ ├── exception
│ │ └── hierarchy
│ │ │ ├── E0.java
│ │ │ ├── E0S.java
│ │ │ ├── E1.java
│ │ │ ├── E1S.java
│ │ │ ├── E2.java
│ │ │ ├── E2S.java
│ │ │ └── package-info.java
│ │ ├── extension
│ │ ├── AwaitilityArchiveAppender.java
│ │ ├── HamcrestArchiveAppender.java
│ │ ├── TCKConfigArchiveAppender.java
│ │ └── TckLoadableExtension.java
│ │ ├── fallback
│ │ ├── clientserver
│ │ │ ├── FallbackClassLevelClient.java
│ │ │ ├── FallbackClient.java
│ │ │ ├── FallbackOnlyClient.java
│ │ │ ├── FallbackWithBeanClient.java
│ │ │ ├── MyBean.java
│ │ │ ├── SecondStringFallbackHandler.java
│ │ │ ├── StringFallbackHandler.java
│ │ │ └── StringFallbackHandlerWithBean.java
│ │ └── exception
│ │ │ └── hierarchy
│ │ │ └── FallbackService.java
│ │ ├── fallbackmethod
│ │ ├── FallbackMethodAbstractTest.java
│ │ ├── FallbackMethodBasicTest.java
│ │ ├── FallbackMethodDefaultMethodTest.java
│ │ ├── FallbackMethodGenericAbstractTest.java
│ │ ├── FallbackMethodGenericArrayTest.java
│ │ ├── FallbackMethodGenericComplexTest.java
│ │ ├── FallbackMethodGenericDeepTest.java
│ │ ├── FallbackMethodGenericTest.java
│ │ ├── FallbackMethodGenericWildcardTest.java
│ │ ├── FallbackMethodInPackageTest.java
│ │ ├── FallbackMethodInterfaceTest.java
│ │ ├── FallbackMethodOutOfPackageTest.java
│ │ ├── FallbackMethodPrivateTest.java
│ │ ├── FallbackMethodSubclassOverrideTest.java
│ │ ├── FallbackMethodSubclassTest.java
│ │ ├── FallbackMethodSuperclassPrivateTest.java
│ │ ├── FallbackMethodSuperclassTest.java
│ │ ├── FallbackMethodVarargsTest.java
│ │ ├── FallbackMethodWildcardNegativeTest.java
│ │ ├── FallbackMethodWildcardTest.java
│ │ ├── beans
│ │ │ ├── FallbackMethodAbstractBeanA.java
│ │ │ ├── FallbackMethodAbstractBeanB.java
│ │ │ ├── FallbackMethodBasicBean.java
│ │ │ ├── FallbackMethodDefaultMethodA.java
│ │ │ ├── FallbackMethodDefaultMethodB.java
│ │ │ ├── FallbackMethodGenericAbstractBeanA.java
│ │ │ ├── FallbackMethodGenericAbstractBeanB.java
│ │ │ ├── FallbackMethodGenericArrayBeanA.java
│ │ │ ├── FallbackMethodGenericArrayBeanB.java
│ │ │ ├── FallbackMethodGenericBeanA.java
│ │ │ ├── FallbackMethodGenericBeanB.java
│ │ │ ├── FallbackMethodGenericComplexBeanA.java
│ │ │ ├── FallbackMethodGenericComplexBeanB.java
│ │ │ ├── FallbackMethodGenericDeepBeanA.java
│ │ │ ├── FallbackMethodGenericDeepBeanB.java
│ │ │ ├── FallbackMethodGenericDeepBeanC.java
│ │ │ ├── FallbackMethodGenericWildcardBeanA.java
│ │ │ ├── FallbackMethodGenericWildcardBeanB.java
│ │ │ ├── FallbackMethodInPackageBeanA.java
│ │ │ ├── FallbackMethodInPackageBeanB.java
│ │ │ ├── FallbackMethodInterfaceBeanA.java
│ │ │ ├── FallbackMethodInterfaceBeanB.java
│ │ │ ├── FallbackMethodInterfaceBeanC.java
│ │ │ ├── FallbackMethodOutOfPackageBeanA.java
│ │ │ ├── FallbackMethodPrivateBean.java
│ │ │ ├── FallbackMethodSubclassBeanA.java
│ │ │ ├── FallbackMethodSubclassBeanB.java
│ │ │ ├── FallbackMethodSubclassOverrideBeanA.java
│ │ │ ├── FallbackMethodSubclassOverrideBeanB.java
│ │ │ ├── FallbackMethodSuperclassBeanA.java
│ │ │ ├── FallbackMethodSuperclassBeanB.java
│ │ │ ├── FallbackMethodSuperclassPrivateBeanA.java
│ │ │ ├── FallbackMethodSuperclassPrivateBeanB.java
│ │ │ ├── FallbackMethodVarargsBean.java
│ │ │ ├── FallbackMethodWildcardBean.java
│ │ │ ├── FallbackMethodWildcardNegativeBean.java
│ │ │ └── subpackage
│ │ │ │ └── FallbackMethodOutOfPackageBeanB.java
│ │ └── package-info.java
│ │ ├── illegalConfig
│ │ ├── FallbackClient.java
│ │ ├── FallbackClientWithBothFallbacks.java
│ │ ├── FallbackMethodClient.java
│ │ ├── FallbackMethodWithArgsClient.java
│ │ ├── IncompatibleFallbackHandler.java
│ │ ├── IncompatibleFallbackMethodTest.java
│ │ ├── IncompatibleFallbackMethodWithArgsTest.java
│ │ ├── IncompatibleFallbackPolicies.java
│ │ └── IncompatibleFallbackTest.java
│ │ ├── interceptor
│ │ ├── EarlyFtInterceptor.java
│ │ ├── FaultToleranceInterceptorTest.java
│ │ ├── InterceptorComponent.java
│ │ ├── LateFtInterceptor.java
│ │ ├── OrderQueueProducer.java
│ │ └── ftPriorityChange
│ │ │ ├── EarlyFtInterceptor.java
│ │ │ ├── FaultToleranceInterceptorPriorityChangeAnnotationConfTest.java
│ │ │ ├── InterceptorComponent.java
│ │ │ └── LateFtInterceptor.java
│ │ ├── invalidParameters
│ │ ├── AsynchronousClientForValidationClass.java
│ │ ├── AsynchronousClientForValidationMethod.java
│ │ ├── BulkheadClientForValidation.java
│ │ ├── BulkheadClientForValidationAsynchQueue.java
│ │ ├── CircuitBreakerClientForValidationDelay.java
│ │ ├── CircuitBreakerClientForValidationFailureRatioNeg.java
│ │ ├── CircuitBreakerClientForValidationFailureRatioPos.java
│ │ ├── CircuitBreakerClientForValidationReqVol0.java
│ │ ├── CircuitBreakerClientForValidationReqVolNeg.java
│ │ ├── CircuitBreakerClientForValidationSuccess0.java
│ │ ├── CircuitBreakerClientForValidationSuccessNeg.java
│ │ ├── InvalidAsynchronousClassTest.java
│ │ ├── InvalidAsynchronousMethodTest.java
│ │ ├── InvalidBulkheadAsynchQueueTest.java
│ │ ├── InvalidBulkheadValueTest.java
│ │ ├── InvalidCircuitBreakerDelayTest.java
│ │ ├── InvalidCircuitBreakerFailureRatioNegTest.java
│ │ ├── InvalidCircuitBreakerFailureRatioPosTest.java
│ │ ├── InvalidCircuitBreakerFailureReqVol0Test.java
│ │ ├── InvalidCircuitBreakerFailureReqVolNegTest.java
│ │ ├── InvalidCircuitBreakerFailureSuccess0Test.java
│ │ ├── InvalidCircuitBreakerFailureSuccessNegTest.java
│ │ ├── InvalidRetryDelayDurationTest.java
│ │ ├── InvalidRetryDelayTest.java
│ │ ├── InvalidRetryJitterTest.java
│ │ ├── InvalidRetryMaxRetriesTest.java
│ │ ├── InvalidTimeoutValueTest.java
│ │ ├── RetryClientForValidationDelay.java
│ │ ├── RetryClientForValidationDelayDuration.java
│ │ ├── RetryClientForValidationJitter.java
│ │ ├── RetryClientForValidationMaxRetries.java
│ │ └── TimeoutClientForValidation.java
│ │ ├── metrics
│ │ ├── AllMetricsTest.java
│ │ ├── BulkheadMetricTest.java
│ │ ├── CircuitBreakerMetricTest.java
│ │ ├── ClashingNameTest.java
│ │ ├── ClassLevelMetricTest.java
│ │ ├── FallbackMetricTest.java
│ │ ├── MetricsDisabledTest.java
│ │ ├── RetryMetricTest.java
│ │ ├── TimeoutMetricTest.java
│ │ ├── common
│ │ │ ├── AllMetricsBean.java
│ │ │ ├── BulkheadMetricBean.java
│ │ │ ├── CircuitBreakerMetricBean.java
│ │ │ ├── ClashingNameBean.java
│ │ │ ├── ClassLevelMetricBean.java
│ │ │ ├── FallbackMetricBean.java
│ │ │ ├── FallbackMetricHandler.java
│ │ │ ├── RetryMetricBean.java
│ │ │ ├── TimeoutMetricBean.java
│ │ │ └── util
│ │ │ │ └── TimeUtils.java
│ │ └── util
│ │ │ ├── CounterMetric.java
│ │ │ ├── GaugeMetric.java
│ │ │ ├── MetricDefinition.java
│ │ │ ├── MetricGetter.java
│ │ │ ├── MetricRegistryProvider.java
│ │ │ ├── MetricRegistryProxy.java
│ │ │ ├── MetricRegistryProxyHandler.java
│ │ │ └── RegistryTypeLiteral.java
│ │ ├── retry
│ │ ├── clientserver
│ │ │ ├── RetryClassLevelClientAbortOn.java
│ │ │ ├── RetryClassLevelClientForMaxRetries.java
│ │ │ ├── RetryClassLevelClientRetryOn.java
│ │ │ ├── RetryClientAbortOn.java
│ │ │ ├── RetryClientForMaxRetries.java
│ │ │ ├── RetryClientForZeroJitter.java
│ │ │ ├── RetryClientRetryOn.java
│ │ │ ├── RetryClientWithDelay.java
│ │ │ ├── RetryClientWithNoDelayAndJitter.java
│ │ │ └── exceptions
│ │ │ │ ├── RetryChildException.java
│ │ │ │ └── RetryParentException.java
│ │ └── exception
│ │ │ └── hierarchy
│ │ │ ├── RetryService.java
│ │ │ └── RetryStatus.java
│ │ ├── retrytimeout
│ │ └── clientserver
│ │ │ └── RetryTimeoutClient.java
│ │ ├── telemetryMetrics
│ │ ├── AllAnnotationTelemetryTest.java
│ │ ├── BulkheadTelemetryTest.java
│ │ ├── CircuitBreakerTelemetryTest.java
│ │ ├── ClashingNameTelemetryTest.java
│ │ ├── ClassLevelTelemetryTest.java
│ │ ├── FallbackTelemetryTest.java
│ │ ├── FaultToleranceDisabledTelemetryTest.java
│ │ ├── RetryTelemetryTest.java
│ │ ├── TimeoutTelemetryTest.java
│ │ └── util
│ │ │ ├── InMemoryMetricReader.java
│ │ │ ├── PullExporterAutoConfigurationCustomizerProvider.java
│ │ │ ├── TelemetryHistogramMetric.java
│ │ │ ├── TelemetryLongMetric.java
│ │ │ ├── TelemetryMetricDefinition.java
│ │ │ ├── TelemetryMetricGetter.java
│ │ │ └── TelemetryMetricID.java
│ │ ├── timeout
│ │ └── clientserver
│ │ │ ├── DefaultTimeoutClient.java
│ │ │ ├── ShorterTimeoutClient.java
│ │ │ ├── TimeoutClient.java
│ │ │ └── UninterruptableTimeoutClient.java
│ │ ├── util
│ │ ├── AsyncCaller.java
│ │ ├── AsyncCallerExecutor.java
│ │ ├── AsyncTaskManager.java
│ │ ├── Barrier.java
│ │ ├── ConcurrentExecutionTracker.java
│ │ ├── Connection.java
│ │ ├── DurationMatcher.java
│ │ ├── Exceptions.java
│ │ ├── Packages.java
│ │ ├── TCKConfig.java
│ │ └── TestException.java
│ │ └── visibility
│ │ └── retry
│ │ ├── BaseRetryOnClassAndMethodService.java
│ │ ├── BaseRetryOnClassService.java
│ │ ├── BaseRetryOnMethodService.java
│ │ ├── RS.java
│ │ ├── RetryOnClassAndMethodServiceNoAnnotationMethodOverride.java
│ │ ├── RetryOnClassAndMethodServiceNoRedefinition.java
│ │ ├── RetryOnClassAndMethodServiceOverrideClassLevel.java
│ │ ├── RetryOnClassAndMethodServiceOverrideClassLevelMethodOverride.java
│ │ ├── RetryOnClassAndMethodServiceOverrideMethodLevel.java
│ │ ├── RetryOnClassServiceNoAnnotationOnOveriddenMethod.java
│ │ ├── RetryOnClassServiceNoRedefinition.java
│ │ ├── RetryOnClassServiceOverrideClassLevel.java
│ │ ├── RetryOnClassServiceOverrideClassLevelMethodOverride.java
│ │ ├── RetryOnClassServiceOverrideMethodLevel.java
│ │ ├── RetryOnMethodServiceNoAnnotationOnOverridedMethod.java
│ │ ├── RetryOnMethodServiceNoRedefinition.java
│ │ ├── RetryOnMethodServiceOverridedClassLevelMethodOverride.java
│ │ ├── RetryOnMethodServiceOverridedClassLevelNoMethodOverride.java
│ │ ├── RetryOnMethodServiceOverridedMethodLevel.java
│ │ ├── RetryService.java
│ │ ├── RetryServiceType.java
│ │ └── RetryVisibilityTest.java
└── resources
│ └── META-INF
│ ├── LICENSE
│ ├── NOTICE
│ ├── services
│ └── org.jboss.arquillian.core.spi.LoadableExtension
│ └── tck
└── test
└── java
└── org
└── eclipse
└── microprofile
└── fault
└── tolerance
└── tck
├── metrics
└── util
│ └── MetricGetterTest.java
├── telemetryMetrics
└── util
│ ├── InMemoryMetricReaderTest.java
│ ├── MetricGetterTest.java
│ └── TelemetryHistogramMetricTest.java
└── visibility
└── retry
└── PureJ2SERetryVisibilityTest.java
/.editorconfig:
--------------------------------------------------------------------------------
1 | # EditorConfig helps developers define and maintain consistent
2 | # coding styles between different editors and IDEs
3 | # http://editorconfig.org
4 |
5 | root = true
6 |
7 | [*]
8 | indent_style = space
9 | indent_size = 4
10 | end_of_line = lf
11 | charset = utf-8
12 | trim_trailing_whitespace = true
13 | insert_final_newline = true
14 |
15 | [*.md]
16 | trim_trailing_whitespace = false
17 |
18 | [*.adoc]
19 | trim_trailing_whitespace = false
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/00-use-case.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Use case
3 | about: Describe a new use case for the specification.
4 | title: ''
5 | labels: 'use case :bulb:'
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Description**
11 |
12 | As a:
13 |
14 | - [ ] API User (application developer)
15 | - [ ] Specification Implementer
16 |
17 | ...I need to be able to:
18 |
19 |
20 |
21 | ...which enables me to:
22 |
23 |
24 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/01-compatible-certification-request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Compatible Certification Request
3 | about: Start a request for a compatible certification
4 | title: 'MicroProfile Fault Tolerance [Version] Compatible Certification Request'
5 | labels: 'Certification :trophy:'
6 | assignees: ''
7 |
8 | ---
9 |
10 | - [ ] Organization Name ("Organization") and, if applicable, URL:
11 | // Add here
12 | - [ ] Product Name, Version and download URL (if applicable):
13 | // Add here
14 | - [ ] Specification Name, Version and download URL:
15 | // Add here
16 | - [ ] (Optional) TCK Version, digital SHA-256 fingerprint and download URL:
17 | // Add here
18 | - [ ] Public URL of TCK Results Summary:
19 | // Add here
20 | - [ ] Any Additional Specification Certification Requirements:
21 | // Add here
22 | - [ ] Java runtime used to run the implementation:
23 | // Add here
24 | - [ ] Summary of the information for the certification environment, operating system, cloud, ...:
25 | // Add here
26 | - [ ] By checking this box I acknowledge that the Organization I represent accepts the terms of the [EFTL](https://www.eclipse.org/legal/tck.php).
27 | - [ ] By checking this box I attest that all TCK requirements have been met, including any compatibility rules.
28 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/10-clarification.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Clarification request
3 | about: Request that some aspect of the specification be clarified.
4 | title: ''
5 | labels: 'clarification :mag_right:'
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Description**
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/20-bug-report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Report a mistake or inconsistency in the specification code or documentation text or TCK.
4 | title: ''
5 | labels: 'bug :beetle:'
6 | assignees: ''
7 |
8 | ---
9 |
10 |
11 |
12 | **Describe the bug**
13 |
14 | (Describe the problem as concisely as possible.)
15 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/30-spec-change-proposal.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Specification Change Proposal
3 | about: Request or propose a specification change that solves one or more use cases.
4 | title: ''
5 | labels: 'spec. change :gear:'
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Description**
11 |
12 |
13 |
14 |
15 | **Use cases**
16 |
17 |
18 |
19 | * Fixes #xxxx
20 |
21 |
22 |
23 | [ ] Backward incompatible change
24 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.class
2 | .settings/
3 | .checkstyle
4 | target/
5 | tck/bin/
6 | .project
7 | build/
8 | .classpath
9 | .factorypath
10 | test-output
11 | /*.log
12 | .idea
13 | *.iml
14 | *.iwl
15 | *.ipr
16 | .DS_Store
17 | .vscode/
18 |
--------------------------------------------------------------------------------
/NOTICE:
--------------------------------------------------------------------------------
1 | =========================================================================
2 | == NOTICE file corresponding to section 4(d) of the Apache License, ==
3 | == Version 2.0, in this case for Microprofile Fault Tolerance ==
4 | =========================================================================
5 |
6 | SPDXVersion: SPDX-2.1
7 | PackageName: Eclipse Microprofile
8 | PackageHomePage: http://www.eclipse.org/microprofile
9 | PackageLicenseDeclared: Apache-2.0
10 |
11 | PackageCopyrightText:
12 | Emily Jiang, emijiang@uk.ibm.com
13 | Neil Young, neil_young@uk.ibm.com
14 | Gordon Hutchison, Gordon.Hutchison@gmail.com
15 | John Ament, john.d.ament@gmail.com
16 | Antoine Sabot-Durand, antoine@sabot-durand.net
17 | Tom Evans, tevans@uk.ibm.com
18 | Martin Kouba, mkouba@redhat.com
19 | Gaurav Gupta gaurav.gupta.jc@gmail.com
20 | Ondrej Mihalyi ondrej.mihalyi@gmail.com
21 |
22 |
--------------------------------------------------------------------------------
/api/.gitignore:
--------------------------------------------------------------------------------
1 | /.apt_generated/
2 |
--------------------------------------------------------------------------------
/api/bnd.bnd:
--------------------------------------------------------------------------------
1 | -exportcontents: \
2 | org.eclipse.microprofile.*
3 | Import-Package: \
4 | jakarta.enterprise.util;version="[3.0,5)", \
5 | *
6 | Bundle-SymbolicName: org.eclipse.microprofile.fault.tolerance
7 | # For reproducible builds
8 | -noextraheaders: true
9 | -snapshot: SNAPSHOT
--------------------------------------------------------------------------------
/api/src/main/java/org/eclipse/microprofile/faulttolerance/ExecutionContext.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2017 Contributors to the Eclipse Foundation
3 | *
4 | * See the NOTICE file(s) distributed with this work for additional
5 | * information regarding copyright ownership.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * You may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | */
19 | package org.eclipse.microprofile.faulttolerance;
20 |
21 | import java.lang.reflect.Method;
22 |
23 | /**
24 | * The execution context for the method being executed.
25 | *
26 | * @author Emily Jiang
27 | */
28 | @org.osgi.annotation.versioning.ProviderType
29 | public interface ExecutionContext {
30 |
31 | /**
32 | * Returns the method being executed.
33 | *
34 | * @return the method
35 | */
36 | public Method getMethod();
37 |
38 | /**
39 | * Returns the parameter values being passed to the method.
40 | *
41 | * @return the parameter values, as an array
42 | */
43 | public Object[] getParameters();
44 |
45 | /**
46 | * Returns the failure of the method execution.
47 | *
48 | * @return the failure of the method execution
49 | */
50 | public Throwable getFailure();
51 |
52 | }
53 |
--------------------------------------------------------------------------------
/api/src/main/java/org/eclipse/microprofile/faulttolerance/exceptions/BulkheadException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2017 Contributors to the Eclipse Foundation
3 | *
4 | * See the NOTICE file(s) distributed with this work for additional
5 | * information regarding copyright ownership.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * You may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | */
19 | package org.eclipse.microprofile.faulttolerance.exceptions;
20 |
21 | /**
22 | * The exception should be thrown when Bulkhead implementation throws an exception, e.g. Waiting Queue is full or no
23 | * Semaphore permits are available. Emily Jiang
24 | *
25 | */
26 | public class BulkheadException extends FaultToleranceException {
27 |
28 | private static final long serialVersionUID = 3569768756115160625L;
29 |
30 | public BulkheadException() {
31 | super();
32 | }
33 |
34 | public BulkheadException(Throwable t) {
35 | super(t);
36 | }
37 |
38 | public BulkheadException(String message) {
39 | super(message);
40 | }
41 |
42 | public BulkheadException(String message, Throwable t) {
43 | super(message, t);
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/api/src/main/java/org/eclipse/microprofile/faulttolerance/exceptions/CircuitBreakerOpenException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2017 Contributors to the Eclipse Foundation
3 | *
4 | * See the NOTICE file(s) distributed with this work for additional
5 | * information regarding copyright ownership.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * You may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | */
19 | package org.eclipse.microprofile.faulttolerance.exceptions;
20 |
21 | /**
22 | * The exception should be thrown when circuit breaker is open. Emily Jiang
23 | *
24 | */
25 | public class CircuitBreakerOpenException extends FaultToleranceException {
26 |
27 | private static final long serialVersionUID = 958116453839967874L;
28 |
29 | public CircuitBreakerOpenException() {
30 | super();
31 | }
32 |
33 | public CircuitBreakerOpenException(Throwable t) {
34 | super(t);
35 | }
36 |
37 | public CircuitBreakerOpenException(String message) {
38 | super(message);
39 | }
40 |
41 | public CircuitBreakerOpenException(String message, Throwable t) {
42 | super(message, t);
43 | }
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/api/src/main/java/org/eclipse/microprofile/faulttolerance/exceptions/FaultToleranceException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2017 Contributors to the Eclipse Foundation
3 | *
4 | * See the NOTICE file(s) distributed with this work for additional
5 | * information regarding copyright ownership.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * You may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | */
19 | package org.eclipse.microprofile.faulttolerance.exceptions;
20 |
21 | /**
22 | * The exception should be thrown when the maximum retries is reached or overall retry duration is reached, circuit
23 | * breaker is open, timeout occurred. Emily Jiang
24 | *
25 | */
26 | public class FaultToleranceException extends RuntimeException {
27 |
28 | private static final long serialVersionUID = 958116453839967874L;
29 |
30 | public FaultToleranceException() {
31 | super();
32 | }
33 |
34 | public FaultToleranceException(Throwable t) {
35 | super(t);
36 | }
37 |
38 | public FaultToleranceException(String message) {
39 | super(message);
40 | }
41 |
42 | public FaultToleranceException(String message, Throwable t) {
43 | super(message, t);
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/api/src/main/java/org/eclipse/microprofile/faulttolerance/exceptions/TimeoutException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2017 Contributors to the Eclipse Foundation
3 | *
4 | * See the NOTICE file(s) distributed with this work for additional
5 | * information regarding copyright ownership.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * You may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | */
19 | package org.eclipse.microprofile.faulttolerance.exceptions;
20 |
21 | /**
22 | * The exception should be thrown when timeout is reached. Emily Jiang
23 | *
24 | */
25 | public class TimeoutException extends FaultToleranceException {
26 |
27 | private static final long serialVersionUID = 958116453839967874L;
28 |
29 | public TimeoutException() {
30 | super();
31 | }
32 |
33 | public TimeoutException(Throwable t) {
34 | super(t);
35 | }
36 |
37 | public TimeoutException(String message) {
38 | super(message);
39 | }
40 |
41 | public TimeoutException(String message, Throwable t) {
42 | super(message, t);
43 | }
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/api/src/main/java/org/eclipse/microprofile/faulttolerance/exceptions/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2016-2017 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | /**
22 | *
23 | * Exceptions for Microprofile Fault Tolerance
24 | *
25 | */
26 | @org.osgi.annotation.versioning.Version("1.0")
27 | package org.eclipse.microprofile.faulttolerance.exceptions;
28 |
--------------------------------------------------------------------------------
/api/src/main/java/org/eclipse/microprofile/faulttolerance/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2016-2019 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | /**
22 | *
23 | * CDI Support for Microprofile Fault Tolerance
24 | *
25 | *
26 | *
27 | * @author Emily Jiang
28 | */
29 | @org.osgi.annotation.versioning.Version("2.0")
30 | package org.eclipse.microprofile.faulttolerance;
31 |
--------------------------------------------------------------------------------
/api/src/main/resources/META-INF/NOTICE:
--------------------------------------------------------------------------------
1 | =========================================================================
2 | == NOTICE file corresponding to section 4(d) of the Apache License, ==
3 | == Version 2.0, MicroProfile Fault Tolerance ==
4 | =========================================================================
5 |
6 | This product includes software developed at
7 | The Apache Software Foundation (http://www.apache.org/).
8 |
9 |
10 | SPDXVersion: SPDX-2.1
11 | PackageName: Eclipse Microprofile
12 | PackageHomePage: http://www.eclipse.org/microprofile
13 | PackageLicenseDeclared: Apache-2.0
14 |
15 | PackageCopyrightText:
16 | Emily Jiang emijiang@uk.ibm.com
17 |
18 |
--------------------------------------------------------------------------------
/spec/Gemfile:
--------------------------------------------------------------------------------
1 | #######################################################################
2 | ## Copyright (c) 2017 Contributors to the Eclipse Foundation
3 | ##
4 | ## See the NOTICE file(s) distributed with this work for additional
5 | ## information regarding copyright ownership.
6 | ##
7 | ## Licensed under the Apache License, Version 2.0 (the "License");
8 | ## you may not use this file except in compliance with the License.
9 | ## You may obtain a copy of the License at
10 | ##
11 | ## http://www.apache.org/licenses/LICENSE-2.0
12 | ##
13 | ## Unless required by applicable law or agreed to in writing, software
14 | ## distributed under the License is distributed on an "AS IS" BASIS,
15 | ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | ## See the License for the specific language governing permissions and
17 | ## limitations under the License.
18 | #######################################################################
19 | source "https://rubygems.org"
20 |
21 | gem 'asciidoctor'
22 | # gem 'asciidoctor-diagram'
23 | # gem 'tilt'
24 | # gem 'slim'
25 | gem 'thread_safe'
26 | gem 'guard'
27 | gem 'guard-shell'
28 | gem 'guard-livereload'
29 | gem 'rb-inotify'
30 | gem 'yajl-ruby'
31 | gem 'rb-readline'
32 |
--------------------------------------------------------------------------------
/spec/Guardfile:
--------------------------------------------------------------------------------
1 | #######################################################################
2 | ## Copyright (c) 2017 Contributors to the Eclipse Foundation
3 | ##
4 | ## See the NOTICE file(s) distributed with this work for additional
5 | ## information regarding copyright ownership.
6 | ##
7 | ## Licensed under the Apache License, Version 2.0 (the "License");
8 | ## you may not use this file except in compliance with the License.
9 | ## You may obtain a copy of the License at
10 | ##
11 | ## http://www.apache.org/licenses/LICENSE-2.0
12 | ##
13 | ## Unless required by applicable law or agreed to in writing, software
14 | ## distributed under the License is distributed on an "AS IS" BASIS,
15 | ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | ## See the License for the specific language governing permissions and
17 | ## limitations under the License.
18 | #######################################################################
19 | require 'erb'
20 | require 'asciidoctor'
21 | require 'asciidoctor/cli'
22 |
23 | invoker = Asciidoctor::Cli::Invoker.new(%W(src/main/asciidoc/microprofile-fault-tolerance-spec.asciidoc -o ./target/generated-docs/microprofile-fault-tolerance-spec.html))
24 |
25 | invoker.invoke!
26 |
27 | guard :shell do
28 | watch (/^.+\.(asciidoc|puml)$/) { |m| invoker.invoke! }
29 | end
30 |
31 | guard 'livereload' do
32 | watch(%r{.+\.(css|js|html?|php|inc|theme)$})
33 | end
34 |
--------------------------------------------------------------------------------
/spec/NOTICE:
--------------------------------------------------------------------------------
1 | =========================================================================
2 | == NOTICE file corresponding to section 4(d) of the Apache License, ==
3 | == Version 2.0, in this case for Microprofile Fault Tolerance ==
4 | =========================================================================
5 |
6 | SPDXVersion: SPDX-2.1
7 | PackageName: Eclipse Microprofile
8 | PackageHomePage: http://www.eclipse.org/microprofile
9 | PackageLicenseDeclared: Apache-2.0
10 |
11 | PackageCopyrightText:
12 | Emily Jiang emijiang@uk.ibm.com
13 | John Ament, john.d.ament@gmail.com
14 | Antoine Sabot-Durand, antoine@sabot-durand.net
15 |
--------------------------------------------------------------------------------
/spec/guard.sh:
--------------------------------------------------------------------------------
1 | #######################################################################
2 | ## Copyright (c) 2017 Contributors to the Eclipse Foundation
3 | ##
4 | ## See the NOTICE file(s) distributed with this work for additional
5 | ## information regarding copyright ownership.
6 | ##
7 | ## Licensed under the Apache License, Version 2.0 (the "License");
8 | ## you may not use this file except in compliance with the License.
9 | ## You may obtain a copy of the License at
10 | ##
11 | ## http://www.apache.org/licenses/LICENSE-2.0
12 | ##
13 | ## Unless required by applicable law or agreed to in writing, software
14 | ## distributed under the License is distributed on an "AS IS" BASIS,
15 | ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | ## See the License for the specific language governing permissions and
17 | ## limitations under the License.
18 | #######################################################################
19 | #!/usr/bin/env bash
20 | bundle exec guard
21 |
--------------------------------------------------------------------------------
/spec/preview.bat:
--------------------------------------------------------------------------------
1 | #######################################################################
2 | ## Copyright (c) 2017 Contributors to the Eclipse Foundation
3 | ##
4 | ## See the NOTICE file(s) distributed with this work for additional
5 | ## information regarding copyright ownership.
6 | ##
7 | ## Licensed under the Apache License, Version 2.0 (the "License");
8 | ## you may not use this file except in compliance with the License.
9 | ## You may obtain a copy of the License at
10 | ##
11 | ## http://www.apache.org/licenses/LICENSE-2.0
12 | ##
13 | ## Unless required by applicable law or agreed to in writing, software
14 | ## distributed under the License is distributed on an "AS IS" BASIS,
15 | ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | ## See the License for the specific language governing permissions and
17 | ## limitations under the License.
18 | #######################################################################
19 | asciidoctor -o target\generated-docs\microprofile-fault-tolerance-spec.html src\main\asciidoc\microprofile-fault-tolerance-spec.asciidoc
20 |
21 | bundle exec guard
22 |
--------------------------------------------------------------------------------
/spec/preview.sh:
--------------------------------------------------------------------------------
1 | #######################################################################
2 | ## Copyright (c) 2017 Contributors to the Eclipse Foundation
3 | ##
4 | ## See the NOTICE file(s) distributed with this work for additional
5 | ## information regarding copyright ownership.
6 | ##
7 | ## Licensed under the Apache License, Version 2.0 (the "License");
8 | ## you may not use this file except in compliance with the License.
9 | ## You may obtain a copy of the License at
10 | ##
11 | ## http://www.apache.org/licenses/LICENSE-2.0
12 | ##
13 | ## Unless required by applicable law or agreed to in writing, software
14 | ## distributed under the License is distributed on an "AS IS" BASIS,
15 | ## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | ## See the License for the specific language governing permissions and
17 | ## limitations under the License.
18 | #######################################################################
19 | #!/usr/bin/env bash
20 |
21 | asciidoctor -o target/generated-docs/microprofile-fault-tolerance-spec.html src/main/asciidoc/microprofile-fault-tolerance-spec.asciidoc
22 |
23 | bundle exec guard
24 |
--------------------------------------------------------------------------------
/spec/src/main/asciidoc/execution.asciidoc:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2016-2017 Contributors to the Eclipse Foundation
3 | //
4 | // See the NOTICE file(s) distributed with this work for additional
5 | // information regarding copyright ownership.
6 | //
7 | // Licensed under the Apache License, Version 2.0 (the "License");
8 | // You may not use this file except in compliance with the License.
9 | // You may obtain a copy of the License at
10 | //
11 | // http://www.apache.org/licenses/LICENSE-2.0
12 | //
13 | // Unless required by applicable law or agreed to in writing, software
14 | // distributed under the License is distributed on an "AS IS" BASIS,
15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | // See the License for the specific language governing permissions and
17 | // limitations under the License.
18 | // Contributors:
19 | // Emily Jiang
20 |
21 | [[execution]]
22 | == Execution
23 |
24 | Use interceptor and annotation to specify the execution and policy configuration.
25 | The annotation `Asynchronous` has to be specified for any asynchronous calls.
26 | Otherwise, synchronous execution is assumed.
27 |
28 |
29 |
--------------------------------------------------------------------------------
/spec/src/main/asciidoc/license-alv2.asciidoc:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2016-2017 Contributors to the Eclipse Foundation
3 | //
4 | // See the NOTICE file(s) distributed with this work for additional
5 | // information regarding copyright ownership.
6 | //
7 | // Licensed under the Apache License, Version 2.0 (the "License");
8 | // You may not use this file except in compliance with the License.
9 | // You may obtain a copy of the License at
10 | //
11 | // http://www.apache.org/licenses/LICENSE-2.0
12 | //
13 | // Unless required by applicable law or agreed to in writing, software
14 | // distributed under the License is distributed on an "AS IS" BASIS,
15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | // See the License for the specific language governing permissions and
17 | // limitations under the License.
18 | // Contributors:
19 | // Emily Jiang
20 |
21 | [subs="normal"]
22 | ....
23 |
24 | Specification: {doctitle}
25 |
26 | Version: {revnumber}
27 |
28 | Status: {revremark}
29 |
30 | Release: {revdate}
31 |
32 | Copyright (c) 2016-2017 Eclipse Microprofile Contributors:
33 | Emily Jiang
34 |
35 | Licensed under the Apache License, Version 2.0 (the "License");
36 | you may not use this file except in compliance with the License.
37 | You may obtain a copy of the License at
38 |
39 | http://www.apache.org/licenses/LICENSE-2.0
40 |
41 | Unless required by applicable law or agreed to in writing, software
42 | distributed under the License is distributed on an "AS IS" BASIS,
43 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
44 | See the License for the specific language governing permissions and
45 | limitations under the License.
46 |
47 | ....
48 |
--------------------------------------------------------------------------------
/spec/src/main/asciidoc/optional-container-integration.asciidoc:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Contributors to the Eclipse Foundation
3 | //
4 | // See the NOTICE file(s) distributed with this work for additional
5 | // information regarding copyright ownership.
6 | //
7 | // Licensed under the Apache License, Version 2.0 (the "License");
8 | // You may not use this file except in compliance with the License.
9 | // You may obtain a copy of the License at
10 | //
11 | // http://www.apache.org/licenses/LICENSE-2.0
12 | //
13 | // Unless required by applicable law or agreed to in writing, software
14 | // distributed under the License is distributed on an "AS IS" BASIS,
15 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | // See the License for the specific language governing permissions and
17 | // limitations under the License.
18 | // Contributors:
19 | // Ladislav Thon
20 |
21 | [[optional-container-integration]]
22 |
23 | == Recommendations for Optional Container Integration
24 |
25 | This section describes the expected behaviors when the implementation runs in a Jakarta EE container.
26 |
27 | === `@Asynchronous`
28 |
29 | Threads that are servicing `@Asynchronous` invocations should, for the duration of the invocation, have the correct security context and naming context associated.
30 |
--------------------------------------------------------------------------------
/spec/src/main/resources/META-INF/NOTICE:
--------------------------------------------------------------------------------
1 | =========================================================================
2 | == NOTICE file corresponding to section 4(d) of the Apache License, ==
3 | == Version 2.0, in this case for Microprofile Config ==
4 | =========================================================================
5 |
6 | SPDXVersion: SPDX-2.1
7 | PackageName: Eclipse Microprofile
8 | PackageHomePage: http://www.eclipse.org/microprofile
9 | PackageLicenseDeclared: Apache-2.0
10 |
11 | PackageCopyrightText:
12 | Emily Jiang
13 |
--------------------------------------------------------------------------------
/tck/.gitignore:
--------------------------------------------------------------------------------
1 | /.apt_generated/
2 |
--------------------------------------------------------------------------------
/tck/NOTICE:
--------------------------------------------------------------------------------
1 | =========================================================================
2 | == NOTICE file corresponding to section 4(d) of the Apache License, ==
3 | == Version 2.0, in this case for Microprofile Fault Tolerance ==
4 | =========================================================================
5 |
6 | SPDXVersion: SPDX-2.1
7 | PackageName: Eclipse Microprofile
8 | PackageHomePage: http://www.eclipse.org/microprofile
9 | PackageLicenseDeclared: Apache-2.0
10 |
11 | PackageCopyrightText:
12 | Emily Jiang, emijiang@uk.ibm.com
13 | Neil Young, neil_young@uk.ibm.com
14 | Gordon Hutchison, Gordon.Hutchison@gmail.com
15 | John Ament, john.d.ament@gmail.com
16 |
17 |
18 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/asynchronous/AsyncRequestScopeClient.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.asynchronous;
22 |
23 | import java.util.concurrent.CompletableFuture;
24 | import java.util.concurrent.CompletionStage;
25 | import java.util.concurrent.Future;
26 |
27 | import jakarta.enterprise.context.RequestScoped;
28 |
29 | @RequestScoped
30 | public class AsyncRequestScopeClient {
31 |
32 | public CompletionStage methodReturningCompletionStage() {
33 | return CompletableFuture.completedFuture("testCompletionStageString");
34 | }
35 |
36 | public Future methodReturningFuture() {
37 | return CompletableFuture.completedFuture("testFutureString");
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/bulkhead/clientserver/Bulkhead10ClassSemaphoreBean.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2017-2020 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.bulkhead.clientserver;
21 |
22 | import org.eclipse.microprofile.fault.tolerance.tck.util.Barrier;
23 | import org.eclipse.microprofile.faulttolerance.Bulkhead;
24 |
25 | import jakarta.enterprise.context.ApplicationScoped;
26 |
27 | /**
28 | * A simple class level Semaphore @Bulkhead(10)
29 | *
30 | * @author Gordon Hutchison
31 | * @author Andrew Rouse
32 | */
33 | @ApplicationScoped
34 | @Bulkhead(10)
35 | public class Bulkhead10ClassSemaphoreBean {
36 |
37 | public void test(Barrier barrier) {
38 | barrier.await();
39 | }
40 |
41 | };
42 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/bulkhead/clientserver/Bulkhead10MethodSemaphoreBean.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2017-2020 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.bulkhead.clientserver;
21 |
22 | import org.eclipse.microprofile.fault.tolerance.tck.util.Barrier;
23 | import org.eclipse.microprofile.faulttolerance.Bulkhead;
24 |
25 | import jakarta.enterprise.context.ApplicationScoped;
26 |
27 | /**
28 | * A simple method level Semaphore @Bulkhead(10)
29 | *
30 | * @author Gordon Hutchison
31 | * @author Andrew Rouse
32 | */
33 | @ApplicationScoped
34 | public class Bulkhead10MethodSemaphoreBean {
35 |
36 | @Bulkhead(10)
37 | public void test(Barrier barrier) {
38 | barrier.await();
39 | }
40 |
41 | };
42 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/bulkhead/clientserver/Bulkhead3ClassSemaphoreBean.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2017-2020 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.bulkhead.clientserver;
21 |
22 | import org.eclipse.microprofile.fault.tolerance.tck.util.Barrier;
23 | import org.eclipse.microprofile.faulttolerance.Bulkhead;
24 |
25 | import jakarta.enterprise.context.ApplicationScoped;
26 |
27 | /**
28 | * A simple class level Semaphore @Bulkhead
29 | *
30 | * @author Gordon Hutchison
31 | * @author Andrew Rouse
32 | */
33 | @Bulkhead(3)
34 | @ApplicationScoped
35 | public class Bulkhead3ClassSemaphoreBean {
36 |
37 | public void test(Barrier barrier) {
38 | barrier.await();
39 | }
40 |
41 | };
42 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/bulkhead/clientserver/Bulkhead3MethodSemaphoreBean.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2017-2020 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.bulkhead.clientserver;
21 |
22 | import org.eclipse.microprofile.fault.tolerance.tck.util.Barrier;
23 | import org.eclipse.microprofile.faulttolerance.Bulkhead;
24 |
25 | import jakarta.enterprise.context.ApplicationScoped;
26 |
27 | /**
28 | * A simple method level Semaphore @Bulkhead(3)
29 | *
30 | * @author Gordon Hutchison
31 | * @author Andrew Rouse
32 | */
33 | @ApplicationScoped
34 | public class Bulkhead3MethodSemaphoreBean {
35 |
36 | @Bulkhead(3)
37 | public void test(Barrier barrier) {
38 | barrier.await();
39 | }
40 |
41 | };
42 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/bulkhead/clientserver/Bulkhead3TaskQueueSemaphoreBean.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.bulkhead.clientserver;
22 |
23 | import org.eclipse.microprofile.fault.tolerance.tck.util.Barrier;
24 | import org.eclipse.microprofile.faulttolerance.Bulkhead;
25 |
26 | import jakarta.enterprise.context.ApplicationScoped;
27 |
28 | /**
29 | * Tests that the waitingTaskQueue parameter is ignored when {@code Asynchronous} is not used
30 | */
31 | @ApplicationScoped
32 | public class Bulkhead3TaskQueueSemaphoreBean {
33 |
34 | @Bulkhead(value = 3, waitingTaskQueue = 5)
35 | public void test(Barrier barrier) {
36 | barrier.await();
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/bulkhead/clientserver/BulkheadClassSemaphoreDefaultBean.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2017-2020 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.bulkhead.clientserver;
21 |
22 | import org.eclipse.microprofile.fault.tolerance.tck.util.Barrier;
23 | import org.eclipse.microprofile.faulttolerance.Bulkhead;
24 |
25 | import jakarta.enterprise.context.ApplicationScoped;
26 |
27 | /**
28 | * A simple class level Semaphore @Bulkhead
29 | *
30 | * @author Gordon Hutchison
31 | * @author Andrew Rouse
32 | */
33 | @ApplicationScoped
34 | @Bulkhead
35 | public class BulkheadClassSemaphoreDefaultBean {
36 |
37 | public void test(Barrier barrier) {
38 | barrier.await();
39 | }
40 |
41 | };
42 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/bulkhead/clientserver/BulkheadFutureClassBean.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.bulkhead.clientserver;
22 |
23 | import java.util.concurrent.Future;
24 |
25 | import org.eclipse.microprofile.fault.tolerance.tck.util.Barrier;
26 | import org.eclipse.microprofile.faulttolerance.Asynchronous;
27 | import org.eclipse.microprofile.faulttolerance.Bulkhead;
28 |
29 | import jakarta.enterprise.context.ApplicationScoped;
30 |
31 | @Bulkhead
32 | @Asynchronous
33 | @ApplicationScoped
34 | public class BulkheadFutureClassBean {
35 |
36 | public Future test(Future result, Barrier barrier) {
37 | barrier.await();
38 | return result;
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/bulkhead/clientserver/BulkheadFutureMethodBean.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.bulkhead.clientserver;
22 |
23 | import java.util.concurrent.Future;
24 |
25 | import org.eclipse.microprofile.fault.tolerance.tck.util.Barrier;
26 | import org.eclipse.microprofile.faulttolerance.Asynchronous;
27 | import org.eclipse.microprofile.faulttolerance.Bulkhead;
28 |
29 | import jakarta.enterprise.context.ApplicationScoped;
30 |
31 | @ApplicationScoped
32 | public class BulkheadFutureMethodBean {
33 |
34 | @Bulkhead
35 | @Asynchronous
36 | public Future test(Future result, Barrier barrier) {
37 | barrier.await();
38 | return result;
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/bulkhead/clientserver/BulkheadMethodSemaphoreDefaultBean.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2017-2020 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.bulkhead.clientserver;
21 |
22 | import org.eclipse.microprofile.fault.tolerance.tck.util.Barrier;
23 | import org.eclipse.microprofile.faulttolerance.Bulkhead;
24 |
25 | import jakarta.enterprise.context.ApplicationScoped;
26 |
27 | /**
28 | * A simple method level Semaphore @Bulkhead
29 | *
30 | * @author Gordon Hutchison
31 | * @author Andrew Rouse
32 | */
33 | @ApplicationScoped
34 | public class BulkheadMethodSemaphoreDefaultBean {
35 |
36 | @Bulkhead
37 | public void test(Barrier barrier) {
38 | barrier.await();
39 | }
40 |
41 | };
42 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/bulkhead/lifecycle/BulkheadLifecycleService1.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.bulkhead.lifecycle;
21 |
22 | import org.eclipse.microprofile.fault.tolerance.tck.util.Barrier;
23 | import org.eclipse.microprofile.faulttolerance.Bulkhead;
24 |
25 | import jakarta.enterprise.context.Dependent;
26 |
27 | @Dependent
28 | public class BulkheadLifecycleService1 {
29 | @Bulkhead(8)
30 | public void service(Barrier barrier) {
31 | barrier.await();
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/bulkhead/lifecycle/BulkheadLifecycleService2.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.bulkhead.lifecycle;
21 |
22 | import org.eclipse.microprofile.fault.tolerance.tck.util.Barrier;
23 | import org.eclipse.microprofile.faulttolerance.Bulkhead;
24 |
25 | import jakarta.enterprise.context.Dependent;
26 |
27 | @Dependent
28 | public class BulkheadLifecycleService2 {
29 | @Bulkhead(8)
30 | public void service(Barrier barrier) {
31 | barrier.await();
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/bulkhead/lifecycle/BulkheadLifecycleServiceSubclass1.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.bulkhead.lifecycle;
21 |
22 | import jakarta.enterprise.context.Dependent;
23 |
24 | @Dependent
25 | public class BulkheadLifecycleServiceSubclass1 extends BulkheadLifecycleServiceSuperclass {
26 | }
27 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/bulkhead/lifecycle/BulkheadLifecycleServiceSubclass2.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.bulkhead.lifecycle;
21 |
22 | import jakarta.enterprise.context.Dependent;
23 |
24 | @Dependent
25 | public class BulkheadLifecycleServiceSubclass2 extends BulkheadLifecycleServiceSuperclass {
26 | }
27 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/bulkhead/lifecycle/BulkheadLifecycleServiceSuperclass.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.bulkhead.lifecycle;
21 |
22 | import org.eclipse.microprofile.fault.tolerance.tck.util.Barrier;
23 | import org.eclipse.microprofile.faulttolerance.Bulkhead;
24 |
25 | public class BulkheadLifecycleServiceSuperclass {
26 | @Bulkhead(8)
27 | public void service(Barrier barrier) {
28 | barrier.await();
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/bulkhead/lifecycle/MutlipleMethodsBulkheadLifecycleService.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.bulkhead.lifecycle;
21 |
22 | import org.eclipse.microprofile.fault.tolerance.tck.util.Barrier;
23 | import org.eclipse.microprofile.faulttolerance.Bulkhead;
24 |
25 | import jakarta.enterprise.context.Dependent;
26 |
27 | @Dependent
28 | @Bulkhead(8)
29 | public class MutlipleMethodsBulkheadLifecycleService {
30 | public void service1(Barrier barrier) {
31 | barrier.await();
32 | }
33 |
34 | public void service2(Barrier barrier) {
35 | barrier.await();
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/circuitbreaker/lifecycle/CircuitBreakerLifecycleService.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.circuitbreaker.lifecycle;
21 |
22 | import java.io.IOException;
23 |
24 | public interface CircuitBreakerLifecycleService {
25 | // only to distinguish instances of the same class, to prove that multiple instances really are used
26 | int instanceId();
27 |
28 | void service() throws IOException;
29 | }
30 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/circuitbreaker/lifecycle/CircuitBreakerLifecycleService1.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.circuitbreaker.lifecycle;
21 |
22 | import java.io.IOException;
23 |
24 | import org.eclipse.microprofile.faulttolerance.CircuitBreaker;
25 |
26 | import jakarta.enterprise.context.Dependent;
27 |
28 | @Dependent
29 | public class CircuitBreakerLifecycleService1 {
30 | @CircuitBreaker(requestVolumeThreshold = 8)
31 | public void service() throws IOException {
32 | throw new IOException();
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/circuitbreaker/lifecycle/CircuitBreakerLifecycleService2.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.circuitbreaker.lifecycle;
21 |
22 | import java.io.IOException;
23 |
24 | import org.eclipse.microprofile.faulttolerance.CircuitBreaker;
25 |
26 | import jakarta.enterprise.context.Dependent;
27 |
28 | @Dependent
29 | public class CircuitBreakerLifecycleService2 {
30 | @CircuitBreaker(requestVolumeThreshold = 8)
31 | public void service() throws IOException {
32 | throw new IOException();
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/circuitbreaker/lifecycle/DerivedCircuitBreakerOnClassAndMethodNoAnnotationOnOverriddenMethod.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.circuitbreaker.lifecycle;
21 |
22 | import java.io.IOException;
23 |
24 | import jakarta.enterprise.context.Dependent;
25 | import jakarta.enterprise.inject.Typed;
26 |
27 | @Dependent
28 | @Typed(DerivedCircuitBreakerOnClassAndMethodNoAnnotationOnOverriddenMethod.class)
29 | public class DerivedCircuitBreakerOnClassAndMethodNoAnnotationOnOverriddenMethod
30 | extends
31 | BaseCircuitBreakerOnClassAndMethod {
32 | @Override
33 | public void service() throws IOException {
34 | super.service();
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/circuitbreaker/lifecycle/DerivedCircuitBreakerOnClassAndMethodNoRedefinition.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.circuitbreaker.lifecycle;
21 |
22 | import jakarta.enterprise.context.Dependent;
23 | import jakarta.enterprise.inject.Typed;
24 |
25 | @Dependent
26 | @Typed(DerivedCircuitBreakerOnClassAndMethodNoRedefinition.class)
27 | public class DerivedCircuitBreakerOnClassAndMethodNoRedefinition extends BaseCircuitBreakerOnClassAndMethod {
28 | }
29 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/circuitbreaker/lifecycle/DerivedCircuitBreakerOnClassAndMethodOverrideOnClass.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.circuitbreaker.lifecycle;
21 |
22 | import org.eclipse.microprofile.faulttolerance.CircuitBreaker;
23 |
24 | import jakarta.enterprise.context.Dependent;
25 | import jakarta.enterprise.inject.Typed;
26 |
27 | @Dependent
28 | @CircuitBreaker(requestVolumeThreshold = 4)
29 | @Typed(DerivedCircuitBreakerOnClassAndMethodOverrideOnClass.class)
30 | public class DerivedCircuitBreakerOnClassAndMethodOverrideOnClass extends BaseCircuitBreakerOnClassAndMethod {
31 | }
32 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/circuitbreaker/lifecycle/DerivedCircuitBreakerOnClassAndMethodOverrideOnMethod.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.circuitbreaker.lifecycle;
21 |
22 | import java.io.IOException;
23 |
24 | import org.eclipse.microprofile.faulttolerance.CircuitBreaker;
25 |
26 | import jakarta.enterprise.context.Dependent;
27 | import jakarta.enterprise.inject.Typed;
28 |
29 | @Dependent
30 | @Typed(DerivedCircuitBreakerOnClassAndMethodOverrideOnMethod.class)
31 | public class DerivedCircuitBreakerOnClassAndMethodOverrideOnMethod extends BaseCircuitBreakerOnClassAndMethod {
32 | @Override
33 | @CircuitBreaker(requestVolumeThreshold = 4)
34 | public void service() throws IOException {
35 | super.service();
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/circuitbreaker/lifecycle/DerivedCircuitBreakerOnClassNoAnnotationOnOverriddenMethod.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.circuitbreaker.lifecycle;
21 |
22 | import java.io.IOException;
23 |
24 | import jakarta.enterprise.context.Dependent;
25 | import jakarta.enterprise.inject.Typed;
26 |
27 | @Dependent
28 | @Typed(DerivedCircuitBreakerOnClassNoAnnotationOnOverriddenMethod.class)
29 | public class DerivedCircuitBreakerOnClassNoAnnotationOnOverriddenMethod extends BaseCircuitBreakerOnClass {
30 | @Override
31 | public void service() throws IOException {
32 | super.service();
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/circuitbreaker/lifecycle/DerivedCircuitBreakerOnClassNoRedefinition.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.circuitbreaker.lifecycle;
21 |
22 | import jakarta.enterprise.context.Dependent;
23 | import jakarta.enterprise.inject.Typed;
24 |
25 | @Dependent
26 | @Typed(DerivedCircuitBreakerOnClassNoRedefinition.class)
27 | public class DerivedCircuitBreakerOnClassNoRedefinition extends BaseCircuitBreakerOnClass {
28 | }
29 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/circuitbreaker/lifecycle/DerivedCircuitBreakerOnClassOverrideOnClass.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.circuitbreaker.lifecycle;
21 |
22 | import org.eclipse.microprofile.faulttolerance.CircuitBreaker;
23 |
24 | import jakarta.enterprise.context.Dependent;
25 | import jakarta.enterprise.inject.Typed;
26 |
27 | @Dependent
28 | @Typed(DerivedCircuitBreakerOnClassOverrideOnClass.class)
29 | @CircuitBreaker(requestVolumeThreshold = 4)
30 | public class DerivedCircuitBreakerOnClassOverrideOnClass extends BaseCircuitBreakerOnClass {
31 | }
32 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/circuitbreaker/lifecycle/DerivedCircuitBreakerOnClassOverrideOnClassWithOverriddenMethod.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.circuitbreaker.lifecycle;
21 |
22 | import java.io.IOException;
23 |
24 | import org.eclipse.microprofile.faulttolerance.CircuitBreaker;
25 |
26 | import jakarta.enterprise.context.Dependent;
27 | import jakarta.enterprise.inject.Typed;
28 |
29 | @Dependent
30 | @Typed(DerivedCircuitBreakerOnClassOverrideOnClassWithOverriddenMethod.class)
31 | @CircuitBreaker(requestVolumeThreshold = 4)
32 | public class DerivedCircuitBreakerOnClassOverrideOnClassWithOverriddenMethod extends BaseCircuitBreakerOnClass {
33 | @Override
34 | public void service() throws IOException {
35 | super.service();
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/circuitbreaker/lifecycle/DerivedCircuitBreakerOnMethodNoAnnotationOnOverriddenMethod.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.circuitbreaker.lifecycle;
21 |
22 | import java.io.IOException;
23 |
24 | import jakarta.enterprise.context.Dependent;
25 | import jakarta.enterprise.inject.Typed;
26 |
27 | @Dependent
28 | @Typed(DerivedCircuitBreakerOnMethodNoAnnotationOnOverriddenMethod.class)
29 | public class DerivedCircuitBreakerOnMethodNoAnnotationOnOverriddenMethod extends BaseCircuitBreakerOnMethod {
30 | @Override
31 | public void service() throws IOException {
32 | super.service();
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/circuitbreaker/lifecycle/DerivedCircuitBreakerOnMethodNoRedefinition.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.circuitbreaker.lifecycle;
21 |
22 | import jakarta.enterprise.context.Dependent;
23 | import jakarta.enterprise.inject.Typed;
24 |
25 | @Dependent
26 | @Typed(DerivedCircuitBreakerOnMethodNoRedefinition.class)
27 | public class DerivedCircuitBreakerOnMethodNoRedefinition extends BaseCircuitBreakerOnMethod {
28 | }
29 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/circuitbreaker/lifecycle/DerivedCircuitBreakerOnMethodOverrideOnClass.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.circuitbreaker.lifecycle;
21 |
22 | import org.eclipse.microprofile.faulttolerance.CircuitBreaker;
23 |
24 | import jakarta.enterprise.context.Dependent;
25 | import jakarta.enterprise.inject.Typed;
26 |
27 | @Dependent
28 | @CircuitBreaker(requestVolumeThreshold = 4)
29 | @Typed(DerivedCircuitBreakerOnMethodOverrideOnClass.class)
30 | public class DerivedCircuitBreakerOnMethodOverrideOnClass extends BaseCircuitBreakerOnMethod {
31 | }
32 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/circuitbreaker/lifecycle/DerivedCircuitBreakerOnMethodOverrideOnClassWithOverriddenMethod.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.circuitbreaker.lifecycle;
21 |
22 | import java.io.IOException;
23 |
24 | import org.eclipse.microprofile.faulttolerance.CircuitBreaker;
25 |
26 | import jakarta.enterprise.context.Dependent;
27 | import jakarta.enterprise.inject.Typed;
28 |
29 | @Dependent
30 | @CircuitBreaker(requestVolumeThreshold = 4)
31 | @Typed(DerivedCircuitBreakerOnMethodOverrideOnClassWithOverriddenMethod.class)
32 | public class DerivedCircuitBreakerOnMethodOverrideOnClassWithOverriddenMethod extends BaseCircuitBreakerOnMethod {
33 | @Override
34 | public void service() throws IOException {
35 | super.service();
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/circuitbreaker/lifecycle/MutlipleMethodsCircuitBreakerLifecycleService.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.circuitbreaker.lifecycle;
21 |
22 | import java.io.IOException;
23 |
24 | import org.eclipse.microprofile.faulttolerance.CircuitBreaker;
25 |
26 | import jakarta.enterprise.context.Dependent;
27 |
28 | @Dependent
29 | @CircuitBreaker(requestVolumeThreshold = 8)
30 | public class MutlipleMethodsCircuitBreakerLifecycleService {
31 | public void service1() throws IOException {
32 | throw new IOException();
33 | }
34 |
35 | public void service2() throws IOException {
36 | throw new IOException();
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/config/BeanWithRetry.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2017 Contributors to the Eclipse Foundation
3 | *
4 | * See the NOTICE file(s) distributed with this work for additional
5 | * information regarding copyright ownership.
6 | *
7 | * Licensed under the Apache License, Version 2.0 (the "License");
8 | * You may not use this file except in compliance with the License.
9 | * You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing, software
14 | * distributed under the License is distributed on an "AS IS" BASIS,
15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 | * See the License for the specific language governing permissions and
17 | * limitations under the License.
18 | */
19 |
20 | package org.eclipse.microprofile.fault.tolerance.tck.config;
21 |
22 | import org.eclipse.microprofile.faulttolerance.Retry;
23 |
24 | import jakarta.enterprise.context.Dependent;
25 |
26 | /**
27 | * @author Antoine Sabot-Durand
28 | */
29 | @Dependent
30 | @Retry
31 | public class BeanWithRetry {
32 |
33 | private int retry = 0;
34 |
35 | @Retry
36 | public void triggerException() {
37 | retry++;
38 | throw new IllegalStateException("Exception");
39 | }
40 |
41 | public int getRetry() {
42 | return retry;
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/config/FallbackHandlerA.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.config;
22 |
23 | import org.eclipse.microprofile.faulttolerance.ExecutionContext;
24 | import org.eclipse.microprofile.faulttolerance.FallbackHandler;
25 |
26 | public class FallbackHandlerA implements FallbackHandler {
27 |
28 | @Override
29 | public String handle(ExecutionContext context) {
30 | return "FallbackHandlerA";
31 | }
32 | }
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/config/FallbackHandlerB.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.config;
22 |
23 | import org.eclipse.microprofile.faulttolerance.ExecutionContext;
24 | import org.eclipse.microprofile.faulttolerance.FallbackHandler;
25 |
26 | public class FallbackHandlerB implements FallbackHandler {
27 |
28 | @Override
29 | public String handle(ExecutionContext context) {
30 | return "FallbackHandlerB";
31 | }
32 |
33 | }
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/config/TestConfigExceptionA.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.config;
22 |
23 | /**
24 | * Exception for config tests
25 | */
26 | @SuppressWarnings("serial")
27 | public class TestConfigExceptionA extends RuntimeException {
28 | }
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/config/TestConfigExceptionB.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.config;
22 |
23 | @SuppressWarnings("serial")
24 | public class TestConfigExceptionB extends RuntimeException {
25 | }
26 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/config/TestConfigExceptionB1.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2020 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.config;
22 |
23 | @SuppressWarnings("serial")
24 | public class TestConfigExceptionB1 extends TestConfigExceptionB {
25 | }
26 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/exception/hierarchy/E0.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2019 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.exception.hierarchy;
21 |
22 | /**
23 | * Subclass of Exception.
24 | */
25 | public class E0 extends Exception {
26 | }
27 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/exception/hierarchy/E0S.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2019 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.exception.hierarchy;
21 |
22 | /**
23 | * Subclass of E0 that isn't subclass of E1.
24 | */
25 | public class E0S extends E0 {
26 | }
27 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/exception/hierarchy/E1.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2019 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.exception.hierarchy;
21 |
22 | /**
23 | * Subclass of E0.
24 | */
25 | public class E1 extends E0 {
26 | }
27 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/exception/hierarchy/E1S.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2019 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.exception.hierarchy;
21 |
22 | /**
23 | * Subclass of E1 that isn't subclass of E2.
24 | */
25 | public class E1S extends E1 {
26 | }
27 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/exception/hierarchy/E2.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2019 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.exception.hierarchy;
21 |
22 | /**
23 | * Subclass of E1.
24 | */
25 | public class E2 extends E1 {
26 | }
27 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/exception/hierarchy/E2S.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2019 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.exception.hierarchy;
21 |
22 | /**
23 | * Subclass of E2.
24 | */
25 | public class E2S extends E2 {
26 | }
27 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/exception/hierarchy/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2019 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | /**
22 | * A hierarchy of test exceptions
23 | *
24 | * Exceptions in this package:
25 | *
26 | *
27 | * The <: symbol denotes the subtyping relation (Foo <: Bar means "Foo is a subtype of Bar")
28 | * Note that subtyping is reflexive (Foo <: Foo)
29 | *
30 | * E0 <: Exception
31 | * E1 <: E0
32 | * E2 <: E1
33 | * E2S <: E2
34 | * E1S <: E1, but E1S </: E2
35 | * E0S <: E0, but E0S </: E1
36 | *
37 | */
38 | package org.eclipse.microprofile.fault.tolerance.tck.exception.hierarchy;
39 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallback/clientserver/MyBean.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2017 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallback.clientserver;
22 |
23 | import jakarta.enterprise.context.ApplicationScoped;
24 |
25 | @ApplicationScoped
26 | public class MyBean {
27 | private int count = 33;
28 | public int getCount() {
29 | count++;
30 | return count;
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallback/clientserver/StringFallbackHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2017 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallback.clientserver;
22 |
23 | import org.eclipse.microprofile.faulttolerance.ExecutionContext;
24 | import org.eclipse.microprofile.faulttolerance.FallbackHandler;
25 |
26 | import jakarta.enterprise.context.Dependent;
27 |
28 | /**
29 | * A fallback handler to recover and return a string object.
30 | *
31 | * @author Emily Jiang
32 | *
33 | */
34 | @Dependent
35 | public class StringFallbackHandler implements FallbackHandler {
36 |
37 | @Override
38 | public String handle(ExecutionContext context) {
39 | return "fallback for " + context.getMethod().getName();
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallbackmethod/beans/FallbackMethodAbstractBeanA.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod.beans;
22 |
23 | import jakarta.enterprise.context.ApplicationScoped;
24 |
25 | @ApplicationScoped
26 | public class FallbackMethodAbstractBeanA extends FallbackMethodAbstractBeanB {
27 |
28 | protected String fallback(int a, Long b) {
29 | return "fallback";
30 | }
31 | }
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallbackmethod/beans/FallbackMethodAbstractBeanB.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod.beans;
22 |
23 | import org.eclipse.microprofile.faulttolerance.Fallback;
24 |
25 | public abstract class FallbackMethodAbstractBeanB {
26 |
27 | @Fallback(fallbackMethod = "fallback")
28 | public String method(int a, Long b) {
29 | throw new RuntimeException("test");
30 | }
31 |
32 | abstract protected String fallback(int a, Long b);
33 |
34 | }
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallbackmethod/beans/FallbackMethodBasicBean.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod.beans;
22 |
23 | import org.eclipse.microprofile.faulttolerance.Fallback;
24 |
25 | import jakarta.enterprise.context.ApplicationScoped;
26 |
27 | @ApplicationScoped
28 | public class FallbackMethodBasicBean {
29 |
30 | @Fallback(fallbackMethod = "fallback")
31 | public String method(int a, Long b) {
32 | throw new RuntimeException("test");
33 | }
34 |
35 | public String fallback(int a, Long b) {
36 | return "fallback";
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallbackmethod/beans/FallbackMethodDefaultMethodA.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod.beans;
22 |
23 | import org.eclipse.microprofile.faulttolerance.Fallback;
24 |
25 | import jakarta.enterprise.context.ApplicationScoped;
26 |
27 | @ApplicationScoped
28 | public class FallbackMethodDefaultMethodA implements FallbackMethodDefaultMethodB {
29 |
30 | @Fallback(fallbackMethod = "fallback")
31 | public String method(int a, Long b) {
32 | throw new RuntimeException("test");
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallbackmethod/beans/FallbackMethodDefaultMethodB.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod.beans;
22 |
23 | public interface FallbackMethodDefaultMethodB {
24 |
25 | default String fallback(int a, Long b) {
26 | return "fallback";
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallbackmethod/beans/FallbackMethodGenericAbstractBeanA.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod.beans;
22 |
23 | import jakarta.enterprise.context.ApplicationScoped;
24 |
25 | @ApplicationScoped
26 | public class FallbackMethodGenericAbstractBeanA extends FallbackMethodGenericAbstractBeanB {
27 |
28 | @Override
29 | protected String fallback(int a, Long b) {
30 | return "fallback";
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallbackmethod/beans/FallbackMethodGenericAbstractBeanB.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod.beans;
22 |
23 | import org.eclipse.microprofile.faulttolerance.Fallback;
24 |
25 | public abstract class FallbackMethodGenericAbstractBeanB {
26 |
27 | @Fallback(fallbackMethod = "fallback")
28 | public String method(int a, T b) {
29 | throw new RuntimeException("test");
30 | }
31 |
32 | protected abstract String fallback(int a, T b);
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallbackmethod/beans/FallbackMethodGenericArrayBeanA.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod.beans;
22 |
23 | import org.eclipse.microprofile.faulttolerance.Fallback;
24 |
25 | import jakarta.enterprise.context.ApplicationScoped;
26 |
27 | @ApplicationScoped
28 | public class FallbackMethodGenericArrayBeanA extends FallbackMethodGenericArrayBeanB {
29 |
30 | @Fallback(fallbackMethod = "fallback")
31 | public String method(String[][] arg) {
32 | throw new RuntimeException("test");
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallbackmethod/beans/FallbackMethodGenericArrayBeanB.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod.beans;
22 |
23 | public class FallbackMethodGenericArrayBeanB {
24 |
25 | public String fallback(T[][] arg) {
26 | return "fallback";
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallbackmethod/beans/FallbackMethodGenericBeanA.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod.beans;
22 |
23 | import org.eclipse.microprofile.faulttolerance.Fallback;
24 |
25 | import jakarta.enterprise.context.ApplicationScoped;
26 |
27 | @ApplicationScoped
28 | public class FallbackMethodGenericBeanA extends FallbackMethodGenericBeanB {
29 |
30 | @Fallback(fallbackMethod = "fallback")
31 | public String method(int a, Long b) {
32 | throw new RuntimeException("test");
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallbackmethod/beans/FallbackMethodGenericBeanB.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod.beans;
22 |
23 | public class FallbackMethodGenericBeanB {
24 |
25 | public String fallback(int a, T b) {
26 | return "fallback";
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallbackmethod/beans/FallbackMethodGenericComplexBeanA.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod.beans;
22 |
23 | import java.util.List;
24 | import java.util.Set;
25 |
26 | import org.eclipse.microprofile.faulttolerance.Fallback;
27 |
28 | import jakarta.enterprise.context.ApplicationScoped;
29 |
30 | @ApplicationScoped
31 | public class FallbackMethodGenericComplexBeanA extends FallbackMethodGenericComplexBeanB {
32 |
33 | @Fallback(fallbackMethod = "fallback")
34 | public String method(List> a) {
35 | throw new RuntimeException("test");
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallbackmethod/beans/FallbackMethodGenericComplexBeanB.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod.beans;
22 |
23 | import java.util.List;
24 | import java.util.Set;
25 |
26 | public class FallbackMethodGenericComplexBeanB {
27 |
28 | public String fallback(List> a) {
29 | return "fallback";
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallbackmethod/beans/FallbackMethodGenericDeepBeanA.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod.beans;
22 |
23 | import org.eclipse.microprofile.faulttolerance.Fallback;
24 |
25 | import jakarta.enterprise.context.ApplicationScoped;
26 |
27 | @ApplicationScoped
28 | public class FallbackMethodGenericDeepBeanA extends FallbackMethodGenericDeepBeanB {
29 |
30 | @Fallback(fallbackMethod = "fallback")
31 | public String method(int a, Long b) {
32 | throw new RuntimeException("test");
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallbackmethod/beans/FallbackMethodGenericDeepBeanB.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod.beans;
22 |
23 | public class FallbackMethodGenericDeepBeanB extends FallbackMethodGenericDeepBeanC {
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallbackmethod/beans/FallbackMethodGenericDeepBeanC.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod.beans;
22 |
23 | public class FallbackMethodGenericDeepBeanC {
24 |
25 | public String fallback(int a, T b) {
26 | return "fallback";
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallbackmethod/beans/FallbackMethodGenericWildcardBeanA.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod.beans;
22 |
23 | import java.util.List;
24 |
25 | import org.eclipse.microprofile.faulttolerance.Fallback;
26 |
27 | import jakarta.enterprise.context.ApplicationScoped;
28 |
29 | @ApplicationScoped
30 | public class FallbackMethodGenericWildcardBeanA extends FallbackMethodGenericWildcardBeanB {
31 |
32 | @Fallback(fallbackMethod = "fallback")
33 | public String method(List extends String> a) {
34 | throw new RuntimeException("test");
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallbackmethod/beans/FallbackMethodGenericWildcardBeanB.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod.beans;
22 |
23 | import java.util.List;
24 |
25 | public class FallbackMethodGenericWildcardBeanB {
26 |
27 | public String fallback(List extends T> a) {
28 | return "fallback";
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallbackmethod/beans/FallbackMethodInPackageBeanA.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod.beans;
22 |
23 | import org.eclipse.microprofile.faulttolerance.Fallback;
24 |
25 | import jakarta.enterprise.context.ApplicationScoped;
26 |
27 | @ApplicationScoped
28 | public class FallbackMethodInPackageBeanA extends FallbackMethodInPackageBeanB {
29 |
30 | @Fallback(fallbackMethod = "fallback")
31 | public String method(int a, Long b) {
32 | throw new RuntimeException("test");
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallbackmethod/beans/FallbackMethodInPackageBeanB.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod.beans;
22 |
23 | public class FallbackMethodInPackageBeanB {
24 |
25 | String fallback(int a, Long b) {
26 | return "fallback";
27 | }
28 |
29 | }
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallbackmethod/beans/FallbackMethodInterfaceBeanA.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod.beans;
22 |
23 | import jakarta.enterprise.context.ApplicationScoped;
24 |
25 | @ApplicationScoped
26 | public class FallbackMethodInterfaceBeanA extends FallbackMethodInterfaceBeanB {
27 |
28 | public String fallback(int a, Long b) {
29 | return "fallback";
30 | }
31 | }
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallbackmethod/beans/FallbackMethodInterfaceBeanB.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod.beans;
22 |
23 | import org.eclipse.microprofile.faulttolerance.Fallback;
24 |
25 | public abstract class FallbackMethodInterfaceBeanB implements FallbackMethodInterfaceBeanC {
26 |
27 | @Fallback(fallbackMethod = "fallback")
28 | public String method(int a, Long b) {
29 | throw new RuntimeException("test");
30 | }
31 |
32 | }
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallbackmethod/beans/FallbackMethodInterfaceBeanC.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod.beans;
22 |
23 | public interface FallbackMethodInterfaceBeanC {
24 |
25 | public String fallback(int a, Long b);
26 |
27 | }
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallbackmethod/beans/FallbackMethodOutOfPackageBeanA.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod.beans;
22 |
23 | import org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod.beans.subpackage.FallbackMethodOutOfPackageBeanB;
24 | import org.eclipse.microprofile.faulttolerance.Fallback;
25 |
26 | import jakarta.enterprise.context.ApplicationScoped;
27 |
28 | @ApplicationScoped
29 | public class FallbackMethodOutOfPackageBeanA extends FallbackMethodOutOfPackageBeanB {
30 |
31 | @Fallback(fallbackMethod = "fallback")
32 | public String method(int a, Long b) {
33 | throw new RuntimeException("test");
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallbackmethod/beans/FallbackMethodPrivateBean.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod.beans;
22 |
23 | import org.eclipse.microprofile.faulttolerance.Fallback;
24 |
25 | import jakarta.enterprise.context.ApplicationScoped;
26 |
27 | @ApplicationScoped
28 | public class FallbackMethodPrivateBean {
29 |
30 | @Fallback(fallbackMethod = "fallback")
31 | public String method(int a, Long b) {
32 | throw new RuntimeException("test");
33 | }
34 |
35 | @SuppressWarnings("unused")
36 | private String fallback(int a, Long b) {
37 | return "fallback";
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallbackmethod/beans/FallbackMethodSubclassBeanA.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod.beans;
22 |
23 | import jakarta.enterprise.context.ApplicationScoped;
24 |
25 | @ApplicationScoped
26 | public class FallbackMethodSubclassBeanA extends FallbackMethodSubclassBeanB {
27 |
28 | public String fallback(int a, Long b) {
29 | return "fallback";
30 | }
31 | }
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallbackmethod/beans/FallbackMethodSubclassBeanB.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod.beans;
22 |
23 | import org.eclipse.microprofile.faulttolerance.Fallback;
24 |
25 | import jakarta.enterprise.inject.Vetoed;
26 |
27 | // bean is vetoed to avoid accidentally picking it up and execution validation
28 | @Vetoed
29 | public class FallbackMethodSubclassBeanB {
30 |
31 | @Fallback(fallbackMethod = "fallback")
32 | public String method(int a, Long b) {
33 | throw new RuntimeException("test");
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallbackmethod/beans/FallbackMethodSubclassOverrideBeanA.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod.beans;
22 |
23 | import jakarta.enterprise.context.ApplicationScoped;
24 |
25 | @ApplicationScoped
26 | public class FallbackMethodSubclassOverrideBeanA extends FallbackMethodSubclassOverrideBeanB {
27 |
28 | @Override
29 | protected String fallback(int a, Long b) {
30 | return "fallback";
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallbackmethod/beans/FallbackMethodSubclassOverrideBeanB.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod.beans;
22 |
23 | import org.eclipse.microprofile.faulttolerance.Fallback;
24 |
25 | public class FallbackMethodSubclassOverrideBeanB {
26 |
27 | @Fallback(fallbackMethod = "fallback")
28 | public String method(int a, Long b) {
29 | throw new RuntimeException("test");
30 | }
31 |
32 | protected String fallback(int a, Long b) {
33 | // This fallback method should not be called as it is overridden in subclass
34 | return "Not this fallback";
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallbackmethod/beans/FallbackMethodSuperclassBeanA.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod.beans;
22 |
23 | import org.eclipse.microprofile.faulttolerance.Fallback;
24 |
25 | import jakarta.enterprise.context.ApplicationScoped;
26 |
27 | @ApplicationScoped
28 | public class FallbackMethodSuperclassBeanA extends FallbackMethodSuperclassBeanB {
29 |
30 | @Fallback(fallbackMethod = "fallback")
31 | public String method(int a, Long b) {
32 | throw new RuntimeException("test");
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallbackmethod/beans/FallbackMethodSuperclassBeanB.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod.beans;
22 |
23 | public class FallbackMethodSuperclassBeanB {
24 |
25 | protected String fallback(int a, Long b) {
26 | return "fallback";
27 | }
28 |
29 | }
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallbackmethod/beans/FallbackMethodSuperclassPrivateBeanA.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod.beans;
22 |
23 | import org.eclipse.microprofile.faulttolerance.Fallback;
24 |
25 | import jakarta.enterprise.context.ApplicationScoped;
26 |
27 | @ApplicationScoped
28 | public class FallbackMethodSuperclassPrivateBeanA extends FallbackMethodSuperclassPrivateBeanB {
29 |
30 | @Fallback(fallbackMethod = "fallback")
31 | public String method(int a, Long b) {
32 | throw new RuntimeException("test");
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallbackmethod/beans/FallbackMethodSuperclassPrivateBeanB.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod.beans;
22 |
23 | public class FallbackMethodSuperclassPrivateBeanB {
24 |
25 | @SuppressWarnings("unused")
26 | private String fallback(int a, Long b) {
27 | return "fallback";
28 | }
29 |
30 | }
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallbackmethod/beans/FallbackMethodVarargsBean.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod.beans;
22 |
23 | import org.eclipse.microprofile.faulttolerance.Fallback;
24 |
25 | import jakarta.enterprise.context.ApplicationScoped;
26 |
27 | @ApplicationScoped
28 | public class FallbackMethodVarargsBean {
29 |
30 | @Fallback(fallbackMethod = "fallback")
31 | public String method(int a, Long... b) {
32 | throw new RuntimeException("test");
33 | }
34 |
35 | public String fallback(int a, Long... b) {
36 | return "fallback";
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallbackmethod/beans/FallbackMethodWildcardBean.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod.beans;
22 |
23 | import java.util.List;
24 |
25 | import org.eclipse.microprofile.faulttolerance.Fallback;
26 |
27 | import jakarta.enterprise.context.ApplicationScoped;
28 |
29 | @ApplicationScoped
30 | public class FallbackMethodWildcardBean {
31 |
32 | @Fallback(fallbackMethod = "fallback")
33 | public String method(List> a) {
34 | throw new RuntimeException("test");
35 | }
36 |
37 | public String fallback(List> b) {
38 | return "fallback";
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallbackmethod/beans/FallbackMethodWildcardNegativeBean.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod.beans;
22 |
23 | import java.util.List;
24 |
25 | import org.eclipse.microprofile.faulttolerance.Fallback;
26 |
27 | import jakarta.enterprise.context.ApplicationScoped;
28 |
29 | @ApplicationScoped
30 | public class FallbackMethodWildcardNegativeBean {
31 |
32 | @Fallback(fallbackMethod = "fallback")
33 | public String method(List extends Number> a) {
34 | throw new RuntimeException("test");
35 | }
36 |
37 | public String fallback(List extends Integer> b) {
38 | return "fallback";
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallbackmethod/beans/subpackage/FallbackMethodOutOfPackageBeanB.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | package org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod.beans.subpackage;
22 |
23 | public class FallbackMethodOutOfPackageBeanB {
24 |
25 | String fallback(int a, Long b) {
26 | return "fallback";
27 | }
28 |
29 | }
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/fallbackmethod/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 |
21 | /**
22 | * Tests to cover the different possible locations for a fallback method
23 | */
24 | package org.eclipse.microprofile.fault.tolerance.tck.fallbackmethod;
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/invalidParameters/AsynchronousClientForValidationMethod.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.invalidParameters;
21 |
22 | import org.eclipse.microprofile.faulttolerance.Asynchronous;
23 |
24 | import jakarta.enterprise.context.ApplicationScoped;
25 |
26 | @ApplicationScoped
27 | public class AsynchronousClientForValidationMethod {
28 |
29 | /**
30 | * Invalid because it's annotated with {@link Asynchronous} but does not return Future or CompletionStage
31 | *
32 | * @return "foo"
33 | */
34 | @Asynchronous
35 | public String getString() {
36 | return "foo";
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/invalidParameters/BulkheadClientForValidation.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2016-2017 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.invalidParameters;
21 |
22 | import java.sql.Connection;
23 |
24 | import org.eclipse.microprofile.faulttolerance.Bulkhead;
25 |
26 | import jakarta.enterprise.context.RequestScoped;
27 |
28 | /**
29 | * A client to demonstrate the validation of the value on @Bulkhead
30 | *
31 | * @author Neil Young
32 | *
33 | */
34 | @RequestScoped
35 | public class BulkheadClientForValidation {
36 |
37 | @Bulkhead(-1)
38 | public Connection serviceA() {
39 | return null;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/invalidParameters/CircuitBreakerClientForValidationDelay.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2016-2017 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.invalidParameters;
21 |
22 | import java.sql.Connection;
23 |
24 | import org.eclipse.microprofile.faulttolerance.CircuitBreaker;
25 |
26 | import jakarta.enterprise.context.RequestScoped;
27 |
28 | /**
29 | * A client to demonstrate the validation of the failureRatio attribute on @CircuitBreaker
30 | *
31 | * @author Neil Young
32 | *
33 | */
34 | @RequestScoped
35 | public class CircuitBreakerClientForValidationDelay {
36 |
37 | @CircuitBreaker(failureRatio = -1)
38 | public Connection serviceA() {
39 | return null;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/invalidParameters/CircuitBreakerClientForValidationFailureRatioNeg.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2016-2017 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.invalidParameters;
21 |
22 | import java.sql.Connection;
23 |
24 | import org.eclipse.microprofile.faulttolerance.CircuitBreaker;
25 |
26 | import jakarta.enterprise.context.RequestScoped;
27 |
28 | /**
29 | * A client to demonstrate the validation of the failureRatio attribute on @CircuitBreaker
30 | *
31 | * @author Neil Young
32 | *
33 | */
34 | @RequestScoped
35 | public class CircuitBreakerClientForValidationFailureRatioNeg {
36 |
37 | @CircuitBreaker(failureRatio = -0.1)
38 | public Connection serviceA() {
39 | return null;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/invalidParameters/CircuitBreakerClientForValidationFailureRatioPos.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2016-2017 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.invalidParameters;
21 |
22 | import java.sql.Connection;
23 |
24 | import org.eclipse.microprofile.faulttolerance.CircuitBreaker;
25 |
26 | import jakarta.enterprise.context.RequestScoped;
27 |
28 | /**
29 | * A client to demonstrate the validation of the failureRatio attribute on @CircuitBreaker
30 | *
31 | * @author Neil Young
32 | *
33 | */
34 | @RequestScoped
35 | public class CircuitBreakerClientForValidationFailureRatioPos {
36 |
37 | @CircuitBreaker(failureRatio = 1.1)
38 | public Connection serviceA() {
39 | return null;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/invalidParameters/CircuitBreakerClientForValidationReqVol0.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2016-2017 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.invalidParameters;
21 |
22 | import java.sql.Connection;
23 |
24 | import org.eclipse.microprofile.faulttolerance.CircuitBreaker;
25 |
26 | import jakarta.enterprise.context.RequestScoped;
27 |
28 | /**
29 | * A client to demonstrate the validation of the requestVolumeThreshold attribute on @CircuitBreaker
30 | *
31 | * @author Neil Young
32 | *
33 | */
34 | @RequestScoped
35 | public class CircuitBreakerClientForValidationReqVol0 {
36 |
37 | @CircuitBreaker(requestVolumeThreshold = 0)
38 | public Connection serviceA() {
39 | return null;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/invalidParameters/CircuitBreakerClientForValidationReqVolNeg.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2016-2017 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.invalidParameters;
21 |
22 | import java.sql.Connection;
23 |
24 | import org.eclipse.microprofile.faulttolerance.CircuitBreaker;
25 |
26 | import jakarta.enterprise.context.RequestScoped;
27 |
28 | /**
29 | * A client to demonstrate the validation of the requestVolumeThreshold attribute on @CircuitBreaker
30 | *
31 | * @author Neil Young
32 | *
33 | */
34 | @RequestScoped
35 | public class CircuitBreakerClientForValidationReqVolNeg {
36 |
37 | @CircuitBreaker(requestVolumeThreshold = -1)
38 | public Connection serviceA() {
39 | return null;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/invalidParameters/CircuitBreakerClientForValidationSuccess0.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2016-2017 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.invalidParameters;
21 |
22 | import java.sql.Connection;
23 |
24 | import org.eclipse.microprofile.faulttolerance.CircuitBreaker;
25 |
26 | import jakarta.enterprise.context.RequestScoped;
27 |
28 | /**
29 | * A client to demonstrate the validation of the successThreshold attribute on @CircuitBreaker
30 | *
31 | * @author Neil Young
32 | *
33 | */
34 | @RequestScoped
35 | public class CircuitBreakerClientForValidationSuccess0 {
36 |
37 | @CircuitBreaker(successThreshold = 0)
38 | public Connection serviceA() {
39 | return null;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/invalidParameters/CircuitBreakerClientForValidationSuccessNeg.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2016-2017 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.invalidParameters;
21 |
22 | import java.sql.Connection;
23 |
24 | import org.eclipse.microprofile.faulttolerance.CircuitBreaker;
25 |
26 | import jakarta.enterprise.context.RequestScoped;
27 |
28 | /**
29 | * A client to demonstrate the validation of the successThreshold attribute on @CircuitBreaker
30 | *
31 | * @author Neil Young
32 | *
33 | */
34 | @RequestScoped
35 | public class CircuitBreakerClientForValidationSuccessNeg {
36 |
37 | @CircuitBreaker(successThreshold = 0)
38 | public Connection serviceA() {
39 | return null;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/invalidParameters/RetryClientForValidationDelay.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2016-2017 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.invalidParameters;
21 |
22 | import java.sql.Connection;
23 |
24 | import org.eclipse.microprofile.faulttolerance.Retry;
25 |
26 | import jakarta.enterprise.context.RequestScoped;
27 |
28 | /**
29 | * A client to demonstrate the validation of the delay attribute on @Retry
30 | *
31 | * @author Neil Young
32 | *
33 | */
34 | @RequestScoped
35 | public class RetryClientForValidationDelay {
36 |
37 | @Retry(delay = -1)
38 | public Connection serviceA() {
39 | return null;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/invalidParameters/RetryClientForValidationDelayDuration.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2016-2017 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.invalidParameters;
21 |
22 | import java.sql.Connection;
23 |
24 | import org.eclipse.microprofile.faulttolerance.Retry;
25 |
26 | import jakarta.enterprise.context.RequestScoped;
27 |
28 | /**
29 | * A client to demonstrate the validation of the combination of the delay and maxDuration attributes on @Retry
30 | *
31 | * @author Neil Young
32 | *
33 | */
34 | @RequestScoped
35 | public class RetryClientForValidationDelayDuration {
36 |
37 | @Retry(delay = 1000, maxDuration = 500)
38 | public Connection serviceA() {
39 | return null;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/invalidParameters/RetryClientForValidationJitter.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2016-2017 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.invalidParameters;
21 |
22 | import java.sql.Connection;
23 |
24 | import org.eclipse.microprofile.faulttolerance.Retry;
25 |
26 | import jakarta.enterprise.context.RequestScoped;
27 |
28 | /**
29 | * A client to demonstrate the validation of the jitter attribute on @Retry
30 | *
31 | * @author Neil Young
32 | *
33 | */
34 | @RequestScoped
35 | public class RetryClientForValidationJitter {
36 |
37 | @Retry(jitter = -1)
38 | public Connection serviceA() {
39 | return null;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/invalidParameters/RetryClientForValidationMaxRetries.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2016-2017 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.invalidParameters;
21 |
22 | import java.sql.Connection;
23 |
24 | import org.eclipse.microprofile.faulttolerance.Retry;
25 |
26 | import jakarta.enterprise.context.RequestScoped;
27 |
28 | /**
29 | * A client to demonstrate the validation of the maxRetries attribute on @Retry
30 | *
31 | * @author Neil Young
32 | *
33 | */
34 | @RequestScoped
35 | public class RetryClientForValidationMaxRetries {
36 |
37 | @Retry(maxRetries = -3)
38 | public Connection serviceA() {
39 | return null;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/invalidParameters/TimeoutClientForValidation.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2016-2017 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.invalidParameters;
21 |
22 | import java.sql.Connection;
23 |
24 | import org.eclipse.microprofile.faulttolerance.Timeout;
25 |
26 | import jakarta.enterprise.context.RequestScoped;
27 |
28 | /**
29 | * A client to demonstrate the validation of the value on @Timeout
30 | *
31 | * @author Neil Young
32 | *
33 | */
34 | @RequestScoped
35 | public class TimeoutClientForValidation {
36 |
37 | @Timeout(-1)
38 | public Connection serviceA() {
39 | return null;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/retry/clientserver/exceptions/RetryChildException.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2016-2017 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.retry.clientserver.exceptions;
21 |
22 | public class RetryChildException extends RetryParentException {
23 |
24 | public RetryChildException(String message) {
25 | super(message);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/retry/clientserver/exceptions/RetryParentException.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2016-2017 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.retry.clientserver.exceptions;
21 |
22 | public class RetryParentException extends RuntimeException {
23 |
24 | public RetryParentException(String message) {
25 | super(message);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/retry/exception/hierarchy/RetryStatus.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2019 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.retry.exception.hierarchy;
21 |
22 | public enum RetryStatus {
23 | NOT_YET_INVOKED, FIRST_INVOCATION, RETRIED_INVOCATION
24 | }
25 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/util/AsyncCallerExecutor.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2019 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.util;
21 |
22 | import java.util.concurrent.Executor;
23 |
24 | import jakarta.enterprise.context.ApplicationScoped;
25 | import jakarta.inject.Inject;
26 |
27 | @ApplicationScoped
28 | public class AsyncCallerExecutor implements Executor {
29 |
30 | @Inject
31 | private AsyncCaller asyncCaller;
32 |
33 | @Override
34 | public void execute(Runnable command) {
35 | asyncCaller.run(command);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/util/Connection.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2017 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.util;
21 |
22 | /**
23 | *
24 | */
25 | public interface Connection {
26 | public String getData();
27 | }
28 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/util/TestException.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2018 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.util;
21 |
22 | /**
23 | * An identifiable exception thrown by tests which test handling of exceptions thrown by user code.
24 | *
25 | * It's basically a just runtime exception which isn't a
26 | * {@link org.eclipse.microprofile.faulttolerance.exceptions.FaultToleranceException}.
27 | */
28 | public class TestException extends RuntimeException {
29 |
30 | private static final long serialVersionUID = 1L;
31 |
32 | public TestException() {
33 | super("Test Exception");
34 | }
35 |
36 | public TestException(String message) {
37 | super("Test Exception - " + message);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/visibility/retry/RS.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2016-2017 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.visibility.retry;
21 |
22 | import java.lang.annotation.ElementType;
23 | import java.lang.annotation.Retention;
24 | import java.lang.annotation.RetentionPolicy;
25 | import java.lang.annotation.Target;
26 |
27 | import jakarta.inject.Qualifier;
28 |
29 | @Qualifier
30 | @Retention(RetentionPolicy.RUNTIME)
31 | @Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER})
32 | public @interface RS {
33 | RetryServiceType value();
34 | }
35 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/visibility/retry/RetryOnClassAndMethodServiceNoAnnotationMethodOverride.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2016-2017 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.visibility.retry;
21 |
22 | import java.sql.Connection;
23 |
24 | import jakarta.enterprise.context.RequestScoped;
25 |
26 | @RequestScoped
27 | @RS(RetryServiceType.BASE_ROCM_RETRY_MISSING_ON_METHOD)
28 | public class RetryOnClassAndMethodServiceNoAnnotationMethodOverride extends BaseRetryOnClassAndMethodService {
29 | @Override
30 | public Connection service() {
31 | return super.service();
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/visibility/retry/RetryOnClassAndMethodServiceNoRedefinition.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2016-2017 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.visibility.retry;
21 |
22 | import jakarta.enterprise.context.RequestScoped;
23 |
24 | @RequestScoped
25 | @RS(RetryServiceType.BASE_ROCM_DERIVED_CLASS_NO_REDEFINITION)
26 | public class RetryOnClassAndMethodServiceNoRedefinition extends BaseRetryOnClassAndMethodService {
27 | }
28 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/visibility/retry/RetryOnClassAndMethodServiceOverrideClassLevel.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2016-2017 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.visibility.retry;
21 |
22 | import org.eclipse.microprofile.faulttolerance.Retry;
23 |
24 | import jakarta.enterprise.context.RequestScoped;
25 |
26 | @RequestScoped
27 | @RS(RetryServiceType.BASE_ROCM_RETRY_REDEFINED_ON_CLASS)
28 | @Retry(maxRetries = 5)
29 | public class RetryOnClassAndMethodServiceOverrideClassLevel extends BaseRetryOnClassAndMethodService {
30 | }
31 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/visibility/retry/RetryOnClassAndMethodServiceOverrideClassLevelMethodOverride.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2016-2017 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.visibility.retry;
21 |
22 | import java.sql.Connection;
23 |
24 | import org.eclipse.microprofile.faulttolerance.Retry;
25 |
26 | import jakarta.enterprise.context.RequestScoped;
27 |
28 | @RequestScoped
29 | @RS(RetryServiceType.BASE_ROCM_RETRY_REDEFINED_ON_CLASS_METHOD_OVERRIDE)
30 | @Retry(maxRetries = 5)
31 | public class RetryOnClassAndMethodServiceOverrideClassLevelMethodOverride extends BaseRetryOnClassAndMethodService {
32 | @Override
33 | public Connection service() {
34 | return super.service();
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/visibility/retry/RetryOnClassAndMethodServiceOverrideMethodLevel.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2016-2017 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.visibility.retry;
21 |
22 | import java.sql.Connection;
23 |
24 | import org.eclipse.microprofile.faulttolerance.Retry;
25 |
26 | import jakarta.enterprise.context.RequestScoped;
27 |
28 | @RequestScoped
29 | @RS(RetryServiceType.BASE_ROCM_RETRY_REDEFINED_ON_METHOD)
30 | public class RetryOnClassAndMethodServiceOverrideMethodLevel extends BaseRetryOnClassAndMethodService {
31 | @Override
32 | @Retry(maxRetries = 5)
33 | public Connection service() {
34 | return super.service();
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/visibility/retry/RetryOnClassServiceNoAnnotationOnOveriddenMethod.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2016-2017 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.visibility.retry;
21 |
22 | import java.sql.Connection;
23 |
24 | import jakarta.enterprise.context.RequestScoped;
25 |
26 | @RequestScoped
27 | @RS(RetryServiceType.BASE_ROC_RETRY_MISSING_ON_METHOD)
28 | public class RetryOnClassServiceNoAnnotationOnOveriddenMethod extends BaseRetryOnClassService {
29 | @Override
30 | public Connection service() {
31 | return super.service();
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/visibility/retry/RetryOnClassServiceNoRedefinition.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2016-2017 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.visibility.retry;
21 |
22 | import jakarta.enterprise.context.RequestScoped;
23 |
24 | @RequestScoped
25 | @RS(RetryServiceType.BASE_ROC_DERIVED_CLASS_NO_REDEFINITION)
26 | public class RetryOnClassServiceNoRedefinition extends BaseRetryOnClassService {
27 | }
28 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/visibility/retry/RetryOnClassServiceOverrideClassLevel.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2016-2017 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.visibility.retry;
21 |
22 | import org.eclipse.microprofile.faulttolerance.Retry;
23 |
24 | import jakarta.enterprise.context.RequestScoped;
25 |
26 | @RequestScoped
27 | @RS(RetryServiceType.BASE_ROC_RETRY_REDEFINED_ON_CLASS)
28 | @Retry(maxRetries = 4)
29 | public class RetryOnClassServiceOverrideClassLevel extends BaseRetryOnClassService {
30 | }
31 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/visibility/retry/RetryOnClassServiceOverrideClassLevelMethodOverride.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2016-2017 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.visibility.retry;
21 |
22 | import java.sql.Connection;
23 |
24 | import org.eclipse.microprofile.faulttolerance.Retry;
25 |
26 | import jakarta.enterprise.context.RequestScoped;
27 |
28 | @RequestScoped
29 | @RS(RetryServiceType.BASE_ROC_RETRY_REDEFINED_ON_CLASS_METHOD_OVERRIDE)
30 | @Retry(maxRetries = 4)
31 | public class RetryOnClassServiceOverrideClassLevelMethodOverride extends BaseRetryOnClassService {
32 | @Override
33 | public Connection service() {
34 | return super.service();
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/visibility/retry/RetryOnMethodServiceNoAnnotationOnOverridedMethod.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2016-2017 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.visibility.retry;
21 |
22 | import java.sql.Connection;
23 |
24 | import jakarta.enterprise.context.RequestScoped;
25 |
26 | @RequestScoped
27 | @RS(RetryServiceType.BASE_ROM_RETRY_MISSING_ON_METHOD)
28 | public class RetryOnMethodServiceNoAnnotationOnOverridedMethod extends BaseRetryOnMethodService {
29 | @Override
30 | public Connection service() {
31 | return super.service();
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/visibility/retry/RetryOnMethodServiceNoRedefinition.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2016-2017 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.visibility.retry;
21 |
22 | import jakarta.enterprise.context.RequestScoped;
23 |
24 | @RequestScoped
25 | @RS(RetryServiceType.BASE_ROM_DERIVED_CLASS_NO_REDEFINITION)
26 | public class RetryOnMethodServiceNoRedefinition extends BaseRetryOnMethodService {
27 | }
28 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/visibility/retry/RetryOnMethodServiceOverridedClassLevelMethodOverride.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2016-2017 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.visibility.retry;
21 |
22 | import java.sql.Connection;
23 |
24 | import org.eclipse.microprofile.faulttolerance.Retry;
25 |
26 | import jakarta.enterprise.context.RequestScoped;
27 |
28 | @RequestScoped
29 | @RS(RetryServiceType.BASE_ROM_RETRY_REDEFINED_ON_CLASS)
30 | @Retry(maxRetries = 4)
31 | public class RetryOnMethodServiceOverridedClassLevelMethodOverride extends BaseRetryOnMethodService {
32 | @Override
33 | public Connection service() {
34 | return super.service();
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/visibility/retry/RetryOnMethodServiceOverridedClassLevelNoMethodOverride.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2016-2017 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.visibility.retry;
21 |
22 | import org.eclipse.microprofile.faulttolerance.Retry;
23 |
24 | import jakarta.enterprise.context.RequestScoped;
25 |
26 | @RequestScoped
27 | @RS(RetryServiceType.BASE_ROM_RETRY_REDEFINED_ON_CLASS_METHOD_OVERRIDE)
28 | @Retry(maxRetries = 4)
29 | public class RetryOnMethodServiceOverridedClassLevelNoMethodOverride extends BaseRetryOnMethodService {
30 | }
31 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/visibility/retry/RetryOnMethodServiceOverridedMethodLevel.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2016-2017 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.visibility.retry;
21 |
22 | import java.sql.Connection;
23 |
24 | import org.eclipse.microprofile.faulttolerance.Retry;
25 |
26 | import jakarta.enterprise.context.RequestScoped;
27 |
28 | @RequestScoped
29 | @RS(RetryServiceType.BASE_ROM_RETRY_REDEFINED_ON_METHOD)
30 | public class RetryOnMethodServiceOverridedMethodLevel extends BaseRetryOnMethodService {
31 | @Override
32 | @Retry(maxRetries = 4)
33 | public Connection service() {
34 | return super.service();
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/tck/src/main/java/org/eclipse/microprofile/fault/tolerance/tck/visibility/retry/RetryService.java:
--------------------------------------------------------------------------------
1 | /*
2 | *******************************************************************************
3 | * Copyright (c) 2016-2017 Contributors to the Eclipse Foundation
4 | *
5 | * See the NOTICE file(s) distributed with this work for additional
6 | * information regarding copyright ownership.
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * You may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | *******************************************************************************/
20 | package org.eclipse.microprofile.fault.tolerance.tck.visibility.retry;
21 |
22 | import java.sql.Connection;
23 |
24 | public interface RetryService {
25 | Connection service();
26 |
27 | int getNumberOfServiceCalls();
28 | }
29 |
--------------------------------------------------------------------------------
/tck/src/main/resources/META-INF/NOTICE:
--------------------------------------------------------------------------------
1 | =========================================================================
2 | == NOTICE file corresponding to section 4(d) of the Apache License, ==
3 | == Version 2.0, in this case for Microprofile Config ==
4 | =========================================================================
5 |
6 | This product includes software developed at
7 | The Apache Software Foundation (http://www.apache.org/).
8 |
9 | SPDXVersion: SPDX-2.1
10 | PackageName: Eclipse Microprofile
11 | PackageHomePage: http://www.eclipse.org/microprofile
12 | PackageLicenseDeclared: Apache-2.0
13 |
14 | PackageCopyrightText:
15 | Mark Struberg struberg@apache.org,
16 | Emily Jiang emijiang@uk.ibm.com,
17 | Ondrej Mihalyi ondrej.mihalyi@gmail.com
18 |
19 |
--------------------------------------------------------------------------------
/tck/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension:
--------------------------------------------------------------------------------
1 | org.eclipse.microprofile.fault.tolerance.tck.extension.TckLoadableExtension
--------------------------------------------------------------------------------
/tck/src/main/resources/META-INF/tck:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/microprofile/microprofile-fault-tolerance/2a2401eb1225ac1731a54f5d5c18231768a43ab8/tck/src/main/resources/META-INF/tck
--------------------------------------------------------------------------------