MDB / MBean & JMS / JMX


EJB programming & troubleshooting: MDB / MBean & JMS / JMX

  1. MDB / MBean & JMS / JMX (1 messages)

    Hi there;

    I'm J2EE noob, am really appreciate if anybody can help me to clear my doubt.

    EJB has 3 types:
    a) Session Bean
    - Stateless (use in normal login mechanism)
    - Stateful (use in shopping cart)

    b) Entity Bean - i don't know where and when is it suit to use
    - BMP (conn to db using DAO)
    - CMP (conn to db directly)

    c) Message Driven Bean - i am not sure of this usage too

    However, is MDB = MBean ? can anybody tell when is it suitable to use, and the purpose?

    Also, i am confuse with JMS & JMX too.

    Pls help.
  2. MDB / MBean & JMS / JMX[ Go to top ]

    MDB != MBean

    A message driven bean can be used to implement asynchronous communication between more applications. JMS offers two mechanisms : a topic and a queue
     - topic : The sender sends a message to the topic and this message is automaticaly forwarded to the members registed to the topic. When a client wants to get the messages he must register to the topic.
     - queue : This is similar to a mail box. A client has a mail box and the sender directly address the message to a mail box. The message is stored in the mail box and the client (receiver) must look in his mail box and retrieve the messages

    MBean -> Management Bean
    These beans are used to manage an application. For more information (mlet, notification, relation, ...) consult the specification of JMX.