manifoldcf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Wright <daddy...@gmail.com>
Subject Re: poll method
Date Mon, 23 May 2011 19:45:26 GMT
The preferred way to set up connections is by having all methods that
require a set-up connection to call a getSession() method.  This is in
fact pretty much enforced by the fact that connect() cannot throw a
ManifoldCFException.  Chapter 6 of ManifoldCF in Action describes the
preferred form via a detailed example.  The poll() method should be
mainly to simply expire connections that have outlived their time, as
determined by whatever expiration time your connector has recorded for
the connection.  Thus, you should not really need to know how often it
is called.  Suffice it to say it is something on the order of a minute
to five minutes.  Besides, it is only called when the connector class
instance is sitting idle in the connection pool, not when it is
actively in use.  All of this described in Chapter 6.

Thanks,
Karl

On Mon, May 23, 2011 at 3:30 PM,  <hokie@farzad.net> wrote:
> What is the interval when poll is getting called?  I recall reading that
> connect is not a place for a connector to connect to a external system.  In
> my design I'm connecting to a single http server.  So it just seems right to
> establish that when connect method is called and check it during the poll
> method.  Thoughts?  Thanks!
>

Mime
View raw message