Re: EventSubject implementation

From: Holger Hoffstätte (holge..izards.de)
Date: Fri Jun 27 2003 - 18:29:14 EDT

  • Next message: Holger Hoffstätte: "A note on the EventManager"

    Andrus Adamchik wrote:
    > ..
    > events to other VMs. Simple "EventSubject.getSubjectName()" should fix the
    > problem. Any objections to adding this method? (Of course I can find ways
    > around, but they are much uglier).

    You are right. Making the simple string more meaningful was the main
    reason for the 'owner' of the subject, which we made a class for the first
    cut. The combination of owner and subject name is meant to be unique so
    that two equally named subjects do not collide on the same bus; using a
    class as namespace-enabled 'tag' was the first thing that came to my mind,
    although I could immediately come up with scenarios where that would break
    down as well. Maybe a unique name should be made of the class package and
    subject name like e.g. "my.nifty.class/FooSubject", exposed via (say)
    getSubjectIdentifier() and simply using getOwner()/getSubjectName() at
    first..
    This is basically an insolvable problem without central registry.
    So just adding the getters won't do much harm for now, I guess.

    Oh, just curious - any reasons why you are going for JMS directly?
    JavaGroups really is nice since it works at an higher level, automatically
    creating master/peers, taking care of delivery, removing dead peers and
    reelecting a master etc. Have a look at the HSQLDB replication/clustering
    whitepaper, it's really sweet.

    Holger



    This archive was generated by hypermail 2.0.0 : Fri Jun 27 2003 - 18:29:55 EDT