No, I did mean 'Active Object' as it was described in 'Pattern-Oriented
Software Architecture / Patterns for Concurrent and Networked Objects'
or in Doug Leas book
Say you start with suns J2EE blueprints and the BusinessDelegate Pattern
(the BusinessDelegate is the on who calls the ejb you don't call it from
servlet directly).
Make this BusinessDelegate an Active Object. An Active Object receives
requests and handles them somewhat independend of the normal program
flow, it's like a object-with-a-thread.
You might ask 'what about the results'. Use 'Future' here. A future is a
result placeholder. Immediatley after the call:
myFuture = anActiveObjProxy.doXYZ(paramlist); (this call places only a
message on the actives Object request queue, the call returns
immediately)
myFuture does contain nothing.
To have parallelism, you have a bunch of those calls one after the other
and therefore a bunch of futures.
After the bunch of calls, you must wait until all futures are filled
with results from their actve objects, but that happens in the
background (remember the active object uses it's own thread). In the
meantime you can do other *usefull* things. Afterwards you simply
collect the results. use some sort of wait-loop inside the future like:
public synchronized Object get() {
while(realResult==null) wait();
return realResult;
}
this means that you also have some method like
public synchronized set(Object o) {
realResult=o;
notifyAll();
}
Peter
----- Original Message -----
From: Mark Galbreath <[EMAIL PROTECTED]>
Date: Wednesday, December 12, 2001 2:35 pm
Subject: Re: Clarification.
> Did he mean "Data Access Object" in conjunction with a thread pool
> (maintained by the database)?
>
> Mark
>
> -----Original Message-----
> From: Marco Trevisan
> Sent: Wednesday, December 12, 2001 8:22 AM
>
> "Peter Huber" wrote:
>
> > You might use 'Active Object' approach in conjunction with a thread
> > pool.
>
> Ehm, where can I find a thread pool in a servlet container ?
> Or I need to manage one ?
>
> Marco
>
>
________________________________________________________________________
___
> To unsubscribe, send email to [EMAIL PROTECTED] and include in
> the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http:
> Resources: http://java.sun.com/products/servlet/external-
> resources.htmlLISTSERV Help:
> http://www.lsoft.com/manuals/user/user.html
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html