Re: Mina Threading

2008-12-15 Thread Emmanuel Lecharny
Stephane Rainville wrote: Oups !! And I keep thinking people should be more clear when they write :) I use MINA 2.0 M3 I'm not looking for a thread analysis The thread analysis will give you (and us) more information about the running threads. but a simple pointer of why I have more

Re: Concurrency Issues - MINA 1.1.7

2009-01-12 Thread Emmanuel Lecharny
Chris Warren wrote: Hi, I am new to MINA, and looking to apply it in a context where I need to build a synchronous TCP/IP socket server, to service volumes that are not very high at all in comparison to some of the applications quoted on the MINA website (e.g. our peak load is expected to be

Re: Creating socket connections in background?

2009-01-13 Thread Emmanuel Lecharny
can you post your netstat result ? (at leat, the connections related to MINA, not the full trace ;) On Tue, Jan 13, 2009 at 11:48 AM, Matthew McMahon macca...@hotmail.com wrote: Hi, I am new to Mina, and developing my first application. I began using 2.0.0-M3 and am now with 2.0.0-M4.

Re: Concurrency Issues - MINA 1.1.7

2009-01-13 Thread Emmanuel Lecharny
On Tue, Jan 13, 2009 at 1:01 PM, Chris Warren chris.war...@rdfgroup.com wrote: Thanks for your reply. I think I have solved the problem. It was rather embarrassingly simple - I had forgotten to close the MINA session after submitting the response, so presumably when JMeter attempted to

Re: Problem upgrading from M3 to M4

2009-01-13 Thread Emmanuel Lecharny
Yes. If you want to define your own logger, then you can do so pretty easily. Anyway, the loggingFilter is just a sample and very basic implementation of a Logger, and not something we are very happy about anyway. Just consider it as a terminal class (one you can't derive), copy/paste it and

Re: help me. !!!

2009-01-18 Thread Emmanuel Lecharny
Hi, First, regarding your mail's subject, I engage you to have a look at http://www.catb.org/~esr/faqs/smart-questions.html#bespecific MINA 2 Support for linux epoll?? As much as the underlying JVM support it. A quick googling gives you the answer :

Re: Update from M3 to M4 send timeout problems

2009-01-22 Thread Emmanuel Lecharny
Hi Ole, On Thu, Jan 22, 2009 at 2:15 PM, Ole Schaper o...@splitscreenstudios.com wrote: Since it seems that I am the only one with this problem, here is what I found out: 1. Does not happen using M3 2. Does only happen on Vista 3. Does happen no matter which tcp autotuning, chimney, rss,

Re: Update from M3 to M4 send timeout problems

2009-01-22 Thread Emmanuel Lecharny
On Thu, Jan 22, 2009 at 3:57 PM, Ole Schaper o...@splitscreenstudios.com wrote: Hi Emmanuel, and thank you so much for your answer, I compared the buffer sizes in M3 and M4, this is the result: M3: -- minReadBufferSize: 64

Re: Fwd: failure notice

2009-01-23 Thread Emmanuel Lecharny
Daniel Rossi wrote: This is embarrassing to be asking the list, but I've been trying to get off the mina list for a year, who is the maintainer of the list. I cannot get a confirmation email. I keep trying to send email but it won't return a confirmation please help. PLEASE HELP this is

Test unsubscription

2009-01-23 Thread Emmanuel Lecharny
bye Daniel Rossi ! (this is a test) -- -- cordialement, regards, Emmanuel Lécharny www.iktek.com directory.apache.org

[Travel Assistance] Applications for ApacheCon EU 2009 - Now Open

2009-01-23 Thread Emmanuel Lecharny
The Travel Assistance Committee is now accepting applications for those wanting to attend ApacheCon EU 2009 between the 23rd and 27th March 2009 in Amsterdam. The Travel Assistance Committee is looking for people who would like to be able to attend ApacheCon EU 2009 who need some financial

Re: MINA Questions

2009-01-23 Thread Emmanuel Lecharny
Falby, Walter wrote: Thanks for the information. One more question comes to mind. Does it matter what the client is? The clients will run on Windows using a FTP-like protocol and on z/OS using basic socket send/receive. MINA has no knowledge about the client. It just deal with sockets and

Re: MINA examples

2009-01-23 Thread Emmanuel Lecharny
Falby, Walter wrote: I found a link to MINA examples, http://mina.apache.org/report/1.1/mina-example/source-repository.html. But when I click on the link provided on the page, I get the 404 error message. Where are the examples and how can I access them? You can find them on

Re: SSL connection problem

2009-01-25 Thread Emmanuel Lecharny
Nathanael Van Vorst wrote: I have yet to resolve this issue. Any suggestions on how I might proceed with debugging and fixing this issue would be greatly appreciated! Hi, just a few suggestion : 1) create a JIRA, it's easier for everybody to follow it (and you can 'watch' it. Moreover,

ApacheCon EU 2009 registration is now open!

2009-01-29 Thread Emmanuel Lecharny
ApacheCon EU 2009 registration is now open! 23-27 March -- Mövenpick Hotel, Amsterdam, Netherlands http://www.eu.apachecon.com/ Registration for ApacheCon Europe 2009 is now open - act before early bird prices expire 6 February. Remember to book a room at the

Re: Running MINA on z/OS USS

2009-01-29 Thread Emmanuel Lecharny
Falby, Walter wrote: I'm trying to run one of the samples on USS. This is IBM's version of UNIX that runs on z/OS (mainframe). I've brought derby over and it works fine. I've compiled the Image request/response sample on USS using Java 5. I've copied over the jar files for MINA and SLF4J. I've

Re: Running MINA on z/OS USS

2009-01-29 Thread Emmanuel Lecharny
Falby, Walter wrote: I'm using MINA 1.1.7, Java 1.5, z/OS 1.9, log4j 1.1.15, slf4j 1.5.6. Have you tried with MINA 2.0.0-M4 ? -- -- cordialement, regards, Emmanuel Lécharny www.iktek.com directory.apache.org

Re: Running MINA on z/OS USS

2009-01-29 Thread Emmanuel Lecharny
Falby, Walter wrote: I switched to MINA 2.0.0-M4 and am getting compile errors I did not get with MINA 1.1.7. Things like mina.common and mina.util are not available. Yep, the API has changed. But the samples should work. -- -- cordialement, regards, Emmanuel Lécharny www.iktek.com

Re: DummySession.close(true) not notifying close listener

2009-02-12 Thread Emmanuel Lecharny
David Rosenstrauch wrote: I'm trying to add a close listener onto a session, and perform some processing after the session close is completed. i.e.: ... CloseFuture closeFuture = session.getCloseFuture(); closeFuture.addListener(new CloseSessionListener());

Re: DummySession.close(true) not notifying close listener

2009-02-12 Thread Emmanuel Lecharny
On Thu, Feb 12, 2009 at 7:32 AM, David Rosenstrauch dar...@darose.net wrote: I'm trying to add a close listener onto a session, and perform some processing after the session close is completed. i.e.: ... CloseFuture closeFuture = session.getCloseFuture();

Re: multiple protocols, multiple ports

2009-02-12 Thread Emmanuel Lecharny
On Thu, Feb 12, 2009 at 8:52 AM, Ashish paliwalash...@gmail.com wrote: Have a look at ApacheDS code, you may find something very similar over there. Right ! We use MINA 2.0 and handle LDAP, NTP, DNS, Kerberos and DHCP protocols. The idea is just to declare an acceptor for each of those

Re: DummySession.close(true) not notifying close listener

2009-02-12 Thread Emmanuel Lecharny
have you added a filter in the associated chain ? ?? See the end of my message: Ooops... Seems like I just looked at the code snippet. Could you post the complete code so that we can tets it ? Thanks ! -- Regards, Cordialement, Emmanuel Lécharny www.iktek.com

Re: MINA 2.0.0-M4 multi-threads problem

2009-02-18 Thread Emmanuel Lecharny
Hi, On Wed, Feb 18, 2009 at 11:49 AM, Patrizio Munzi patrizio.mu...@eris4.com wrote: Hi, A few months ago I've implemented a TCP client/server application using MINA 1.x. My application was multi-thread using Multi-Thread model and it used to work. These days I was trying to move it from

Re: MINA 2.0.0-M4 multi-threads problem

2009-02-18 Thread Emmanuel Lecharny
On Wed, Feb 18, 2009 at 2:49 PM, Patrizio Munzi patrizio.mu...@eris4.com wrote: It works right with a single thread. It looks like in multi-threads execution threads are stealing bytes from each other. If you use a OrderedThreadPoolExecutor, there is no way a thread can steal some bytes from

Re: MINA 2.0.0-M4 multi-threads problem

2009-02-18 Thread Emmanuel Lecharny
If I've understood well, that impossibility is related to another session's ByteBuffer, but I'm using a single session. I mean all my concurrent threads write on the same session object by means of write() method. Logically, one thread is associated with one session, that's the idea. If you

Re: MINA 2.0.0-M4 multi-threads problem

2009-02-18 Thread Emmanuel Lecharny
Logically, one thread is associated with one session, that's the idea. If you have more than one thread writing data in one single session, then yes, you may have problems... Emmanuel, I don't understand what you are saying. What I mean is that once the server receive a message, it

Re: MINA 2.0.0-M4 multi-threads problem

2009-02-23 Thread Emmanuel Lecharny
On Mon, Feb 23, 2009 at 10:28 AM, Maarten Bosteels mbosteels@gmail.com wrote: On Wed, Feb 18, 2009 at 11:04 PM, Emmanuel Lecharny elecha...@apache.orgwrote: Logically, one thread is associated with one session, that's the idea. If you have more than one thread writing data in one

Re: why thread model removed from mina 2.0

2009-02-23 Thread Emmanuel Lecharny
PARESH BHAVSAR wrote: any reason for removing thread model for mina 2.0 http://issues.apache.org/jira/browse/DIRMINA-322 -- -- cordialement, regards, Emmanuel Lécharny www.iktek.com directory.apache.org

Re: MINA 2.0.0-M4 multi-threads problem

2009-02-23 Thread Emmanuel Lecharny
Emmanuel Lecharny wrote: On Mon, Feb 23, 2009 at 10:28 AM, Maarten Bosteels mbosteels@gmail.com wrote: I strongly disagree. IoSession is declared to be thread-safe. See the javadoc [1]: I have to go back to the code. I have been away from it since last november, and it does

Re: Confusion about CumulativeProtocolDecoder

2009-02-25 Thread Emmanuel Lecharny
David Rosenstrauch wrote: So I'm wondering a few things: * Should this implementation of CumulativeProtocolDecoder be considered buggy (in that it causes different behavior when using DummySessions)? No. Use your own drafted Session class to make the decoder happy. Using a DummySession

Re: Confusion about CumulativeProtocolDecoder

2009-02-26 Thread Emmanuel Lecharny
David Rosenstrauch wrote: Ashish wrote: On a similar note, on your code snippet while (in.hasRemaining()) { ... decoder.decode(session, in, decoderOut); } call decode only when the message is complete. For each iteration calling this can be expensive. Something like

Re: Confusion about CumulativeProtocolDecoder

2009-02-26 Thread Emmanuel Lecharny
David Rosenstrauch wrote: Emmanuel Lecharny wrote: Again, in your case, using a DummySession is not a good idea. Point taken. That said, it looks like it's not actually going to be all that hard for my decoder to check for whether the transport allows fragmentation or not, and to code

Re: Confusion about CumulativeProtocolDecoder

2009-02-26 Thread Emmanuel Lecharny
David Rosenstrauch wrote: Cumulative decoder seems to be working out OK for me, once I adjusted the decoder to handle both cases (fragmented and non-fragmented data). So you are golden :) -- -- cordialement, regards, Emmanuel Lécharny www.iktek.com directory.apache.org

Re: File transfer

2009-03-02 Thread Emmanuel Lecharny
So you mean that just using IoBuffer (in direct mode I suppose) will do the job ? Great news ! But I'm not familiar with java buffers. Time to read Java NIO from Ron Hitchens ... So I'm trying to send a simple file to a server, and write it back to a file. The client side (that send the

Re: File transfer

2009-03-02 Thread Emmanuel Lecharny
Thomas Harning wrote: On Mar 2, 2009, at 2:33 PM, Emmanuel Lecharny wrote: You will create huge buffers. If your files are 2Gb big, it will suck up all your memory. Just split the file in small chunks, it works exactly the same way. Would it? I would think that the IO system would behave

Re: File transfer

2009-03-02 Thread Emmanuel Lecharny
Erix Yao wrote: How about directly transfer thee file? In MINA, after call session.write(file) , it will check whether the messsage you have written is a file and use fileChannel.transfterTo() to transfer the file. For the transmission of a File, you're right. I missed this option... -- --

Re: File transfer

2009-03-02 Thread Emmanuel Lecharny
Erix Yao wrote: After reading the source code of Mina, I found a lot of features that I didn't know before. I think somebody can write a documentation to uncover the usage of Mina. Sure ! And also add tests, Javadoc and samples :) Everone is very welcome to participate ! -- --

Re: SOS: how to post ?

2009-03-03 Thread Emmanuel Lecharny
as aj wrote: Hi, i can't send a post to us...@mina.apache.org. Its always detected as spam. What to do? apparently, this mail went through... -- -- cordialement, regards, Emmanuel Lécharny www.iktek.com directory.apache.org

Re: Connection reset by peer

2009-03-09 Thread Emmanuel Lecharny
Meeraj Kunnumpurath wrote: Hi, I have been using Mina for an embedded FTP to HTTP protocol translator and it has been working great. We have noticed intermittent connection reset errors occuring three or four times during the day. I was wondering anyone else has noticed this issue before ?RE:

Re: how can I run all the logic in the main thread?

2009-03-12 Thread Emmanuel Lecharny
Oscar wrote: hi all- To simplify the business-side code, I wanna run the messageReceived in the main thread. MINA is meant to handle asynchronous communications. If you want to manage messages synchronously, then use a Socket, and deal with all the burden of managing the incoming and

Re: jvm and cached iobuffer

2009-03-24 Thread Emmanuel Lecharny
Thomas Harning Jr. wrote: On Tue, Mar 24, 2009 at 1:25 PM, David Rosenstrauch dar...@darose.net wrote: John Franey wrote: The mina wiki mentions that automatic buffer resizing will be retracted. Boy, I hope not. That's a *hugely* useful feature. There's a number of cases in

Re: jvm and cached iobuffer

2009-03-25 Thread Emmanuel Lecharny
I've been using mina to implement an RTP endpoint. I think RTP streaming has a distinct traffic pattern. RTP is packet based. Packets arrive at a fixed period (10ms, 20ms, 30ms). So for a period of 20ms, that is an arrival rate of 50 packets per second. Currently, I'm testing with RTP

Re: non-blocking I/O

2009-03-25 Thread Emmanuel Lecharny
Babak Farhang wrote: Ack. That wasn't clear. Suppose we plan to expose a web service through MINA, and the typical dynamically generated response is about 100K. The response is to be served in non-blocking mode. I'm asking whether there's a way for me to chunk the output incrementally, say 10

Re: non-blocking I/O

2009-03-25 Thread Emmanuel Lecharny
Babak Farhang wrote: for ( int i = 0; i yourData.lengh; i+=1 ) { byte[] temp = new byte[10]; System.arrayCopy( yourData, i, temp, 0, 1); session.write( temp ); } If session.write(temp) doesn't block, then we might end up having written all 100K into memory before

Re: AsyncWeb

2009-04-03 Thread Emmanuel Lecharny
Erkin wrote: Hi All Hi, Thanks for developing asyncweb. I have a few question about it. 1) Is there any reason not to make it version 1.0.0? Well, we need some more committers to work on the project, I guess... 2) I found some information at

Re: Feasibility suggestion on using MINA for implementing server with HUGE heap size need

2009-04-06 Thread Emmanuel Lecharny
Karim, Sadat wrote: Hello, I am investigating MINA to implement a background server process that needs to hold millions of objects in memory. Every minute, a percentage of these objects needs to be recalculated (this is why we are keeping them in memory using coherence). I know there is a

Re: Cannot shutdown daemon over JMX after upgrade to MINA 2.0RC4

2009-04-07 Thread Emmanuel Lecharny
2009/4/7 Pavel Zdeněk pavel.zde...@gmail.com: Great, that was it, thanks. Where do i find this kind of crucial information? I didn't find it in changes between 2.x and 1.x neither in 2.0 Start Guides. On closer inspection, it is scattered in the example applications. That is, once you know

Re: One of the April commits has probably broken MINA

2009-04-09 Thread Emmanuel Lecharny
On Thu, Apr 9, 2009 at 5:04 PM, Serge Baranov se...@baranov.org.ru wrote: Hello Emmanuel, E Or maybe the foobar attribute is not anymore present in the session. That's was my suggestion in the very first mail. It can be null only if the order guaranteed by the OrderedThreadPoolExecutor is

Re: One of the April commits has probably broken MINA

2009-04-11 Thread Emmanuel Lecharny
Serge Baranov wrote: Hello Emmanuel, E Can you post the chain you are using ? acceptor.getFilterChain().addLast(firewall, blacklistFilter); acceptor.getFilterChain().addLast(executor, new ExecutorFilter(executor)); acceptor.getFilterChain().addLast(codec, new ProtocolCodecFilter(new

Re: SEDA reloaded?

2009-04-17 Thread Emmanuel Lecharny
FYI, AFAIK, Matt Welsh is not working anymore on this SEDA approach. This page seems to be interesting : http://www.eecs.harvard.edu/~mdw/proj/seda/ Now, as Alex and Ashish said, with an Executor, you can implement something close but with only one level of multiplexing. On Tue, Apr 14, 2009 at

Re: One of the April commits has probably broken MINA

2009-04-17 Thread Emmanuel Lecharny
Thanks a lot Serge ! I'll be back in one week. Feel free to ping me on the MINA ML next sunday. On Fri, Apr 17, 2009 at 1:39 AM, Serge Baranov se...@baranov.org.ru wrote: Follow-up: Reproduced the problem with a simple test case and attached it to

Re: [ANNOUNCE] Apache MINA 2.0.0-M5 released

2009-04-17 Thread Emmanuel Lecharny
On Fri, Apr 17, 2009 at 7:50 AM, Niklas Gustavsson nik...@protocol7.com wrote: On Fri, Apr 17, 2009 at 7:06 AM, Panda, Archanaa IN GGN SISL archanaa.pa...@siemens.com wrote: I must say that I am a little disappointed. I was expecting the release to be an RC. When is the RC release scheduled

Re: Mina 2 - Release Schedule

2009-04-27 Thread Emmanuel Lecharny
Scott Selikoff wrote: Hi All, Hi Scott, I noticed Mina 1.1.7 is listed as stable in the download section of the Mina web page, while Mina 2.0.0-M5 is listed as unstable. Any idea when Mina 2.0 might have a stable release? Has this been previously announced? 'Stable' and 'Unstable' have a

Re: Mina 2 - Release Schedule

2009-04-27 Thread Emmanuel Lecharny
Andres Martinez Quijano wrote: Just curious... I'm using MINA for 3 years now, I'm still using 1.1.7 basically because it works, and it works fine. I confess I'm not following the development of MINA 2.0. No problem :) That's good enough to know that you are using MINA for 3 years without

Re: Thread pool question

2009-04-28 Thread Emmanuel Lecharny
David Rosenstrauch wrote: David Rosenstrauch wrote: David Rosenstrauch wrote: Still, wouldn't it also make sense to have a thread pool on writes as well? That way once a message has been processed, the reader/processor thread can just dump the response message into a queue for output,

Re: mina 1.x or 2.x ?

2009-04-28 Thread Emmanuel Lecharny
Hi Oscar, On Tue, Apr 28, 2009 at 4:15 PM, Oscar ro4...@gmail.com wrote: hi guys, Our product which used mina 2.0.0-M4 will release in 1 month. Under the stress test, it performs good while transferring small packet ( 1k). I don't know whether it is so stable. It is stable, from the API

Re: Sendfile support for APR transport

2009-04-28 Thread Emmanuel Lecharny
Adam Brown wrote: Hi, Hi Adam, I've written some code to add code to AprIoProcessor.transferFile() that allows it to use APR's sendfile support. The changes are against the SVN trunk/ HEAD. Who or where should I send the patches for possible inclusion in future versions of MINA? The

Re: Thread pool question

2009-04-29 Thread Emmanuel Lecharny
Thanks for the detailed explanation, Emmanuel.  I actually understood most of this pretty well already, though, as I've been digging through the code quite extensively to try to understand what was going on. Hmmm... Sounds like we may have a new committer sooner or later ;) But a) if I'm

Re: Unbound thread growth...

2009-04-30 Thread Emmanuel Lecharny
boB Gage wrote: Hi again... I am working on an application that has to discover serial devices from a large set of known devices (each represented by their own collection of ProtocolHandler, CodecFactory, Encoders, and Decoders). In the process of doing this, I am running through a list of

Re: Unbound thread growth...

2009-05-04 Thread Emmanuel Lecharny
On Mon, May 4, 2009 at 5:23 PM, boB Gage bg...@ekosystems.com wrote: I think it was maintenance; and I didn't get back to it until just now.  The site's there now, but I don't see an Add Issue button and do not have a log in to use   So I'm still not sure what to do with this trace file.

Re: How Do I unsubscribe

2009-05-06 Thread Emmanuel Lecharny
http://mina.apache.org/mailing-lists.html Everything is on this page : follow the instructions. On Wed, May 6, 2009 at 4:48 PM, Tasneem Yusuf tasneem.yu...@gmail.comwrote: Hello All, someone please let me know how to unsubscribe. I've been trying to figure out a mail id but I

Re: same message object in messageReceived

2009-05-13 Thread Emmanuel Lecharny
Jun Dai wrote: Hi All, Our application is to put the message into a queue after getting it from handler's messageReceived method. But we found a fatal problem that the messageReceived method could pass the same message object in sequencially. For example, the first time messageReceived is

Re: memory leak? -- help needed

2009-05-14 Thread Emmanuel Lecharny
Yongxing Wang wrote: Gurus, hi, you should use a tool to determine if the memory leak you are experiencing is part of your own code. You have plenty of them out there : JProfiler, OptimizeIt, YourKit, ... This will give you some insight about the part of the code where this memory leak

Re: MINA newbie question(message gets chipped 5 or 6 bytes every time)

2009-05-14 Thread Emmanuel Lecharny
Erinc Arikan wrote: Hi, I just started working on MINA last week, I am trying to convert a gateway application to MINA - ACTIVEMQ project. I am really impressed the simplicity MINA brings. After this irrelevant introductory part, Here's my problem: My clients connect to the server using a tcp

Re: MINA newbie question(message gets chipped 5 or 6 bytes every time)

2009-05-15 Thread Emmanuel Lecharny
On Fri, May 15, 2009 at 4:38 PM, Erinc Arikan erincari...@gmail.com wrote: Thanks Emmanuel; Is this issue related to Nagle's Algorithm? No. Do I have to use ((SocketSessionConfig) connector.getSessionConfig()).setTcpNoDelay(false) No, certainly not ! to ensure that I will

Re: MINA newbie question(message gets chipped 5 or 6 bytes every time)

2009-05-15 Thread Emmanuel Lecharny
David Rosenstrauch wrote: Emmanuel Lecharny wrote: Be aware that you not only can receive a fragment, but may be - depending on your protocol - more than one message in the same PDU (ie you may receive 200 bytes, 2 times 78 bytes plus some more bytes associated with another message). You have

Re: Two NICs and Spring configuration

2009-05-20 Thread Emmanuel Lecharny
On Wed, May 20, 2009 at 4:53 PM, Shahbaz Khalid shahbaz.kha...@gmail.comwrote: Hi, We are trying to setup a custom MINA server (configured with spring) on a machine that has two Network cards. Which MINA version ? It's a windows 2003 server. When we start the server, it listens on

Re: Two NICs and Spring configuration

2009-05-21 Thread Emmanuel Lecharny
Shahbaz Khalid wrote: Further update to this message: We configured MINA using *:1235 , and also , since this machine also had Microsoft ISA Server, while using Microsoft ISA it's necessary to turn off Kernel IP Routing for services that don't bind to either interface, OR, that don't have an

Re: hi and help tcp recive

2009-05-24 Thread Emmanuel Lecharny
Pietro Guerrieri wrote: Someone can help me!?!? I have the BufferUnderflowException... how I can avoid!?!?! http://mina.apache.org/handling-packet-fragementation.html -- -- cordialement, regards, Emmanuel Lécharny www.iktek.com directory.apache.org

Re: ArrayIndexOutOfBoundsException and OutOfMemoryError: Exception

2009-05-25 Thread Emmanuel Lecharny
Arun Soman wrote: Hi I am getting the following exceptions MINA version ? -- -- cordialement, regards, Emmanuel Lécharny www.iktek.com directory.apache.org

Re: ArrayIndexOutOfBoundsException and OutOfMemoryError: Exception

2009-05-25 Thread Emmanuel Lecharny
Arun Soman wrote: Version: Mina 1.1.7 http://mina.apache.org/downloads.html And i am implementing ProtocolDecoder The exception you get is issued by your codec implementation : org.apache.mina.filter.codec.ProtocolDecoderException: ... at

Re: hi and help tcp recive

2009-05-25 Thread Emmanuel Lecharny
Again, this is because you assume that the buffer will contain all the data you want to read in it, whcih is not guaranteed bat the TCP protocol. You can perfectly receive the data byte by byte, each message containing only one byte of data. You have to deal with it in your decoder. --

Re: hi and help tcp recive

2009-05-25 Thread Emmanuel Lecharny
On Mon, May 25, 2009 at 3:07 PM, Pietro Guerrieri p.guerri...@gmail.comwrote: the problem is in doDecode for this tcp: 0135 http://mina.apache.org/contact.html i get [myAction]01 get [year] get [len-url]35 and if the buffer is empty i can't read le url because i don't have 35 byte

Re: multi incoming tcp

2009-05-26 Thread Emmanuel Lecharny
Pietro Guerrieri wrote: i have mina server that read tcp message. to this server there are two clients that send messages on the same port (55000) just a moment, i can explain my problem with an example in mina-2.0.0-M4 package there's the imagine tutorial at this

Re: ExecutorFilter Per Session Behavior

2009-05-26 Thread Emmanuel Lecharny
Christopher Popp wrote: Hello, I have an application making use of Mina 2.0.0 M5. I have an executor filter in my filter chain, after everything but the handler. Based on everything I read and saw in the forums, I'm expecting that it would make use of the OrderedThreadPoolExecutor. Am I

Re: memory leak? -- help needed

2009-05-27 Thread Emmanuel Lecharny
Yongxing Wang wrote: Sorry to get to you guys a little late on this issue, as it is not always easy to reproduce the problem. During this extensive performance testing and close monitoring, one thing I can tell for sure is that under heavy load, the memory pattern looks so much nicer if we

Re: Protocols supported by MINA

2009-05-28 Thread Emmanuel Lecharny
SUMIT SUREKA wrote: Hi Ashish, Thanks for the reply. TCP/IP was my mistake. Can you please let me know if it has the TELNET protocol in it. Not that I know. -- -- cordialement, regards, Emmanuel Lécharny www.iktek.com directory.apache.org

Re: How to catch java.nio.channels.UnresolvedAddressException ?

2009-05-28 Thread Emmanuel Lecharny
On Thu, May 28, 2009 at 12:47 PM, Alexander Christian a...@root1.de wrote: Hi guys, I have a small problem. I have the following part of code: ConnectFuture future = null; try { future = connector.connect(new InetSocketAddress(host, port)); } catch (Exception e){

Re: How to catch java.nio.channels.UnresolvedAddressException ?

2009-05-28 Thread Emmanuel Lecharny
On Thu, May 28, 2009 at 4:12 PM, Alexander Christian a...@root1.de wrote: Sorry, this does not work. Here's my changed sample code: 468: ConnectFuture future = null; 469: try { 470:future = connector.connect(new InetSocketAddress(host, port)); 471:

Re: Anybody tried example.sumup with M5 lately?

2009-05-29 Thread Emmanuel Lecharny
So, if i got a filter in the chain which actually works with the data (adds a message-independent header) and not just the transport/protocol metadata (like most of the example filters), it must explicitly skip those zero-size messages? Yep. As I said, the internal logic is flawed, as it uses

Re: java.io.IOException: Connection reset by peer problem

2009-06-02 Thread Emmanuel Lecharny
Hi, On Tue, Jun 2, 2009 at 5:20 AM, Conrad Congrene con...@abridge.com.au wrote: Hi everyone Anyway the problem is, I get the following exception every now and then (it seems randomly) and am not sure what is causing the exception to occur: java.io.IOException: Connection reset by peer The

Re: java.net.BindException: Address already in use

2009-06-02 Thread Emmanuel Lecharny
On Tue, Jun 2, 2009 at 1:47 PM, Zhijun Sheng zhijunsh...@hotmail.com wrote: Hi, Alex, Thank you!  But I think I used this line before and removed it later because I saw some posts in the forum saying that this is not necessary since a fix was made in mina. There is no fix in MINA to solve

Re: java.net.BindException: Address already in use

2009-06-02 Thread Emmanuel Lecharny
On Tue, Jun 2, 2009 at 2:03 PM, Zhijun Sheng zhijunsh...@hotmail.com wrote: A quick try on my dev server shows a big difference with the following line added (thx Alex!) nioSocketAcceptor.setReuseAddress(true); The addr already used problem is gone! I'll try it on the production server

Re: java.net.BindException: Address already in use

2009-06-02 Thread Emmanuel Lecharny
On Tue, Jun 2, 2009 at 2:26 PM, Zhijun Sheng zhijunsh...@hotmail.com wrote: Hi, Emmanuel, I did try to call IoSession.close(true) on all the current connections on my server and also for (int i = 0; i acceptors.length; i++) {    logger.info(running acceptor.unbind() ...);    

Re: java.net.BindException: Address already in use

2009-06-02 Thread Emmanuel Lecharny
On Tue, Jun 2, 2009 at 2:56 PM, Zhijun Sheng zhijunsh...@hotmail.com wrote: But NioSocketAcceptor.close(ServerSocketChannel handle) is protected not visible to me ... Grrr... Let me check the code later ! I'll be back :) -- Regards, Cordialement, Emmanuel Lécharny www.iktek.com

Re: How do I shutdown a MINA 2.0 server?

2009-06-02 Thread Emmanuel Lecharny
Adam Brown wrote: I'm trying to modify our server to allow a message to cause it to clean up and exit. Currently, I've got code in our IoHandler that receives the message and cleans up 'everything else', but when I try to unbind() the IoAcceptor, the thread exits and leaves the connection

Re: How do I shutdown a MINA 2.0 server?

2009-06-02 Thread Emmanuel Lecharny
On Tue, Jun 2, 2009 at 10:18 PM, Adam Brown acbatw...@gmail.com wrote: Thanks, David.  Having a listener on the CloseFuture solved the problem for me.  Now everything shuts down cleanly. I'm pretty sure it would be better to define a way to programatically shutdown the server without having to

Re: How do I shutdown a MINA 2.0 server?

2009-06-03 Thread Emmanuel Lecharny
On Wed, Jun 3, 2009 at 7:52 AM, David Rosenstrauch dar...@darose.net wrote: On Tue, June 2, 2009 6:46 pm, Emmanuel Lecharny wrote: On Tue, Jun 2, 2009 at 10:18 PM, Adam Brown acbatw...@gmail.com wrote: Thanks, David.  Having a listener on the CloseFuture solved the problem for me.  Now

[ANNOUNCE] Apache MINA 2.0.0-M6 released

2009-06-03 Thread Emmanuel Lecharny
The Apache MINA project team is proud to announce the new Milestone of Apache MINA version 2.0.0-M6, a bug fix release. Apache MINA is a network application framework which helps users develop high performance and high scalability network applications easily by providing an abstract,

Re: Bug in DefaultIoFuture.awaitUninterrruptibly()

2009-06-04 Thread Emmanuel Lecharny
Steve Crane wrote: Hi there, Good catch !!! DefaultIoFuture.awaitUninterrruptibly() calls await0(Log.MAX_VALUE, false) which does: long endTime = System.currentTimeMillis() + timeoutMillis; i.e., long endTime = System.currentTimeMillis() + Long.MAX_VALUE; This comes out

Re: Bug in DefaultIoFuture.awaitUninterrruptibly()

2009-06-04 Thread Emmanuel Lecharny
Forgot to ask you to create a JIRA for tracability sake, if you don't mind. Thanks ! Steve Crane wrote: Hi there, DefaultIoFuture.awaitUninterrruptibly() calls await0(Log.MAX_VALUE, false) which does: long endTime = System.currentTimeMillis() + timeoutMillis; i.e., long

Re: Bug in DefaultIoFuture.awaitUninterrruptibly()

2009-06-04 Thread Emmanuel Lecharny
Steve Crane wrote: I created an account at your JIRA but couldn't find a way to create a ticket :-( Could not be easier ! Once you are connected ( https://issues.apache.org/jira/secure/IssueNavigator.jspa ), on the top menu, select Create New Issue, then on the two drop down list, select

Re: Bug in DefaultIoFuture.awaitUninterrruptibly()

2009-06-04 Thread Emmanuel Lecharny
Steve Crane wrote: Huh, I guess I wasn't logged in properly before. FYI it's DIRMINA-717. Many thanks ! I will commit the patch asap. -- -- cordialement, regards, Emmanuel Lécharny www.iktek.com directory.apache.org

Re: Bug in DefaultIoFuture.awaitUninterrruptibly()

2009-06-04 Thread Emmanuel Lecharny
王正航 wrote: This bug was found by a Chinese java community long time age: http://mislay.javaeye.com/blog/348338. We don't poll the 235 000 000 web sites each month to see if someone has post a message about a MINA problem. We do that only once a year ;). Seriously, JIRA is the place to fill

Re: Logging filter oddity

2009-06-05 Thread Emmanuel Lecharny
boB Gage wrote: Hi, Hi, I am working on a MINA-based application that communicates with a wide variety of manufacturers' devices, some are serial, others use socket connections.All have been designed to be transport-transparent, allowing us to simulate devices and specific situations via

Re: SSHD status

2009-06-06 Thread Emmanuel Lecharny
Pete Torgenrud wrote: I'm looking for a replacement for the ganymed/trilead SSH client library and I came across MINA SSHD in the Sun Java forums. I've been fiddling with SSHD and it seems to work as a client, but I couldn't find a lot of info on how seriously this is being developed. (The

Re: SSHD status

2009-06-07 Thread Emmanuel Lecharny
Guillaume, I just upgraded SSHd to MINA-2.0.0-M6. Tests are passing OK so far. Guillaume Nodet wrote: As Emmanuel said, the community around this project is still small. You'd be very welcome if you want to join. On the release topic, I think we really need to do one asap as a few projects

Re: Network Application Compatability

2009-06-07 Thread Emmanuel Lecharny
On Sun, Jun 7, 2009 at 10:42 AM, Arunkumar S.arunkumars@adcb.com wrote: Hi      I am going to start new java voice chat. I am searching new framework for socket programming.      Just now I heard about mina. Is this framework suitable for voice chat application? Main part of my

Re: HTTPS ?

2009-06-08 Thread Emmanuel Lecharny
On Mon, Jun 8, 2009 at 11:23 AM, Sandra Bogaertsandra.boga...@gmail.com wrote: Hi, I'm working on the developpement of a HTTP Server and I'm looking for a solution to implement HTTPS connection with JDK1.4 . I read that SSLFilter is disponible with JDK 1.5. Do you have any technical solution

Re: Network Application Compatability

2009-06-08 Thread Emmanuel Lecharny
On Mon, Jun 8, 2009 at 2:06 PM, arunssoftarunkumars@adcb.com wrote: Hi Friend Thanks for your valuable reply . ok . now i am going to write simple test program for transmitting voice using mina . after that let you know . i have one more doubt, is encoding and decoding

<    1   2   3   4   5   6   >