It looks like JMS is the way to go. For the moment I may still use RMI
while digesting JMS asap.

Thanks
Ralph

----- Original Message -----
From: Ken Jenks <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 18, 2001 11:02 AM
Subject: Re: [JBoss-user] EJB calls Java client


> At 10:27 AM 4/18/01 +0800, you wrote:
> >Not exactly jBoss but may be it's an easy one:
> >
> >If I have several Java clients cooperating on the same data and I want
to
> >inform all participants that some new information arrived or send the
> >information to all - how do I do that using EJB?
> >
> >Can I make a call on a remote object ( implementing java.rmi.Remote )
from
> >within a bean? There is a lot of information on RMI-IIOP, but that talks
> >mainly about cooperation with CORBA objects and exclusively about
calling
> >bean methods from a client.
>
> Yes, you can, but it's probably a much better architecture to have your
> bean send out a JMS message, to which your client(s) can subscribe.
Partly,
> the benefit is that your JMS-enabled EJB doesn't need to know anything
> about the client(s) that might receive its messages, while an RMI-enabled
> EJB would need to be compiled against each client's RMI stub class.
>
> For example:
>
>    public String ejbCreate (String _id) {
>      id = _id;
>      PublishTextMessage(null, null, "beanTopic", "create", null);
>      return null;
>    }
>
>    public void ejbRemove() {
>      PublishTextMessage(null, null, "beanTopic", "remove", null);
>    }
>
> where PublishTextMessage(
>      String java_naming_factory_initial,
>      String java_naming_provider_url,
>      String topicName,
>      String textMessage,
>      Properties beanProp)
>
> will just publish a JMS TextMessage on an appropriate topic name. You can
> even send out a mirror-image of the bean as an ObjectMessage.
>
> -- Ken Jenks, http://abiblion.com/
>
>     Tools for reading.
>
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to