Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 97911 invoked from network); 6 Sep 2005 15:51:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 6 Sep 2005 15:51:35 -0000 Received: (qmail 38426 invoked by uid 500); 6 Sep 2005 15:51:34 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 38366 invoked by uid 500); 6 Sep 2005 15:51:34 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 38352 invoked by uid 99); 6 Sep 2005 15:51:34 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Sep 2005 08:51:34 -0700 X-ASF-Spam-Status: No, hits=-9.2 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME,URIBL_SBL X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 06 Sep 2005 08:51:46 -0700 Received: (qmail 97879 invoked by uid 65534); 6 Sep 2005 15:51:31 -0000 Message-ID: <20050906155131.97878.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r279025 - in /directory/network/trunk: project.xml xdocs/faq.fml xdocs/navigation.xml Date: Tue, 06 Sep 2005 15:51:30 -0000 To: commits@directory.apache.org From: trustin@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: trustin Date: Tue Sep 6 08:51:25 2005 New Revision: 279025 URL: http://svn.apache.org/viewcvs?rev=279025&view=rev Log: Reflected the changes in branches/0.7 into trunk. Added: directory/network/trunk/xdocs/faq.fml Modified: directory/network/trunk/project.xml directory/network/trunk/xdocs/navigation.xml Modified: directory/network/trunk/project.xml URL: http://svn.apache.org/viewcvs/directory/network/trunk/project.xml?rev=279025&r1=279024&r2=279025&view=diff ============================================================================== --- directory/network/trunk/project.xml (original) +++ directory/network/trunk/project.xml Tue Sep 6 08:51:25 2005 @@ -157,6 +157,7 @@ maven-jdepend-plugin maven-simian-plugin maven-tasklist-plugin + maven-faq-plugin Added: directory/network/trunk/xdocs/faq.fml URL: http://svn.apache.org/viewcvs/directory/network/trunk/xdocs/faq.fml?rev=279025&view=auto ============================================================================== --- directory/network/trunk/xdocs/faq.fml (added) +++ directory/network/trunk/xdocs/faq.fml Tue Sep 6 08:51:25 2005 @@ -0,0 +1,341 @@ + + + + + + + General + + + What does MINA mean? + +

+ MINA is: +

    +
  • an acronym for 'Multipurporse Infrastructure for Network + Applications'
  • +
  • A girl's name
  • +
  • 'South' in Japanese
  • +
+

+
+
+ + + Which version of MINA should I use? + +

+ MINA uses Linux-like version numbers. There are currently two + streams in MINA; 0.7 and 0.9: +

    +
  • 0.7 is the first public release of MINA.
  • +
  • 0.8 is the official stable release of 0.7.
  • +
  • 0.9 has richer features and cleaner API than 0.8.
  • +
  • 1.0 is the official stable release of 0.9
  • +
+

+

+ Here are the general rules for choosing an appropriate release: +

    +
  • Prefer the latest release with even version numbers to with + odd ones.
  • +
  • Try the latest release with odd version numbers if there are + missing features in the stable release.
  • +
+

+
+
+ + + What is required to build/run MINA? + +

+ 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. +

+
+
+ + + How can I get help? + +

+ 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. +

+
+
+ + + How / What can I contribute? + +

+ 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. +

+
+
+
+ + + Can MINA ...? + + + + Can I use MINA to create client applications? + + +

+ Yes. You can create both client and server applications with MINA. + Please take a look at IoConnector and + ProtocolConnector. +

+
+
+ + + + Can MINA handle text protocols such as HTTP? + + +

+ Yes. Please take a look at Reverser and HTTP server example. +

+
+
+ + + + Can MINA handle complex binary protocols such as LDAP? + + +

+ Yes. Please take a look at SumUp example. + There is also Apache ASN.1 project which provides ASN.1 codec for MINA. +

+
+
+ + + + Can I implement protocols that keeps connection alive with MINA? + + +

+ Yes. MINA doesn't close any connections unless you called + Session.close() or connection is closed by the remote peer. +

+
+
+ + + + Does MINA support TLS and SASL out-of-the-box? + + +

+ Not yet. We're going to provide an easy way to implement TLS + and SASL in version 0.9. +

+
+
+ + + + Do I need to make IoHandler and ProtocolHandler thread-safe? + + +

+ 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. +

+
+
+ + + + What transport types can MINA support except TCP/IP and UDP/IP? + + +

+ 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. +

+
+
+ + + + Does MINA support multicast? + + +

+ Not yet. Java NIO doesn't support multicast yet. Multicast for NIO + will be available in Java 5, Mustang. We are seriously considering + to implement multicasts using pre-1.4 Java API. +

+
+
+
+ + + How do I ...? + + + + How can I store session-specific information? + + +

+ 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. +

+
+
+ + + + How can I separate an event handler into multiple handlers when I + implement complex business logic? + + +

+ Please refer to DemuxingIoHandler (or DemuxingProtocolHandler). + SumUp example + demonstrates the usage. +

+
+
+ + + + How can I reconnect to server after my client session is closed. + + +

+ Here is an example code: + +public void sessionClosed( ProtocolSession session ) throws Exception +{ + // Wait for five seconds before reconnecting; you'll have to perform + // reconnection in other thread if you're using MINA 0.7 or 0.8. + // (You don't need to do if you're using MINA 0.9 or above.) + Thread.sleep( 5000 ); + + // Reconnect. + connector.connect( session.getRemoteAddress(), this ); +} + +

+

+ Possibly it would be better to extract this code to a method like + 'reconnect()' so that it can reusable in more than one place. +

+
+
+ + + + When should I implement my protocol handler using filters? + + +

+ 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. +

+
+
+ + + + How can I detect when the remote peer doesn't send a response message + for my request message? + + + You can't use sessionIdle event simply here. You'll have to + use java.util.Timer and java.util.TimerTask (or + OpenSymphony Quartz + as an alternative). Schedule a timeout task to be executed on timeout + situation for each request message, and cancel it when you receive the + corresponding response message. + + +
+ + + Troubleshooting + + + + I get response timeout and connection reset under heavy load. + + +

+ JVM might have ran out of direct memory. Please try increasing + maximum direct memory size using -XX:MaxDirectMemorySize + option (e.g. -XX:MaxDirectMemorySize=128M) +

+
+
+ + + + No data is writtin out to the session even if the buffer is not empty. + + +

+ Please check if you called ByteBuffer.flip() to flip + the buffer before writing the buffer out? It is a common mistake + NIO beginners make. +

+
+
+
+
+ Modified: directory/network/trunk/xdocs/navigation.xml URL: http://svn.apache.org/viewcvs/directory/network/trunk/xdocs/navigation.xml?rev=279025&r1=279024&r2=279025&view=diff ============================================================================== --- directory/network/trunk/xdocs/navigation.xml (original) +++ directory/network/trunk/xdocs/navigation.xml Tue Sep 6 08:51:25 2005 @@ -20,8 +20,10 @@ + +