This discussion is archived
0 Replies Latest reply: Aug 31, 2012 2:33 AM by 513159 RSS

Boradcating of messages from one mbean to another mbean

513159 Newbie
Currently Being Moderated
We have some issues while broadcasting messages as part of a
Notification listener.

From wlst, we are invoking a MBean of source instance. In wlst, we have a
listener attached to the source MBean and we listen for the notification
messages and print them in the console.

The source Mbean invokes another bean of another instance (target instance).
While invoking the mbean of the target instance, we have attached a
notification listener (TargetListener) to the target mbean connection and
listening for messages.

We want to broad cast these messages that we receive from the target mbean as
a message to the source Mbean (as and when we receive the messages from the
target) in the TargetListener.

In the handleNotification method of the TargetListener, we are trying to
broadcast messages. This braodcasting message internally happens in a thread
which is started by the handle notification method as and when it receives
the messages. Threading is done in order to avoid blocking of notification
broadcaster

We get all the messages in the wlst console , but the messages that
we receive from the TargetListener are not received progressively .
All the messages are sent at one shot (one after another after the target
mbean operation is completed) .

Even though we invoke the broadcaster as and when we receive the messages
(in a thread), the actual broadcasting happens only after the target mbean
operation is completed.

Broadcasting of messages from the target mbean (to the source mbean) needs
to be synchronous when the target mbean is invoked by the source mbean.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points