Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

271
Views
HystrixCommand annotation causes Session closed errors

I have a spring app that I'm trying to use the Circuit Breaker pattern on via Hystrix. I marked a method in my service with the @HystrixCommand annotation. This method has a call to a repository that works fine without the @HystrixCommand annotation.

However, simply adding the annotation gives me a bunch of runtime exceptions - org.hibernate.SessionException: Session is closed! and java.net.ConnectException. I don't understand enough about @HystrixCommand or spring to really understand what's going on here. Is there something about my repository connection I need to know before using Hystrix? I basically have just followed the guide here: https://spring.io/guides/gs/circuit-breaker/

Appreciate any feedback or leads.

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Simply add the following config to your properties/yml file

hystrix.command.default.execution.isolation.strategy: SEMAPHORE

Here is some documentation for further reading

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!