3

I'm looking for a way to start my SpringBoot application that uses JPA/EclipseLink even if DB is down and reconnect automatically when it becomes available. What I need is described in the response here: How to start spring-boot app without depending on Database?, but for Hibernate(!). I need the same but with EclipseLink.

I am aware of the property:

<property name="eclipselink.validation-only" value="true"/> 

but the description https://www.eclipse.org/eclipselink/documentation/2.4/jpa/extensions/p_validation_only.htm says "Use the eclipselink.validation-only persistence property to validate deployments by initializing descriptors but not connecting to the data source." Which means no re-connection even when DB becomes available.

So, is this possible with EclipseLink at all?

Versions:

Spring Boot: 2.0.7
EclipseLink: 2.7.0
Hikari Connection Pool: 2.7.9
Gena L
  • 420
  • 1
  • 5
  • 16

0 Answers0