jdbc disconnect issue

View: New views
7 Messages — Rating Filter:   Alert me  

jdbc disconnect issue

by Keith Clark-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Frank,

In your absence an issue of the jdbc connector getting disconnected from
a remote MySQL database and not being able to reconnect without
restarting OO.o Base.  Not sure if you have followed the conversation at
all.

If not, I could re-raise it again.

Keith



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: jdbc disconnect issue

by frank.schoenheit :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Keith,

> In your absence an issue of the jdbc connector getting disconnected from
> a remote MySQL database and not being able to reconnect without
> restarting OO.o Base.  Not sure if you have followed the conversation at
> all.

I fear I didn't - this was a thread which looked like I couldn't cope up
with it with reasonable effort :-\

> If not, I could re-raise it again.

Please do so, though from the little I read in this thread, I fear I
might have no clue ...

Ciao
Frank

--
- Frank Schönheit, Software Engineer         frank.schoenheit@... -
- Sun Microsystems                      http://www.sun.com/staroffice -
- OpenOffice.org Base                       http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: jdbc disconnect issue

by Keith Clark-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, 2009-08-11 at 22:25 +0200, Frank Schönheit - Sun Microsystems
Germany wrote:

> Hi Keith,
>
> > In your absence an issue of the jdbc connector getting disconnected from
> > a remote MySQL database and not being able to reconnect without
> > restarting OO.o Base.  Not sure if you have followed the conversation at
> > all.
>
> I fear I didn't - this was a thread which looked like I couldn't cope up
> with it with reasonable effort :-\
>
> > If not, I could re-raise it again.
>
> Please do so, though from the little I read in this thread, I fear I
> might have no clue ...
>
> Ciao
> Frank
>

Frank,

I am using Base to connect to a remote MySQL database with the JDBC
connector.  They have an inactivity set for a ridiculously low time of
10 minutes.  When that time elapses, it disconnects and Base generates
an enormous error window (it exceeds my screen) stating that it lost
contact so many ms ago.

The only solution is to close Base and restart.

Now, I use MySQL Administrator and MySQL Query Browser and they never
seem to tell me when a connection is lost.  They must just connect again
in the background without generating an error at all.

I was wondering if there was some setting/solution to have Base do the
same.  My web host will not increase the inactivity timeout for me.
They claim security issues.

I've searched all I can over that past few weeks with no solution, and
this problem is driving us crazy!  Any help would be appreciated.

Keith



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: jdbc disconnect issue

by frank.schoenheit :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Keith,

> I am using Base to connect to a remote MySQL database with the JDBC
> connector.  They have an inactivity set for a ridiculously low time of
> 10 minutes.  When that time elapses, it disconnects and Base generates
> an enormous error window (it exceeds my screen) stating that it lost
> contact so many ms ago.
>
> The only solution is to close Base and restart.
>
> Now, I use MySQL Administrator and MySQL Query Browser and they never
> seem to tell me when a connection is lost.  They must just connect again
> in the background without generating an error at all.
>
> I was wondering if there was some setting/solution to have Base do the
> same.  My web host will not increase the inactivity timeout for me.
> They claim security issues.
>
> I've searched all I can over that past few weeks with no solution, and
> this problem is driving us crazy!  Any help would be appreciated.

Hmm, Base itself does not have a mechanism to re-connect when a
connection is lost for whatever reason, so on Base side, I cannot offer
you a solution here.

What you could try is to prevent the "inactivity". That is, if you
produce some minor activity every, say, 9:30 minutes, you could work
around the timeout. Clumsy, I know, but the only thing I can think of.

In every case, this would involve a macro, which needs the proper
activation trigger - which depends on your work flow. Probably some
on-load macro for the affected database documents could do. (Or a global
on-load macro which checks for loaded DB documents matching your
requirements, and then starting a timer for those.)

Other than that - I do not know whether the JDBC driver can be thought
to automatically re-connect in case of a connection loss, perhaps with
some special connection parameter?

Ciao
Frank

--
- Frank Schönheit, Software Engineer         frank.schoenheit@... -
- Sun Microsystems                      http://www.sun.com/staroffice -
- OpenOffice.org Base                       http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: jdbc disconnect issue

by Keith Clark-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, 2009-08-11 at 23:11 +0200, Frank Schönheit - Sun Microsystems
Germany wrote:

> Hi Keith,
>
> > I am using Base to connect to a remote MySQL database with the JDBC
> > connector.  They have an inactivity set for a ridiculously low time of
> > 10 minutes.  When that time elapses, it disconnects and Base generates
> > an enormous error window (it exceeds my screen) stating that it lost
> > contact so many ms ago.
> >
> > The only solution is to close Base and restart.
> >
> > Now, I use MySQL Administrator and MySQL Query Browser and they never
> > seem to tell me when a connection is lost.  They must just connect again
> > in the background without generating an error at all.
> >
> > I was wondering if there was some setting/solution to have Base do the
> > same.  My web host will not increase the inactivity timeout for me.
> > They claim security issues.
> >
> > I've searched all I can over that past few weeks with no solution, and
> > this problem is driving us crazy!  Any help would be appreciated.
>
> Hmm, Base itself does not have a mechanism to re-connect when a
> connection is lost for whatever reason, so on Base side, I cannot offer
> you a solution here.
>
> What you could try is to prevent the "inactivity". That is, if you
> produce some minor activity every, say, 9:30 minutes, you could work
> around the timeout. Clumsy, I know, but the only thing I can think of.
>
> In every case, this would involve a macro, which needs the proper
> activation trigger - which depends on your work flow. Probably some
> on-load macro for the affected database documents could do. (Or a global
> on-load macro which checks for loaded DB documents matching your
> requirements, and then starting a timer for those.)
>
> Other than that - I do not know whether the JDBC driver can be thought
> to automatically re-connect in case of a connection loss, perhaps with
> some special connection parameter?
>
> Ciao
> Frank
>

Hi Frank,

That was my original idea.  Just "touch" the database every 5 minutes
but I have no idea how to program that.  I could not find a timed
trigger.

Keith



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: jdbc disconnect issue

by frank.schoenheit :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Keith,

> That was my original idea.  Just "touch" the database every 5 minutes
> but I have no idea how to program that.  I could not find a timed
> trigger.

Hmm, can't find one in the Basic online help, either. Not sure this
means it doesn't exist.

I could imagine a Java extension doing this (it's surely possible to
have some timed trigger in Java) - would this be an option for you?

Perhaps having a Basic macro bound to the global "Open document" event,
which checks whether a newly opened doc is a DB doc, and in this case,
creates an instance of a Java UNO service (implemented in an extension),
which does the "touching". This approach would prevent loading Java with
the first opened doc, it would delay this to when its really needed.


Alternatively, asking a Basic mailing list for such a function might
give an answer. (Hmm, we don't have a dedicated Basic mailing list,
AFAIK. dev@ooo?)

Ciao
Frank

--
- Frank Schönheit, Software Engineer         frank.schoenheit@... -
- Sun Microsystems                      http://www.sun.com/staroffice -
- OpenOffice.org Base                       http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: jdbc disconnect issue

by Keith Clark-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, 2009-08-11 at 23:48 +0200, Frank Schönheit - Sun Microsystems
Germany wrote:

> Hi Keith,
>
> > That was my original idea.  Just "touch" the database every 5 minutes
> > but I have no idea how to program that.  I could not find a timed
> > trigger.
>
> Hmm, can't find one in the Basic online help, either. Not sure this
> means it doesn't exist.
>
> I could imagine a Java extension doing this (it's surely possible to
> have some timed trigger in Java) - would this be an option for you?
>
> Perhaps having a Basic macro bound to the global "Open document" event,
> which checks whether a newly opened doc is a DB doc, and in this case,
> creates an instance of a Java UNO service (implemented in an extension),
> which does the "touching". This approach would prevent loading Java with
> the first opened doc, it would delay this to when its really needed.
>
>
> Alternatively, asking a Basic mailing list for such a function might
> give an answer. (Hmm, we don't have a dedicated Basic mailing list,
> AFAIK. dev@ooo?)
>
> Ciao
> Frank
>

Frank,

Thanks for the suggestions, but I'm afraid they are beyond my experience
level.  I will, however, look into the developers mailing list and see
where that takes me.

Keith



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...