Hi!

Paul Hodgetts wrote:
> I can understand that beans seem to be intended to be synchronously
> called from some other component.  What would an asynchronous model
> add to the current synchronous model?

Well, it *is* possible to integrate with JMS today, but this isn't
standardized. An asynchronous model would add many benefits to EJB,
mainly scalability and availability. But, if they're heading along the
lines that I hope they are, EJB2 will make the use of asynchronous
messaging much easier.

Today, with JMS, you have to not only learn the EJB API and way of doing
things, but also the JMS API, which has quite a learning-curve IMHO.
This is where EJB should "borrow" from COM+: in COM+ all you do is get
the interface as usual, and all calls will return immediately and the
actual processing will be done in an asynchronous fashion. This way of
interfacing with asynchronous messaging is a lot easier to use, and
would be very beneficial.

> How does JMS fit into this?  Are beans prohibited from having message
> handler methods?  Or is that still considered synchronous?

I'm guessing that JMS will be used in two ways: first, beans should be
able to implement the listener interface ("onMessage" specifically), and
second JMS should be used behind the scenes to accomplish what I
outlined above.

> If I wanted to implement some sort of active agent that lives in the
> EJB server, is there any way to do this?  In other words, can I create
> a thread that remains active in the container?

Nope. But with an event model you shouldn't have to. I am currently
building a agent system with J2EE and have very active agents, but they
do not use threads as a mean to "live". Instead they receive events as
their way of staying alive, some of which are timed.

This is a whole other science (and rather off-topic, sorry), but
pro-active agents can be implemented as reactive agents, which means
that agents can be implemented as complex components in J2EE that
respond intelligently to events from its environment.. blah blah
blah...and so on..

> What is planned for EJB2 that will help asynchronicity (is that a
> word? ;-)?  Any references appreciated.

This is currently unknown (and those who know aren't allowed to tell..).
When the first public draft of EJB2 comes out we'll know :-) But I'm
guessing that the first draft wont arrive before EJB1.1 Final, and
EJB1.1 Final wont be out before the J2EE reference implementation and
test suite is final.. you get the picture.. not tomorrow in any case...

/Rickard

--
Rickard �berg

@home: +46 13 177937
Email: [EMAIL PROTECTED]
Homepage: http://www-und.ida.liu.se/~ricob684

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to