Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

273
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda