Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] How to set connection timeout?

Hi,

I’m using EclipseLink 2.5.1 in a JavaSE Application, on witch i’m having timeout problems.

Timeout takes too long, and i would like to reduce the timeout to something around 5 to 10 seconds.
I’ve tried a few Persistence.xml properties, but none seemed to take effect:
javax.persistence.jdbc.timeout
eclipselink.jdbc.connection_pool.default.wait
eclipselink.jdbc.connections.wait-timeout
javax.persistence.lock.timeout
javax.persistence.query.timeout

I have also tried to set Connection URL parameters like:
connectTimeout
socketTimeout

Also, it seems that eclipselink tries to connect again if a timeout happens. Is there a way to override that behavior?

Thanks in advance,

Pedro Peixoto.

Back to the top