1 Reply Latest reply on Mar 26, 2002 12:25 PM by adrian.brock

    Inter-component communication

    kmtong

      I am going to use JMX to build our application-level infrastructure. What I am thinking of is to use MBeans as the application components which allows us to deliver a highly configurable system at a very short time by plugging in the necessary components.

      I am trying to write a LoginService as the first service. The idea is to use the JMX's notification mechanism as the communication channel. Other MBeans would "broadcast" using a pre-defined "subject" and let the LoginService to acknowledge the request, so that the MBean would know whether login is successful or not.

      I am not sure this implementation is good or not. As currently I faced the problem that the MBean would have a busy waiting (for notification acknowledgement) before the function can be returned.

      Any comments would be appreciated.

      KM

        • 1. Re: Inter-component communication

          I'm not sure why you need to use notifications for this.
          JMX is already loosely bound. You just need a standard
          name for the login service. e.g.

          LoginInfo result = (LoginInfo) invoke(
          new ObjectName("MyDomain:service=login"),
          "login",
          new Object[] {"Subject"},
          new Class[] {String.class.getName()}
          );

          What you register at MyDomain:service=login
          can change dynamically as long at is has a management
          operation
          LoginInfo login(String subject);

          Regards,
          Adrian