Issue Details (XML | Word | Printable)

Key: DIRMINA-29
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Julien Vermillard
Reporter: Trustin Lee
Votes: 1
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
MINA

JMX integration

Created: 07/May/05 03:17 PM   Updated: 08/Sep/06 04:51 AM
Return to search
Component/s: None
Affects Version/s: 0.7.0, 0.8.0, 0.9.0, 1.0.0
Fix Version/s: 1.0.0

Time Tracking:
Not Specified

File Attachments:
  Size
Java Source File Licensed for inclusion in ASF works ByteBuffer.java 2006-01-13 11:27 PM Julien Vermillard 62 kB
Java Source File Licensed for inclusion in ASF works ByteBuffer.java 2006-01-13 10:54 PM Julien Vermillard 62 kB
Java Source File Licensed for inclusion in ASF works ByteBuffer.java 2006-01-13 10:52 PM Julien Vermillard 62 kB
Java Source File Licensed for inclusion in ASF works ByteBufferManager.java 2006-01-13 10:41 PM Julien Vermillard 0.6 kB
Java Source File Licensed for inclusion in ASF works ByteBufferManagerMBean.java 2006-01-13 10:43 PM Julien Vermillard 0.3 kB
GZip Archive Licensed for inclusion in ASF works minaJMX.tar.gz 2006-01-14 02:11 AM Julien Vermillard 3 kB
Java Source File Licensed for inclusion in ASF works SessionManager.java 2006-01-13 08:17 PM Julien Vermillard 6 kB
Java Source File Licensed for inclusion in ASF works SessionManager.java 2005-12-29 11:18 PM Julien Vermillard 0.8 kB
Java Source File Licensed for inclusion in ASF works SessionManagerMBean.java 2006-01-13 08:17 PM Julien Vermillard 2 kB
Java Source File Licensed for inclusion in ASF works SessionManagerMBean.java 2005-12-29 11:17 PM Julien Vermillard 0.2 kB
GZip Archive Licensed for inclusion in ASF works SessionManagerMBean.tar.gz 2006-06-08 09:58 PM Julien Vermillard 2 kB
Image Attachments:

1. jconsole.png
(44 kB)

Resolution Date: 08/Sep/06 04:51 AM


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Trustin Lee added a comment - 22/Sep/05 12:45 PM
* The current/maximum number of connections
* 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!

Julien Vermillard added a comment - 22/Sep/05 05:13 PM
* modifing the filter chain

Julien Vermillard added a comment - 22/Sep/05 05:28 PM
* closing a connection
* closing all the conections

Julien Vermillard added a comment - 29/Dec/05 11:17 PM
simple session MBean, a starting idea for implementation

Julien Vermillard added a comment - 29/Dec/05 11:18 PM
proxying to IoSession implementation

Julien Vermillard added a comment - 29/Dec/05 11:21 PM
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);
}
}

Julien Vermillard added a comment - 30/Dec/05 06:45 PM
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)

Trustin Lee added a comment - 03/Jan/06 05:39 PM
Keep up the great work!!!

Julien Vermillard added a comment - 13/Jan/06 10:41 PM
managing ByteBuffer, displaying infos about memory usage

Julien Vermillard added a comment - 13/Jan/06 10:43 PM
MBean interface for manage ByteBuffer pool

Julien Vermillard added a comment - 13/Jan/06 10:52 PM
ByteBuffer modified for getting memory usage information

Julien Vermillard added a comment - 13/Jan/06 10:54 PM
mistake I attached the files without any javadoc comments

Trustin Lee added a comment - 13/Jan/06 11:25 PM
Thanks for continuing contribution! :D

I feel like we'll have JMX support earlier than we expected thanks to your work.

Julien Vermillard added a comment - 13/Jan/06 11:27 PM
mistake : I used the hardcoded value 1 in place of MINIMUM_CAPACITY

Julien Vermillard added a comment - 14/Jan/06 02:11 AM
* bundled everything (except ByteBuffer patch)
* added ServiceRegistry manager (can list service and unbind specified ones per port or name)

Federico Bonelli added a comment - 22/Feb/06 01:35 AM
You have done a great work!
I really like this stuff!
Is this JMX integration already in some 0.9.x version?

Julien Vermillard added a comment - 22/Feb/06 06:17 PM
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).

peter royal added a comment - 15/May/06 12:51 AM
ThreadPoolFilterMBean committed to svn.

Trustin Lee added a comment - 15/May/06 06:45 AM
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.

Julien Vermillard added a comment - 08/Jun/06 09:58 PM
Added simple throughput analize : a thread, calculate the thoughput on the X millis seconds.
removed the stupids tabular datas

Julien Vermillard added a comment - 08/Jun/06 09:59 PM
how it's looking in JConsole

Trustin Lee added a comment - 08/Sep/06 04:51 AM
Now we've got a basic integration with JMX. We will continue improving this feature at the next unstable branch.