Was browsing ApacheDS DNS code and found this construct in
org.apache.directory.server.dns.DnsServer.java
public void start() throws IOException
{
RecordStore store = new JndiRecordStoreImpl(
getSearchBaseDn(), getSearchBaseDn(), getDirectoryService() );
if ( getDatagramAcceptor() != null )
{
DatagramAcceptorConfig udpConfig = new DatagramAcceptorConfig();
getDatagramAcceptor().bind( new InetSocketAddress(
getIpPort() ), new DnsProtocolHandler( this, store ), udpConfig );
}
if ( getSocketAcceptor() != null )
{
SocketAcceptorConfig tcpConfig = new SocketAcceptorConfig();
tcpConfig.setDisconnectOnUnbind( false );
tcpConfig.setReuseAddress( true );
getSocketAcceptor().bind( new InetSocketAddress(
getIpPort() ), new DnsProtocolHandler( this, store ), tcpConfig );
}
LOG.info( "DSN service started." );
System.out.println( "DSN service started." );
}
Got these queries
Q1. Using this construct, will we be able to receive TCP as well as
UDP traffic on the same port? or I am missing something
Q2. ApacheDS DNS implementation uses per session FilterChain (set in
IoHandler), based on the session transport. Is the understanding
correct that IOFilterChains are per session?
Can't the DNS and other protocol implementation in ApacheDS projects
be made subproject(s) in Apache MINA?
--
thanks
ashish
Blog: http://www.ashishpaliwal.com/blog
My Photo Galleries: http://www.pbase.com/ashishpaliwal