jzib.jar ---exception not threw while using CompressionFilter
when I used mina, I tried compress my data by CompressionFilter, but when I published my program, I missed jzib.jar in the classpath, but no exception was threw ,it just coulnd't transform data with servers. Thus ,I suggest while missing it, some exception to be threw maybe a better way . By the way, when some filter were added to chain, who can tell me how to order them ? now ,I can take some followings : compress --ssl --log. -- View this message in context: http://www.nabble.com/jzib.jarexception-not-threw-while-using-CompressionFilter-tf4611738s16868.html#a13170009 Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.
MINA TCP/IP server clustering
Hi Has anyone got any experience with clustering MINA servers at a JVM level? How can we replicate IoSessions? Would Terracotta be a good choice? Any lead or tips will be greatly appreciated? Regards Arul *** CAUTION: This email and files included in its transmission are solely intended for the use of the addressee(s) and may contain information that is confidential and privileged. If you receive this email in error, please advise us immediately and delete it without copying the contents contained within. Woolworths Limited (including its group of companies) do not accept liability for the views expressed within or the consequences of any computer viruses that may be transmitted with this email. The contents are also subject to copyright. No part of it should be reproduced, adapted or transmitted without the written consent of the copyright owner. ***
Re: You guys know that the build of mina fails, rite?
you may have the source code checked out of the trunk, but that does not mean that it is up to date ;) On 10/12/07, Frederick Haebin Na [EMAIL PROTECTED] wrote: http://svn.apache.org/repos/asf/mina/trunk/core Well, my eclipse says that the sources of the mina core and subprojects are from the above directory. (/trunk) I suppose I am doing something wrong, but I solved the problem by refactoring ByteBuffer to IoBufer in all the subprojects in the Mina directory. (Oh, I also disabled some test cases for the UDP related stuffs.) 2007/10/12, Mark [EMAIL PROTECTED]: you might want to take another look at your stuff. This cutover to IoBuffer from ByteBuffer was done a few days ago and I do not believe this problem you describe exists in the trunk. I am at subversion revision 584039. On 10/11/07, Frederick Haebin Na [EMAIL PROTECTED] wrote: Due to the ByteBuffer to IoBuffer refactoring, mina-filter-codec-http mina-protocol-http-client builds fail. I try to commit the changes but it seems that the svn commit requires a permission. Could you guys refactor the other repos as well as the mina core? -- The adjuration to be normal seems shockingly repellent to me; I see neither hope nor comfort in sinking to that low level. I think it is ignorance that makes people think of abnormality only with horror and allows them to remain undismayed at the proximity of normal to average and mediocre. For surely anyone who achieves anything is, essentially, abnormal. Dr. Karl Menninger -- The adjuration to be normal seems shockingly repellent to me; I see neither hope nor comfort in sinking to that low level. I think it is ignorance that makes people think of abnormality only with horror and allows them to remain undismayed at the proximity of normal to average and mediocre. For surely anyone who achieves anything is, essentially, abnormal. Dr. Karl Menninger
Re: Move MINA SM to Trunk
Julien Vermillard wrote: Hi, I'm playing a little with MINA SM (State Machine) from Niklas sandbox it's a very nice SM implementation and quite useful for server/protocol implementation. I think it's time to move it in trunk as a new module. WDYT ? +1
Re: WSDL on MINA?
Eero Nevalainen wrote: Has someone implemented WSDL (Web Services Description Language) on top of MINA? I think you would be better served using something like XFire in conjunction with MINA rather than trying to implement WSDL specifically for MINA. -Mike
Re: You guys know that the build of mina fails, rite?
Make sure you have the latest code and do a clean build. Everything is working fine for me. After ByteBuffer to IoBuffer change, I had to do a clean build though. -Mike Frederick Haebin Na wrote: http://svn.apache.org/repos/asf/mina/trunk/core Well, my eclipse says that the sources of the mina core and subprojects are from the above directory. (/trunk) I suppose I am doing something wrong, but I solved the problem by refactoring ByteBuffer to IoBufer in all the subprojects in the Mina directory. (Oh, I also disabled some test cases for the UDP related stuffs.) 2007/10/12, Mark [EMAIL PROTECTED]: you might want to take another look at your stuff. This cutover to IoBuffer from ByteBuffer was done a few days ago and I do not believe this problem you describe exists in the trunk. I am at subversion revision 584039. On 10/11/07, Frederick Haebin Na [EMAIL PROTECTED] wrote: Due to the ByteBuffer to IoBuffer refactoring, mina-filter-codec-http mina-protocol-http-client builds fail. I try to commit the changes but it seems that the svn commit requires a permission. Could you guys refactor the other repos as well as the mina core? -- The adjuration to be normal seems shockingly repellent to me; I see neither hope nor comfort in sinking to that low level. I think it is ignorance that makes people think of abnormality only with horror and allows them to remain undismayed at the proximity of normal to average and mediocre. For surely anyone who achieves anything is, essentially, abnormal. Dr. Karl Menninger
Re: ByteBuffer capacity shrinks with every new connection
Interesting. Is there a way to override this behavior? For example, with DNS you will often receive messages that are 512 bytes or less. But you would always want the buffer to be ready to accept at least 512 bytes. With DNS extensions messages of 2048 bytes or more can be sent/received. Rob - Original Message From: Trustin Lee [EMAIL PROTECTED] To: dev@mina.apache.org Sent: Friday, October 12, 2007 6:24:09 AM Subject: Re: ByteBuffer capacity shrinks with every new connection On 10/12/07, pingvishal [EMAIL PROTECTED] wrote: Hello All, am facing this strange issue of the socket's receiving Bytebuffer capacity reducing into half (start from 4096) with every new connection .. i have a SocketConnector and am using a ProtocolCodec (tried using a CumulativeProtocolDecoder but with same result). what am i missing and Is there any way i can handle this in my program ? With every new connection? You mean with every new message? If it decreases for every new connection, it's a bug. However, if it's for every new message received, it's a normal behavior. MINA automatically adjusts the buffer capacity per read, and the capacity will decrease to the half if the amount of bytes received is too small. Please clarify if it's for every new connection or message. Trustin -- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP Key ID: 0x0255ECA6 Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase. http://farechase.yahoo.com/
ByteBuffer capacity shrinks
Hello All, am facing this strange issue of the socket's receiving Bytebuffer capacity reducing into half (start from 4096) with each request/response. (For ex. i start with 4096 capacity, recv a message-send a message back, when i receive again, its reduced to half ..) i have a SocketConnector and am using a ProtocolCodec (tried using a CumulativeProtocolDecoder but with same result). what am i missing and Is there any way i can handle this in my program ? Thanks, vishal -- View this message in context: http://www.nabble.com/ByteBuffer-capacity-shrinks-tf4612562s16868.html#a13172536 Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.
Move MINA SM to Trunk
Hi, I'm playing a little with MINA SM (State Machine) from Niklas sandbox it's a very nice SM implementation and quite useful for server/protocol implementation. I think it's time to move it in trunk as a new module. WDYT ? Julien
Re: ByteBuffer capacity shrinks with every new connection
On 10/12/07, pingvishal [EMAIL PROTECTED] wrote: Hello All, am facing this strange issue of the socket's receiving Bytebuffer capacity reducing into half (start from 4096) with every new connection .. i have a SocketConnector and am using a ProtocolCodec (tried using a CumulativeProtocolDecoder but with same result). what am i missing and Is there any way i can handle this in my program ? With every new connection? You mean with every new message? If it decreases for every new connection, it's a bug. However, if it's for every new message received, it's a normal behavior. MINA automatically adjusts the buffer capacity per read, and the capacity will decrease to the half if the amount of bytes received is too small. Please clarify if it's for every new connection or message. Trustin -- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP Key ID: 0x0255ECA6
Re: Move MINA SM to Trunk
On 10/12/07, Julien Vermillard [EMAIL PROTECTED] wrote: Hi, I'm playing a little with MINA SM (State Machine) from Niklas sandbox it's a very nice SM implementation and quite useful for server/protocol implementation. I think it's time to move it in trunk as a new module. WDYT ? +1 Cheers, Trustin -- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP Key ID: 0x0255ECA6
Re: MINA TCP/IP server clustering
Kumaran Arul wrote: Hi Has anyone got any experience with clustering MINA servers at a JVM level? How can we replicate IoSessions? Would Terracotta be a good choice? Any lead or tips will be greatly appreciated? A google with the keywords load balancing terracotta confirmed my earlier understanding http://www.terracotta.org/confluence/display/wiki/Load+Balancers That is, Terracotta shares all data between the machines so it therefore doesn't do load balancing. Of course if you are looking for something else than load balancing, Terracotta might do what you want. It all depends on what you want to achieve with the clustering. -Eero
Re: IoSocketConnector max connection
liquidchen wrote: So, if I just want to control the max connection number to the remote site, what will be the best solution to do this?? Use IoFilter to control it?? But I dont want to close new incoming connection if max connection number reach, I just want to block it to wait connection release for a while, thanks for any suggestion... Could you just use java.util.concurrent.Semaphore? -Mike
Re: Reusing SocketConnector
chihiro wrote: My requirement is simple: 1) Object =read from a queue (ConcurrentLinkedQueue) 2) Connect to a remote server via MINA and transmit the Object. In one of the previous posts, Trustin mentioned that one could just reuse the SocketConnector if one were connecting to the same host. Being a newbie to MINA: a) Is it ok for me to reuse the SocketConnector in each thread but just pass in a different IoHandler to connect( ... ) ? b) What does the handler.multiton package give me ? Are there samples on how to use it ? c) I'm starting a new Thread whenever a new item is dequeued. Is this a wise move ? a) I don't see anything in the MINA API for specifying an IoHandler when calling connect(...) but this might be a good feature to add. b) handler.multiton routes message to different handlers based on the class type of the messages received. c) I don't see why you would want to start a new thread since everything in MINA is done asynchronously and MINA uses it's own threads for IO. Perhaps you could elaborate on why you're doing this. -Mike
Re: MINA TCP/IP server clustering
I wrote an implementation of GCache (Geronimo Cache) that is in the Geronimo sandbox. Its a clustering implementation based on Mina. Its nto complete yet, but it gives you an idea. It is not JVM level, since it API based. If you are looking for an open source impl for a JVM based clustering container, have a look at Terracotta. Jeff Kumaran Arul wrote: Hi Has anyone got any experience with clustering MINA servers at a JVM level? How can we replicate IoSessions? Would Terracotta be a good choice? Any lead or tips will be greatly appreciated? Regards Arul *** CAUTION: This email and files included in its transmission are solely intended for the use of the addressee(s) and may contain information that is confidential and privileged. If you receive this email in error, please advise us immediately and delete it without copying the contents contained within. Woolworths Limited (including its group of companies) do not accept liability for the views expressed within or the consequences of any computer viruses that may be transmitted with this email. The contents are also subject to copyright. No part of it should be reproduced, adapted or transmitted without the written consent of the copyright owner. ***
[jira] Created: (DIRMINA-456) Provide mechanism for flushing writeBuffer from IoHandler.messageReceived
Provide mechanism for flushing writeBuffer from IoHandler.messageReceived - Key: DIRMINA-456 URL: https://issues.apache.org/jira/browse/DIRMINA-456 Project: MINA Issue Type: Improvement Components: Core Affects Versions: 2.0.0-M1 Reporter: Mike Heath Fix For: 2.0.0-M1 As described in this thread http://tinyurl.com/3cwkb3, we need to provide support for flushing the session's write queue from the IoHandler.messageRecieved() method. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
Re: ByteBuffer capacity shrinks with every new connection
Hi, its for every new message received (ignore my prev mail .. i did some check to post this again) .. however, whats happening is .. the server has dispatched the entire packet and i dont receive it that way .. (the packet sizes are really small .. abt 200 bytes .. and the ByteBuffer capacity goes down to 64 bytes :| ) how should i be tackling this ? store all the incoming chunks in my own object (CumulativeProctocolDecoder) or is there a better way ? vishal Trustin Lee wrote: On 10/12/07, pingvishal [EMAIL PROTECTED] wrote: Hello All, am facing this strange issue of the socket's receiving Bytebuffer capacity reducing into half (start from 4096) with every new connection .. i have a SocketConnector and am using a ProtocolCodec (tried using a CumulativeProtocolDecoder but with same result). what am i missing and Is there any way i can handle this in my program ? With every new connection? You mean with every new message? If it decreases for every new connection, it's a bug. However, if it's for every new message received, it's a normal behavior. MINA automatically adjusts the buffer capacity per read, and the capacity will decrease to the half if the amount of bytes received is too small. Please clarify if it's for every new connection or message. Trustin -- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP Key ID: 0x0255ECA6 -- View this message in context: http://www.nabble.com/ByteBuffer-capacity-shrinks-tf4612562s16868.html#a13174647 Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.
TCP Sockets missing responses
Hi MINA comunity! I'm having a strange problem with TCP Sockets. I'm connecting to a server to exchange messages (this exchange is asynchronous), I'm using encoders and decoders to translate between these strings and my objects. I have a MINA client inside an EAR, running on a JBoss 4.0.2. When I try to connect from my computer it works just fine: the conection is established and the messages flows in both ways (client-server / server-client), but when I try to do the same from the UAT server it does NOT work. I can't receive messages from the server, and apparently, messages are getting to the server a little bit different, they get with a different length (yes, I know this may sound strange but this is what I'm seeing). I tryed to isolate the problem by removing JBoss and MINA. So, this is what I did: a) a simple socket program that connects to the server WITHOUT MINA and JBOSS. This sometimes work and sometimes not. (I'm sending the same message over and over again). I ran this program from my computer and from the server. b) a simple MINA client that does the same thing: send the same message. This works OK from my computer and FROM THE SERVER. This client is the same that I use from within my EAR. I don't see a difference between running my MINA client as a stand alone application or as a part of my EAR. Any clues? Is there a reason for the different behaviour between the plain socket program and the program that uses my MINA client? TIA, Gustavo Damián Campo. -- View this message in context: http://www.nabble.com/TCP-Sockets-missing-responses-tf4614733s16868.html#a13178881 Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.
Synchronisation in protocol codec
Hi folks, this is a newbie question .. wanted to confirm how messages get sent out when push from multiple threads. Does the text line protocol Codec synchronize them? My understanding from reading the code that it does, but I might have missed something. Right now my code is saying the same thing.. basically, it doesn't release the monitor until a full textline is pushed through the protocol codec. Is that correct? -- View this message in context: http://www.nabble.com/Synchronisation-in-protocol-codec-tf4616401s16868.html#a13184160 Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.
Is this right? The default number of the I/O processor threads is 1.
According to the help on http://mina.apache.org/configuring-thread-model.html it says that the default number is one. However, I always get 16. I can't even figure out how to make it one thread. Is that supposed to say it starts at one and grows to 16? The suggest is to based it on the number of cores. For the life of me, however, I can not make this work: IoAcceptor acceptor = new SocketAcceptor(4, Executors.newCachedThreadPool()); Any examples I can look at? Cheers, Blaze. -- View this message in context: http://www.nabble.com/Is-this-right--%22The-default-number-of-the-I-O-processor-threads-is-1.%22-tf4616430s16868.html#a13184235 Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.
Re: TCP Sockets missing responses
I've seen this type of thing when I don't read all the data in the NIO buffers all the time, across message boundaries. I personally use state machines for all my decoding, and you really need to make sure you read all available data and store it (in my case in whatever message reading state I'm in). Basically, it's easy to forget about the NIOness of message reading -- the fact that partial data can come in at any time and the fact that you always have to read all available data when it's available. A bit of a shot in the dark, but my bugs along these lines generally have something to do with the above. These types of things are also sometimes hard to catch because they can depend on load, like TCP buffers filling up to increase the chances of partial messages getting sent -- make sure you read all messages (one or more) when you get incoming data. Good luck! -Adam On 10/12/07, Gustavo [EMAIL PROTECTED] wrote: Hi MINA comunity! I'm having a strange problem with TCP Sockets. I'm connecting to a server to exchange messages (this exchange is asynchronous), I'm using encoders and decoders to translate between these strings and my objects. I have a MINA client inside an EAR, running on a JBoss 4.0.2. When I try to connect from my computer it works just fine: the conection is established and the messages flows in both ways (client-server / server-client), but when I try to do the same from the UAT server it does NOT work. I can't receive messages from the server, and apparently, messages are getting to the server a little bit different, they get with a different length (yes, I know this may sound strange but this is what I'm seeing). I tryed to isolate the problem by removing JBoss and MINA. So, this is what I did: a) a simple socket program that connects to the server WITHOUT MINA and JBOSS. This sometimes work and sometimes not. (I'm sending the same message over and over again). I ran this program from my computer and from the server. b) a simple MINA client that does the same thing: send the same message. This works OK from my computer and FROM THE SERVER. This client is the same that I use from within my EAR. I don't see a difference between running my MINA client as a stand alone application or as a part of my EAR. Any clues? Is there a reason for the different behaviour between the plain socket program and the program that uses my MINA client? TIA, Gustavo Damián Campo. -- View this message in context: http://www.nabble.com/TCP-Sockets-missing-responses-tf4614733s16868.html#a13178881 Sent from the Apache MINA Support Forum mailing list archive at Nabble.com .