Hello all,

I just started using the Spring integration package
for Mina 0.9.4 and ran into a problem.  It seems as
though the DatagramAcceptor doesn't make use of the
DatagramAcceptorConfig properly because any filters in
the config are not used.

To confirm this was not a spring specific problem I
re-implemented all the configuration in code.  Please
see below:

IoAcceptor datagramAcceptor = new DatagramAcceptor();
IoAcceptor socketAcceptor = new SocketAcceptor();
        
DefaultIoFilterChainBuilder fcBuilder = new
DefaultIoFilterChainBuilder();
fcBuilder.addLast("LOGGER", new LoggingFilter());
fcBuilder.addLast("CODEC", new ProtocolCodecFilter(new
MyCodecFactory()));
        
DatagramAcceptorConfig datagramConfig = new
DatagramAcceptorConfig();
datagramConfig.setFilterChainBuilder(fcBuilder);
        
SocketAcceptorConfig socketConfig = new
SocketAcceptorConfig();
socketConfig.setFilterChainBuilder(fcBuilder);        
       

socketAcceptor.bind(new InetSocketAddress( PORT ), new
MyProtocolHandler(), socketConfig);
datagramAcceptor.bind(new InetSocketAddress( PORT ),
new MyProtocolHandler(), datagramConfig); 

As you can see the same DefaultIoFilterChainBuilder is
being used for both the SocketAcceptor and the
DatagramAcceptor.  The SocketAcceptor works fine and
all filters and the codec are invoked.  The
DatagramAcceptor does nothing and no filters are
invoked.  If I manually register the filters in the
MyProtocolHandler.sessionCreated method everything
works fine.  But I'd rather control these using the
acceptorConfigs.

Is this a bug?

Thanks
Rob

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to