Re: Object (servant) lifecycle

From: Scott Ferguson <ferg@xxx.com>
Date: Wed Feb 09 2005 - 12:11:55 PST

On Feb 9, 2005, at 12:02 PM, Radu-Adrian Popescu wrote:

> Hello,
>
> I've a quick question regarding server-side interface implementation -
> say servant - lifecycle.
>
> If I have an interface INTF and an implementation IMPL, and call
> through Resin into it from multiple hosts different operations, can
> someone please describe accurately what happens ?
> The way I see it is this:
> - Resin creates a HessianServlet instance
> - requests are called from different IO threads into the same servlet
> instance
> - which in turn calls into my object
> How many servant objects will there be ?

One. (I had to check, though.)

I think it's pretty much a consensus that automatic servant pooling is
a bad idea because it doesn't really avoid the need for threading and
just makes things more complicated.

-- Scott

> The problem is that in a method in a service I'm acquiring an
> expensive resource - a JMS producer wired to Oracle AQ. This is rather
> expensive to come by, and I'd like to know the whole model before I
> start adding a connection pool for the JMS producer JDBC connection
> needs (as I figure re-connecting to the database is the most expensive
> thing it does).
>
> I will look into the HessianServlet source code again, but I thought
> I'd ask the experts (hint: Scott, please reply!)
>
> Kind regards,
> --
> Radu-Adrian Popescu
> CSA, DBA, Developer
> Aldrapay MD
> Aldratech Ltd.
> +40213212243
Received on Wed 09 Feb 2005 12:11:55 -0800

This archive was generated by hypermail 2.1.8 : Thu Sep 28 2006 - 20:16:40 PDT