MINA is:
MINA uses Linux-like version numbers. There are currently two streams in MINA; 0.7 and 0.9:
Here are the general rules for choosing an appropriate release:
JDK 1.5 or above is required to build MINA. But MINA runs perfect with JDK 1.4 only if you don't use SSLFilter which uses Java 5 SSLEngine. This means JDK 1.5 or above is required for you to use SSL with MINA.
MINA depends on SLF4J (Simple Logging Facade for Java), a logging framework from the author of Log4J. SLF4J is very similar to Commons-Logging, but it doesn't cause any class loader issues at all. SLF4J provides bindings for Log4J, JDK 1.4 logging API, and NLog4J. Please put an appropriate SLF4J JAR file which corresponds to your favorite logging framework to the classpath as SLF4J documentation explains.
The primary source to get help is the documentation. Please take a look at Getting Started section.
You can also contact us via the mailing list or the support forum to ask questions on MINA or to contribute to it. Please do not send messages to the authors directly.
If you've found some problem in MINA, please report the bug using our bug reporting system. A step-by-step instruction to reproduce the bug or JUnit test case code is appreciated.
You can contribute anything related with MINA; examples, useful codecs for existing protocols, tutorials, feature improvements, bug fixes, benchmarks, and whatever. Please contact us via the mailing list or the support forum.
Yes. You can create both client and server applications with MINA. Please take a look at IoConnector and ProtocolConnector.
Yes. Please take a look at Reverser and HTTP server example.
Yes. Please take a look at SumUp example. There is also Apache ASN.1 project which provides ASN.1 codec for MINA.
Yes. MINA doesn't close any connections unless you called Session.close() or connection is closed by the remote peer.
Not yet. We're going to provide an easy way to implement TLS and SASL in version 0.9.
You don't need to do because all events generated by MINA are transmitted to your handlers in order, and the newer event is not processed if the event handler method for the older event for the same session didn't return yet because MINA uses leader-followers thread pool by default.
Virtually all kind of transport types. MINA API is designed to be transport-independent. You can implement any transport type support only if you can conform to MINA API. Support for Pre-1.4 I/O (aka BIO), reliable multicast, Java Communications API, and file I/O is planned.
Not yet. Java NIO doesn't support multicast yet. Multicast for NIO will be available in Java 6, Mustang. We are seriously considering to implement multicasts using pre-1.4 Java API.
Sessions are capable of custom attributes that users can add or remove at any time. These custom attributes are not shared between sessions; it is designed to store session specific information.
Please refer to DemuxingIoHandler (or DemuxingProtocolHandler). SumUp example demonstrates the usage.
Here is an example code:
Possibly it would be better to extract this code to a method like 'reconnect()' so that it can reusable in more than one place.
Filters (both IoFilter and ProtocolFilter) are usually considered reusable just like we think Servlet filters. Please implement commonly used business logic such as authorization and logging as a filter. In case you implement just complex multi-layer protocols like Kerberos, you could consider Apache Jakarta Commons Chain as an alternative.
JVM might have ran out of direct memory. Please try increasing maximum direct memory size using -XX:MaxDirectMemorySize option (e.g. -XX:MaxDirectMemorySize=128M)
Please check if you called ByteBuffer.flip() to flip the buffer before writing the buffer out? It is a common mistake NIO beginners make.