Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Eclipse link connection timeout

> My programm freezes for 25-35 minutes. No matter there is 3 or 100 or infinite attempts)
> I just want to minimize timeout to let the user know what is going.
I thought you are seeing the same query being executed many times:
SELECT EMP_ID, FIRST_NAME FROM EMPLOYEE
SELECT EMP_ID, FIRST_NAME FROM EMPLOYEE
SELECT EMP_ID, FIRST_NAME FROM EMPLOYEE
SELECT EMP_ID, FIRST_NAME FROM EMPLOYEE
...
All my replies were based on this assumption.
Is that correct?
If so, then I still think that the same query being re-executed more than 3 times is done outside of Eclipselink,
presumable by NetBeans.

Alternatively, if that is NOT correct, and what you see is the single attempt of query execution hanging forever:
SELECT EMP_ID, FIRST_NAME FROM EMPLOYEE
If that's the case I would try a simple jdbc test (without Eclipselink) that would execute the query (with non-zero query timeout set in the Statement).

If this jdbc test still hangs forever then that's how the driver works and nothing could be done.
Alternatively, if the jdbc test throws query time out exception, but the test that uses Eclipselink (also with non-zero query timeout ("eclipselink.jdbc.connections.wait-timeout") property either specified in persistence.xml or passed to createEntityManagerFactory method) does not, then it would be Eclipselink problem.

Thanks,
Andrei

On 8/2/2010 12:28 AM, cscage wrote:
Andrei Ilitchev wrote:
  
Currently there is no way to set retryAttemptCount in Eclipselink JPA - 
neither through xml nor through persistence unit properties.

    
But EclipseLink announced the possibility of timeout changing through hints
or persistence.xml props.


Andrei Ilitchev wrote:
  
However it could be configured in sessions.xml.

    
Can you give an example of such configuration?


Andrei Ilitchev wrote:
  
But even without setting retryAttemptsCount to 0 you should have seen 
just three attempts to re-execute the query - not re-executing it forever.

    
My programm freezes for 25-35 minutes. No matter there is 3 or 100 or
infinite attempts)
I just want to minimize timeout to let the user know what is going.


Andrei Ilitchev wrote:
  
Can you reproduce the problem stand-alone (without NetBeans)?

Could it be that NetBeans is re-executing the query?

    
Hardly, Andrei. I don't believe to it, but I'll try to start it standalone.

Thanks for the help in advance.


  

Back to the top