Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] (no subject)

This can be configured in DatabaseLogin,

login.setQueryRetryAttemptCount(0);


mohamed jawath wrote:
> 
> Eclipselink automatically tries to reconnect it self to  database whenever 
> it
> detects a connection failure this causes swing ui to freeze without any
> responses until it connects to database .
> 
> Are there any solution to modify this behavior
> 
> Ie is it possible to throw exception when connection fails without
> retrying
> 
> Please help on this issue
> I am facing with huge problem.
> 
> I went throe eclipselink source code and google but I could not find any
> solution.
> 
> i am using this to develop swing desktop application
> local emf bootstrap
> i used to create jframe and initialise entity managers and use them for
> crud
> action
> 
>  EntityManager entityManager =
> Persistence.createEntityManagerFactory("mydb").createEntityManager();
> 
> //Database connection is connected
>     private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
>        entityManager.createQuery(".....").getResultList();
> 
>     }
> //if Database connection is disconnected at this point.
> // swing gui edt thread will start to hang or freeze in this place..
> // because eclipselink is retrying connection for 3 times this is very
> awful
> 
> 
>     private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
>         entityManager.createQuery(".....").getResultList();
>     }
> 
> 
> 


-----
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland 
http://www.eclipse.org/eclipselink/
 EclipseLink ,  http://www.oracle.com/technology/products/ias/toplink/
TopLink 
Wiki:  http://wiki.eclipse.org/EclipseLink EclipseLink , 
http://wiki.oracle.com/page/TopLink TopLink 
Forums:  http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink , 
http://www.nabble.com/EclipseLink-f26430.html EclipseLink 
Book:  http://en.wikibooks.org/wiki/Java_Persistence Java Persistence 
Blog:  http://java-persistence-performance.blogspot.com/ Java Persistence
Performance 
-- 
View this message in context: http://old.nabble.com/%28no-subject%29-tp31170479p31230215.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top