java memcached client & tomcat

John Navil Joseph navil.john at gmail.com
Tue Feb 6 12:09:01 UTC 2007


Please correct me if I am wrong.

Ideally there should be a single memcached connection pool available
in the web server, and it should be made available to the servlets
through the initial context.

For example this is the way I connect to my MySQL databases, by making
use of a connection that I get from the existing connection pool.

      Context initCtx = new InitialContext();
      Context envCtx = (Context) initCtx.lookup("java:comp/env");

     DataSource ds = (DataSource)
        envCtx.lookup("jdbc/TestDB");

     Connection conn = ds.getConnection();

I know it is possible to achieve the same functionality with the
SockIOPool as well. But how exactly do I use SockIOPool in the web
server?

Thanks,
John

On 2/6/07, Gabe Schine <gabe.schine at gmail.com> wrote:
> we have been using that combination for a while now:
>
> about 16 clients (load-balanced web servers) and 1 server. works
> great for us. we are using SockIOPool, as well -- what would you like
> to know?
>
> gabe
>
>
> On Feb 5, 2007, at 9:47 PM, John Navil Joseph wrote:
>
> > Newbie to memcached here!
> >
> > Has anyone been using the java memcached client (available
> > @whalin.com) with Apache Tomcat? Just interested in knowing how
> > tried and tested/widely deployed the combination is.
> >
> > Also some pointers on using the SockIOPool connection pool
> > mechanism with Tomcat will be helpful.
> >
> > Thanks,
> > John


More information about the memcached mailing list