[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] Eclipse link connection timeout
|
You can either set a property programattically or in your persistence.xml like:
<property name="eclipselink.session.customizer"
value="acme.sessions.MySessionCustomizer"/>
or using persistence properties, see:
http://wiki.eclipse.org/Customizing_the_EclipseLink_Application_(ELUG)#Using_the_Session_Customizer_Class
for more details.
./tch
On Thu, Jul 29, 2010 at 2:06 AM, cscage <tadjeddina@xxxxxxxxx> 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
> >
> >
>
> --
> View this message in context: http://old.nabble.com/Eclipse-link-connection-timeout-tp29275004p29293386.html
> Sent from the EclipseLink - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users