Fran�ois,

        thank you for your help. I have been trying to avoid Jeremie, mainly
because I plan to port the application to several different App servers and
don't want to user anything that is Jonas specific.

        I had thought that Topic publishers and subscribers were linked on
the basis of the Topic name and not on an actual instance of a topic object.
Taking your lead, I have tested the following:

        1) I start a copy of rmiregistry on server1
        2) I start Jonas and Joram on server1
        3) I start a copy of rmiregistry on server2
        4) I lookup a Remote for the topic from server1's rmiregistry
                and then bind it under the same name on server2's
rmiregstry.
        5) I start up Jonas on server2. Since a Topic already exists in the 
        registry, it doesn't create a new one.

        Now both Jonas servers see JMS messages posted to the Topic.

        But if the JVM on server1 ever loses the Topic, then everything
breaks. All the Jonas servers create their copy of the MDB and bind it to
the topic upon deployment. If I lose that topic object on server1, then all
the MDB's are bound to a topic that I can no longer reach.

        I have tested failure over by killing and restarting server1's. I
then restarted it, and rebound the new topic to the rmiregistry under the
same name.

        I have tried to simply remove and add the MDB again. But unless I
restart all the jonas servers hosting the MDB's, they all remain bound to
the dead topic object and never find the new one.

        So, since JMS, joram at least, uses a Topic object instance to match
make pub/sub, this presents a single point of failure. Unless I can get all
the MDB beans to rebind to a new topic dynamically in Jonas.

        This seems to be the case with Jeremie too, since I would still lose
the object.

        Is this just the way that MDB's and JMS are? Am I missing something?
Is there a way to make joram matchmake on a name and not and instance? Can
Jonas rebind its MDB's to new topics dynamically?

        If anyone could point me in any direction, that would be great.

        thanks once again for all your help,
        
        Lucas McGregor([EMAIL PROTECTED])



-----Original Message-----
From: Fran�ois Exertier [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 11, 2001 4:55 AM
To: Lucas McGregor
Cc: '[EMAIL PROTECTED]'
Subject: Re: Topic to mulitple MDBs


Hi Lucas,

after a quick overlook at your message, I understand that your problem is
probably similar to that described (and solved ? I never get an answer ...)
in
http://www.objectweb.org/messages/JonasUsers/2001/06/msg00161.html.
More precisely, I suppose that you are using the RMI registry (and not
Jeremie).
Thus you need one registry per host. Moreover, for each instance of JOnAS,
you
specify the topic to be used/created (in the property jonas.jms.topics). The
policy of JOnAS is to create the topic in the MOM if it does not exist, or
to
use a created one if it is found in JNDI (through its name). In your case, I
imagine that JOnAS will never find the topic created on the other host,
since it
uses the local registry, thus something is going wrong since the topic will
be
created twice (surely there is one per host, which explains the behaviour
you
describe ...).

I would suggest that,
- you try to use Jeremie, so with one registry for all your machines; be
careful
to have the same jndi.properties file on each machine containing the name of
the
host (in java.naming.provider.url) where you run the registry.
- you run only one MOM,
- you specify your topic (jonas.jms.topics nw.mom.topic.DtdReceiver) in your
jonas.properties only for one JOnAS instance, and more precisely for the
first
you start, but this is not mandatory, since JOnAS should not create a
destination twice.

I currently do not see a solution when using RMI registry ...

Best Regards,

Fran�ois



Lucas McGregor wrote:

> I am trying to publish a message to a topic and have a MDB per Jonas pick
it
> up.
>
> I started an instance of Joram on a server using the default a3server.xml.
> Then I started two seperate Jonas instances on two seperate machines with
> the following configuration:
>
> jonas.jms.mom          org.objectweb.jonas_jms.JmsAdminForJoram
> jonas.jms.collocated    false
> jonas.jms.url          joram://server1:16010
> jonas.jms.threadpoolsize       10
> jonas.jms.topics nw.mom.topic.DtdReceiver
>
> Each jonas has two EJB's. The KeyMatrix stateless session bean which
> publishes to the nw.mom.topic.DtdReceiver
>  topic, and the DtdReceiver bean which is a MDB bound to the
> nw.mom.topic.DtdReceiver
>  topic.
>
> When I hit the KeyMatrix on server1, only server1's DtdReceiver receives a
> new message. When I hit the KeyMatrix on server2, only the DtdReceiver on
> server2 gets a new message.
>
> Now I have stopped and started the JMS server to verify that both Jonas
> instances are indeed pointed to the same joram server. (When I stop the
> joram server, both Jonas' KeyMatrix beans throw errors).
>
> I then tried starting a joram server on both server1 and server2 with the
> following a3server.xml file:
> <?xml version="1.0"?>
> <!DOCTYPE config SYSTEM "../xml/a3config.dtd">
> <config>
>     <domain name="D1"/>
>     <server id="0" name="S0" hostname="server11">
>       <network domain="D1" port="11731"/>
>       <service class="fr.dyade.aaa.mom.ConnectionFactory" args="16010"/>
>     </server>
>     <server id="1" name="S1" hostname="server2">
>       <network domain="D1" port="11731"/>
>       <service class="fr.dyade.aaa.mom.ConnectionFactory" args="16010"/>
>     </server>
> </config>
>
> I was hoping that the 2 joram instances would then act together. I still
> have the same reults, each published JMS message to a topic is only
answered
> by the MDB on the same machine.
>
> Does anyone have any ideas how I can get a MDB per Jonas to receive a
> message published to the topic?
>
> Thank you in advance,
>
> Lucas McGregor([EMAIL PROTECTED])
> NovaWorld Software Architect
> --------------------------------
> Java developers belong barefoot
> and programming on Solaris!
> --------------------------------
>
> ----
> To unsubscribe, send email to [EMAIL PROTECTED] and
> include in the body of the message "unsubscribe jonas-users".
> For general help, send email to [EMAIL PROTECTED] and
> include in the body of the message "help".

--
==================================================================
Fran�ois EXERTIER         Evidian (Groupe Bull)
     1, rue de Provence,  BP 208,  38432 Echirolles cedex, FRANCE
     mailto:[EMAIL PROTECTED]
     http://www.evidian.com/jonas   http://www.objectweb.org/jonas
     Tel: +33 (0)4 76 29 71 51  -  Fax:   +33 (0)4 76 29 77 30
==================================================================

----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".

Reply via email to