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 last posting was not meant for this thread, sorry for the mess.
Currently there is no way to set retryAttemptCount in Eclipselink JPA - neither through xml nor through persistence unit properties.

However it could be configured in sessions.xml.

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

Can you reproduce the problem stand-alone (without NetBeans)?

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

On 7/30/2010 12:17 AM, cscage wrote:
I have been already configured it in my xml. I wrote it a bit later in my
previous post. But no matter, programm still freezes.
I also need  to specify timeout. 

Thanks in advance


Andrei Ilitchev wrote:
  
Currently it could be configured only through xml.
Please feel free to log an enhancement request: define a new persistence 
unit property to define schema.
Note that the new schema property would be applicable to 
EntityManagerFactory, not EntityManager.

On 7/29/2010 2:06 AM, cscage wrote:
    
I dont use SessionCustomizer, how can I configure it through
EntityManager?


Andrei Ilitchev wrote:
  
      
By default Eclipselink attempts to reconnect connection 3 times.
Don't set timeout property.
Instead in session customizer set the number of reconnection attempts to
0:

public class NoReconnectionCustomizer implements SessionCustomizer {
    public void customize(Session session) {
        session.getLogin().setQueryRetryAttemptCount(0);
        // the following required only in case both jta and non-jta 
datasources used
        
((DatabaseLogin)((ServerSession)session).getReadConnectionPool().getLogin()).setQueryRetryAttemptCount(0);
    }
}

On 7/28/2010 4:43 AM, cscage wrote:
    
        
(continue).. but nothing helps. I don't believe than ojdbc1.4 or ojdbc6
do
not support timeout of query or connection.
  
      
          
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


    
        
  
      
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users


    
  

Back to the top