TCLUG Development Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG-DEVEL:154] RMI give you multi-threading?





Bob Tanner wrote:

> Quoting Perry Hoekstra (dutchman@uswest.net):
> > Bob Tanner wrote:
> >
> > > I am struggling RMI and thread issues.
> > >
> > > Is a remote service via RMI automatically multi-threaded?
> >
> > No, I don't believe so.  That was one of the value propositions of an EJB
> > container was that the EJB container would handle the multi-threading for
> > you.
>
> I see a tendency on developer.java.sun.com forum, to move away from RMI to
> EJB. I am reading an article in JavaPro about NOT doing multi-threads in EJB
> containers. Sheesh. Time to read more in the forums.

I am sorry, I may implied the wrong thing. As a bean developer within a EJB
container, you cannot instantiate your own threads.  What I meant (and was not
too clear) was that if two clients call on a bean, the container will handle the
threading when it creates (or grabs from a pool, depends on the bean type) the
two beans.  The advantages you see in EJB over RMI or servlet/JDBC is:

1) Threading model
2) Transaction support
3) Standard interface to develop against

--
Perry Hoekstra

---
"I don't see much sense in that," said Rabbit.
"No," said Pooh humbly, "there isn't. But there was going to be when I began it.
It's just that something happened to it along the way."