|
* modifing the filter chain
* closing a connection
* closing all the conections simple session MBean, a starting idea for implementation
proxying to IoSession implementation
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); } } I'm actively working on the SessionManager toy :)
I added support for : - operations for adding and removing LoggingFilter at First or End of the chain for dumping decodec message and ByteBuffer - display list of filters (nameas and class) - avg byte/sec sent and recieved since the begin of the connection (a profiler filter would be usefull) - display of local and remote SocketAddress for now it work well for my debuging needs : kill buggy connections, activate dumping, watch if it's alive (rcv/sent byte counters) managing ByteBuffer, displaying infos about memory usage
MBean interface for manage ByteBuffer pool
ByteBuffer modified for getting memory usage information
mistake I attached the files without any javadoc comments
Thanks for continuing contribution! :D
I feel like we'll have JMX support earlier than we expected thanks to your work. mistake : I used the hardcoded value 1 in place of MINIMUM_CAPACITY
* bundled everything (except ByteBuffer patch)
* added ServiceRegistry manager (can list service and unbind specified ones per port or name) You have done a great work!
I really like this stuff! Is this JMX integration already in some 0.9.x version? nop it's not integrated, it's still work-in-progress but you can add the files to your MINA it works well (I use it everyday now).
I'm gonig to finsih ThreadPool and Service monitoring next month (normaly). ThreadPoolFilterMBean committed to svn.
I didn't know that this issue is being watched by this many people. Why don't we include Julien's patch now? I'll apply the patches.
Added simple throughput analize : a thread, calculate the thoughput on the X millis seconds.
removed the stupids tabular datas how it's looking in JConsole
Now we've got a basic integration with JMX. We will continue improving this feature at the next unstable branch.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
* Traffic information provided by IoSession for all connections; admins should have fine-grained view.
* The ratio of the actual running time of MINA and total uptime for the application.
* Thread pool information
* ByteBuffer pool information; memory usage, the number of pooled buffers for each different buffer size
* The list of ports and transport types held by MINA
* Spying a specific connection using JMX notification
We appreciate any idea!