I do not really see the point of having several different mechanism to
access the same objects.
If JMX is easier to use, let's use it.
This will also allow us to have a remote client easily, without relying on a
clustered flow.
We could define a simple helper beans (and/or a factory bean)
that would return the ClientFactory given a MBeanServerConnection (which can
be local or remote).
public class ClientFactoryHelper {
public ClientFactory getClientFactory(MBeanServerConnection server) {
...
}
// in case the container does not have the default name
public ClientFactory getClientFactory(MBeanServerConnection server, String
containerName) {
...
}
public ClientFactory getClientFactory(String host, String port) {
...
}
// in case the container does not have the default name
public ClientFactory getClientFactory(String host, String port, String
container) {
...
}
}
/**
* We may need a way to authenticate the user using login/password
* so keep a level of indirection using a factory
*/
public interface ClientFactory {
public ServiceMixClient createClient();
// public ServiceMixClient createClient(String user, String password);
}
We just need to expose the implementation of the ClientFactory in the mbean
server.
Any comments ?
Cheers,
Guillaume Nodet
On 7/25/06, James Strachan <[EMAIL PROTECTED]> wrote:
On 7/25/06, Philip Dodds <[EMAIL PROTECTED]> wrote:
> Good point - since if it works in Spring we should be in good shape for
the
> others !
Yeah - using Spring we can auto-export POJOs as MBeans...
http://static.springframework.org/spring/docs/2.0.x/reference/jmx.html
I hope there's some similar mechanism for GBeans too. so we could duck
being too app-server specific.
--
James
-------
http://radio.weblogs.com/0112098/