You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Julien Vermillard (JIRA)" <ji...@apache.org> on 2005/12/29 15:22:01 UTC

[jira] Commented: (DIRMINA-29) JMX integration

    [ http://issues.apache.org/jira/browse/DIRMINA-29?page=comments#action_12361372 ] 

Julien Vermillard commented on DIRMINA-29:
------------------------------------------

i'm working on a first implmentation for now it permit to know the number of bytes written and read and to close the connection.


I simply add it to my MBeanServer in the IoHandler session created :

	public void sessionCreated(IoSession session) throws Exception {
		((SocketSession)session).setTcpNoDelay(true);
		
		// add the codec in the filter chain
		ProtocolCodecFactory codec;
		codec = new NettyCodecFactory(new PAMessageRecognizer(PAMessageRecognizer.SERVER_MODE)); 
        session.getFilterChain().addFirst("protocolFilter", new ProtocolCodecFilter( codec ) );
        
        // JMX instrumentation
		try {
			SessionManager sessMgr=new SessionManager(session);
		    MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();   
			ObjectName name = new ObjectName("archean.util.mina:type=SessionManger,cnx="+session.getRemoteAddress().toString().replace(':','/'));
			mbs.registerMBean(sessMgr, name);
		} catch (JMException e) {
			log.error("JMX Exception : ",e);
		}		
	}

> JMX integration
> ---------------
>
>          Key: DIRMINA-29
>          URL: http://issues.apache.org/jira/browse/DIRMINA-29
>      Project: Directory MINA
>         Type: New Feature
>     Versions: 0.7, 0.8, 0.9, 1.0
>     Reporter: Trustin Lee
>      Fix For: 1.1
>  Attachments: SessionManager.java, SessionManagerMBean.java
>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira