[jboss-user] [Remoting] - Re: Socket timeout exception handler

ron.sigal@jboss.com do-not-reply at jboss.com
Thu Jul 16 18:19:26 EDT 2009


There's no built in listener facility (except in the context of callbacks from the server to the client).

However, if you want to have some fun, you could write a custom SocketFactory that creates custom Sockets that return custom SocketInputStreams.  You would want to configure the SocketFactory with a listener that can be called by the custom SocketInputStreams.  To read about configuring Remoting with custom SocketFactories, take a look at Section "5.7. Socket factories and server socket factories" of the Remoting Guide at http://www.jboss.org/jbossremoting/docs/guide/2.5/html/index.html.

How you would inject the listener into the SocketFactory depends on the context.  If you're running in the Application Server, you could use MBeans (or POJOs if you're using AS 5).  If you're running outside the AS, you could do it programmatically.

If you like this idea and need more pointers, let me know.

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4244181#4244181

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4244181



More information about the jboss-user mailing list