Sacha Labourey wrote:
>
> This does not seem to fit in the EJB concept. Am I wrong?
>
Currently, no. JMS in the upcoming 2.0 spec should be what you need.
> How to implement these call-back and server background processing with the
> EJB?
>
You could have the client register itself as an RMI object, pass itself
along (thus being converted into a stub), then have the EJB call a
service passing the stub along as a parameter, and then return
immediately. The service that performs the actual work (eg downloads the
file) would then call the client through RMI when it is done:
client EJB stub service
| | |
| foo() | |
|------>| | bar() |
| |------------->|
| | |
| |
Call has returned to the client.
The service now performs the actual work (timed, new thread in bar() or
whatever).
| |
| | |---
| | | | baz()
| | |<--
| | |
| | done()|
| done() |<------|
|<-------------|
| |
Hope it helps somewhat. Let me know if I'm talking garbage, guys.
Regards,
/Kalle
--
Karl-Fredrik Blixt
Computer Science Engineer
Homepage: http://www-und.ida.liu.se/~karbl058
Telephone: +46-(0)13-17 99 29
Cellular: +46-(0)739-87 11 03
UIN: 4744258
"Consider the situation. There you are, forehead like a set of
balconies, worrying about the long-term effects of all this new 'fire'
stuff on the environment, you're being chased and eaten by most of the
planet's large animals, and suddenly tiny versions of one of the worst
of them wanders into the cave and starts to purr."
-- Why humans like cats (Terry Pratchett, The Unadulterated Cat)
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]