1 Reply Latest reply on Apr 25, 2008 3:24 AM by Jachym Vojtek

    Get and send notification when entities get updated or delet

    Pascal Lambert Newbie

      We need to bridge our old apps developed in WebObject with the new one development on JBoss. We know in WebObject how to "hook" in the framework to get notify when entities get updated or deleted but I not sure how to do it in JBoss. The only thing I've seen so far is use Lifecycle call back method that can be defined on EJB3 entities. But I find this solution invasive. Is there a way to do it with AOP?
      We are open in regard to JBoss version (4.2+).
      Any lead would be greatly appreciate.

        • 1. Re: Get and send notification when entities get updated or d
          Jachym Vojtek Newbie

          I am using postUpdate, postPersist and postRemove callback methods on each entity bean that informs neighbours about its change.
          . Callback method of entity sends message to one (constant name) topic about the performed change.
          . There is MessageBean listening on constant topic that catches messages.
          . Message bean loops over all registered listeners to listen to entity change (might be filtered using registered key) and if there is any listener registered (from client) message bean resends message to its own (created only for one specific listener) topic.
          . So each client listener has its own (listening) topic (created in runtime) and there is also one constant overall topic for any change on any entity.