Skip to content

Ordina-JTech/CircuitBreakerJEE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CircuitBreakerJEE

A circuit breaker made in JavaEE.

You can use the circuit breaker by simply injecting it:

@Inject
private CircuitBreaker circuitBreaker;

The circuitbreaker can be used the following way:

circuitBreaker(SlowSupplier::supplierMethod);

The circuit breaker can also be injecting with configuration:

@Inject
@CircuitBreakerConfig(timeOut = 5000, errorsThreshold = 3, sleepWindow = 5000)
private CircuitBreaker circuitBreaker;

The circuitbreaker makes use of a ManagedExecutorService.

Use this blog to create a ManagedExecutorService in glassfish: https://blogs.oracle.com/arungupta/entry/create_managedexecutorservice_managedscheduledexecutorservice_managedthreadfactory_contextservice

A Dockerfile and script is supplied to run the circuit breaker in glassfish

execute run.sh in the docker directory and watch the running cicuitbreaker example app at http://'DOCKERHOST':8080/CircuitBreakerJEE/

About

A circuit breaker in made in Java EE

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published