On 7/25/06, Guillaume Nodet <[EMAIL PROTECTED]> wrote:
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 ?
Yeah that'll work (and do the remoting piece too). Another approach is just to configure the ClientFactory as a POJO in the JNDI provider thats used by the server - such as in Tomcat or Jetty or some of the other J2EE servers. Either sound good to me; using a container-specific JNDI provider or JMX -- James ------- http://radio.weblogs.com/0112098/
