Tuan,
I know. It is difficult both to explain and to understand these things in
plain English. That's why they invented UML .. ;-)
"RMIClass" = "Delegator"
implements MessageListener
has Engine
- that's the object that acts upon asynchronously received messages
- that's the object that you want to be able to re-configure in order to
get messages from different topics
- has a method to change the topic (done by some "trigger" as I called it)
- runs outside EJB container as a standalone application
- delegates the business work to an engine using the Engine reference
"Engine"
- provides public method work() to be called by the Delegator
- does its work synchronously to the Delegator.onMessage() -
thus asynchronously from to the message sender's point of view.
If "Engine" is an EJB, or some other J2EE component,
then the Delegator is a J2EE client. This is what I actually meant
when I said that the Delegator is basically your own Startup class.
These days (J2EE 1.3), J2EE clients use RMI-IIOP -
I think that is why you called the Delegatr an RMI class.
That's how I can understand the concept, and this should work.
Tell me if I am wrong!
Cheers, Rene