Hello,
Sorry for this late response.
Just before answering your questions, I would like to ask you to check if you have the "jmxremote_optional.jar" in your client application's classpath? When it is missing, this is known to cause the kind of hang you have described.
The dispatching of messages relies entirely on the JMX and JMX-remote APIs that come with the JDK. You might have noticed the following in the sample:
- TaskNotificationMBean and TaskNotification follow the naming convention for Standard MBeans
- TaskNotificationMBean extends the interface NotificationEmitter and TaskNotification extends the class NotificationBroadcasterSupport. This is what provides the support for emitting and dispatching notifications. Sending the notifications is implemented in the sendTaskNotification(...) methods, which simply delegate to NotificationBroadcasterSupport.sendNotification().
When you deploy a pluggable MBean, JPPF uses the information in the service file in META-INF/services (using the service provider interface or SPI) to instantiate the MBean and register it with the default MBean server. This makes the MBean available to any JMX-based monitoring tool, such as JConsole or VisualVM, which you can eventually use to check the state of your MBeans and others.
The transport layer for remote management and monitoring is implemented via the
JMX remote APIs. The JDK (since 1.5) provides a default implementation based on RMI. JPPF does not use it, instead we use the
JMXMP remote connector, which provides more features, can be fully secured and is generally better performance-wise. This why you need the file jmxremote_optional.jar in the classpath of each JPPF component: drivers, nodes and clients.
I hope this calrifies the way mbeans work in JPPF.
Could you please elaborate on what's happening in registerToMBean()
In this method, we use a MBean that the JPPF driver registers by default, to get a list of nodes connected to this driver. This information is then used to connect to each node's MBean server and register a NotificationListener with the custom MBean, which will handle remote notifications from all the nodes.
Am I correct in assuming that the communication is established between nodes and client and each task uses the facilities of the node's communication channel it's executed on?
Yes and no. Yes, the communication is established between node and client, and no because it is a different channel than the one used to send the tasks and receive their results. The channel used is created by the JMXMP remote connector.
The node-to-client communication causes issues in a number of networking environments, in particular when the nodes are in a different network than the client. In this case, the client will not be able to monitor or manage the nodes. However, this does not prevent jobs from being executed on these nodes, since all other JPPF communication channels go via the driver first. We are addressing this problem, but this is quite complex and will not yet be available in the upcoming v3.2 release (for which we are late

). See feature request
JPPF-26 Enable node management via the driver connectionhat could be the reason for this method to fail in my application?
As I mentioned above, we have seen this problem when "jmxremote_optional.jar" is missing from your client's classpath. Could you check it and let us know?
Sincerely,
-Laurent