You might find the following source code useful meanwhile:

---- CODE BEGINS ----
public class JmxTest {
    public static void main(String[] args) throws Exception {
        final MBeanServer server =
ManagementFactory.getPlatformMBeanServer();

        IoAcceptor service = new NioSocketAcceptor();
        service.setHandler(new IoHandlerAdapter() { ... });

        ExecutorFilter executorFilter = new ExecutorFilter(
                new OrderedThreadPoolExecutor(...));

        service.getFilterChain().addLast(
                "codec", new ProtocolCodecFilter(new
TextLineCodecFactory()));
        service.getFilterChain().addLast("executor", executorFilter);
        service.bind(new InetSocketAddress(8080));

        server.registerMBean(
                new IoServiceMBean(service),
                new
ObjectName("org.apache.mina:type=service,name=myService"));

        server.registerMBean(
                new IoFilterMBean(executorFilter),
                new
ObjectName("org.apache.mina:type=filter,name=executor"));

        server.registerMBean(
                new IoFilterMBean(new LoggingFilter()),
                new ObjectName("org.apache.mina:type=filter,name=logger"));
    }
}
---- CODE ENDS ----

Arv Mistry wrote:
> I'm looking at the JMX integration example and it references a
> IoServiceManager class. That doesn't seem to exist anymore but there is
> an IoServiceMBean. I tried using that instead but get into other issues
> later.
> 
> This maybe me just be looking at the wrong version of the docs but I
> cant find any corrections or the right version.
> 
> Does anybody have a link or example of JMX integration in Mina 2.0. 
> 
> Appreciate any help, thanks.
> 
> Cheers Arv
> 
> 

-- 
Trustin Lee - Principal Software Engineer, JBoss, Red Hat
--
what we call human nature is actually human habit
--
http://gleamynode.net/

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to