Introduction
APR (Apache Portable Runtime) provide superior scalability, performance, and better integration with native server technologies. APR transport is supported by MINA. In this section, we shall touch base upon how to use APR transport with MINA. We shall the Time Server example for this.
Pre-requisite
APR transport depends following components
APR library - Download/install appropriate library for the platform from http://www.apache.org/dist/tomcat/tomcat-connectors/native/
JNI wrapper (tomcat-apr-5.5.23.jar) The jar is shipped with release
Put the native library in PATH
Using APR Transport
Refer Time Server example for complete source
Lets see how NIO based Time server implementation looks like
Lets see how to use APR Transport
We just change the NioSocketAcceptor to AprSocketAcceptor. That's it, now our Time Server shall use APR transport.
Rest complete process remains same.