That should work as well.
Small problem with that. The current Invoker design only adresses allowing the client to invoke the server.
JBossMQ has to have the ability to invoke a client. This is how asynch messages get delivered to receiving clients without them having to poll the server for messages.
Do you think the Invoker design will be updated to include this requirment??
This will only be a problem for bi-directional protocols
such as nio or plain sockets.
In general the JMS Server should expect to receive
a client proxy.
It does not necessarily use the same physical connection
or even the same protocol.
Consider the hypothetical case where a JMS Client is
behind a firewall.
It retrieves the http-invoker and contacts the
servlet with a client proxy that requests delivery
using e-mail :-)
Yes I know the Pong actually comes back in the
http response, but it isn't as funny :-)
That's what the JMS server receives today (a client proxy). Remeber that our JMS server can work with RMI as it's transport.
But I'm talking about our invoker architecture: it is tied to JMX which is server side only (currently). So the client proxy will not be able to go though a simmilar inovker system to get back to the client. I'm the kinda guy that like symetry.
The invokers shouldn't be tied to JMX.
They work by looking up a target in the Registry
and at the moment do a JMX invocation assuming the
target is an ObjectName.
Object mbeanServer(target, invocation);
JMX Decoupling is useful on the server.
The target could be an aspect invocation handler,
in which case the invoker does
This new method in the aspect invocation handler
is responsible for adding the new flow/metadata
to the already existing invocation.
In fact the MBeanServer implementation could have
a similiar method to add the extra decoupling.
The other JMX aspect of the invokers is the
service lifecycle and dependent MBeans.
If the invokers are POJOs these JMX aspects can
be added on the server and replaced with something
else on the client.
Should this be in the aspect forum? :-)
Correction of signatures.
Object mbeanServer.invoke(target, invocation);