Re: How to properly synchronize external code with MINA

2008-06-23 Thread Yigal Rachman
oyal wrote: On May 27, 2008, at 3:27 PM, Yigal Rachman wrote: I asked about this in February and have managed to move ahead without a proper solution. However, I am seeing glitches that point to synchronizing problems, so I would greatly appreciate any help that you could offer me. To recap

How to properly synchronize external code with MINA

2008-05-27 Thread Yigal Rachman
thus far. It is much slicker than mina 1, and is working very well for us. Thank you all for such a super piece of work. Best regards, Yigal Yigal Rachman wrote: Hi, Mark: Thank you for your rapid response - I really appreciate it. Here is a distilled example of the kind of thing I have to

Re: How to receive UDP broadcast datagrams?

2008-02-28 Thread Yigal Rachman
ot; + session.getLocalAddress()); } }); // the magic ingredient - set *just the port* log.debug("binding listener to wildcard address + port " + ipPort); acceptor.bind(new InetSocketAddress(ipPort)); Hope this is of use to someone. Thanks again for a super

How to receive UDP broadcast datagrams?

2008-02-28 Thread Yigal Rachman
different ways to do it, but have not yet figured it out. In particular, I do not know how to set up a DataGramAcceptor to do this. I would welcome any help / suggestions that you may have. Thank you, Yigal Rachman

Re: [Fwd: Mina 2 problem - InvalidMarkException in java.nio.Buffer] - further thoughts

2008-02-26 Thread Yigal Rachman
clearer... On Mon, Feb 25, 2008 at 6:51 PM, Yigal Rachman <[EMAIL PROTECTED]> wrote: Hi, Folks: I am thinking that the synchronizing bug is almost certainly in my application code. Said application uses the Timer class to invoke some asynchronous processing. The methods

[Fwd: Mina 2 problem - InvalidMarkException in java.nio.Buffer] - further thoughts

2008-02-25 Thread Yigal Rachman
ensure that another thread does not conflict with a Mina thread, how do I synchronize it? Yigal Rachman --- Begin Message --- Hi, Folks: I am biting the bullet and porting to Mina 2.0.0-M1. Thus far, I seem to have resolved all the changes without much pain. I love the look of the revised Mina

Mina 2 problem - InvalidMarkException in java.nio.Buffer

2008-02-25 Thread Yigal Rachman
all for your continuing help. Yigal Rachman

Re: Can i use MINA to develop a telnet client that will communicate with exsiting SunOS telnet server?

2008-02-19 Thread Yigal Rachman
Thanks, Islam.  This is most helpful. Yigal islam alnaggar wrote: On 2/19/08, Yigal Rachman <[EMAIL PROTECTED]> wrote: Hello, All: I am wondering whether anyone has written a Telnet client since this post. If so, I would be very interested in finding out more about it

Re: Can i use MINA to develop a telnet client that will communicate with exsiting SunOS telnet server?

2008-02-18 Thread Yigal Rachman
Hello, All: I am wondering whether anyone has written a Telnet client since this post. If so, I would be very interested in finding out more about it. TIA, Yigal Rachman nickylba wrote: I am developing an application that will send "telnet"requests to different servers with exis

Re: [jira] Closed: (DIRMINA-460) ByteBuffer getString() confused after CharacterCodingException

2007-10-17 Thread Yigal Rachman
Issue Type: Bug Components: Core Affects Versions: 1.0.6, 1.1.3 Reporter: Trustin Lee Priority: Minor Fix For: 1.1.4, 1.0.7 Yigal Rachman wrote: When ByteBuffer.getString() breaks midway because of a CharacterCodingException, it fails to restore the

Re: ByteBuffer getString() confused after CharacterCodingException

2007-10-16 Thread Yigal Rachman
Hi, Trustin: Yep - I just installed mina 1.1.2, and ByteBuffer now passes the test. Thanks again for the swift help. Yigal Yigal Rachman wrote: Hi, Trustin: I ran your test case on my system and had the following error (which is actually different from what I am seeing

Re: ByteBuffer getString() confused after CharacterCodingException

2007-10-16 Thread Yigal Rachman
am running mina 1.0.1 - maybe it is time to upgrade, eh? Thank you for your help, Yigal Trustin Lee wrote: On 10/16/07, Yigal Rachman <[EMAIL PROTECTED]> wrote: Hi, Folks: When ByteBuffer.getString() breaks midway because of a CharacterCodingException, it fails to restore

Re: ByteBuffer getString() confused after CharacterCodingException

2007-10-16 Thread Yigal Rachman
Trustin Lee wrote: On 10/16/07, Yigal Rachman <[EMAIL PROTECTED]> wrote: Hi, Folks: When ByteBuffer.getString() breaks midway because of a CharacterCodingException, it fails to restore the position and limit; thus getString() is destructive when this happens. One can, of cou

ByteBuffer getString() confused after CharacterCodingException

2007-10-15 Thread Yigal Rachman
Hi, Folks: When ByteBuffer.getString() breaks midway because of a CharacterCodingException, it fails to restore the position and limit; thus getString() is destructive when this happens. One can, of course, work around this, but it should not be necessary. Yigal Rachman

Re: [jira] Commented: (DIRMINA-454) Trivial denial of service in TextLineDecoder

2007-10-15 Thread Yigal Rachman
Hi, Folks: Another thing with this problem:  once the buffer has exceeded the maximum line length, the decoder stops recognizing the termination sequence, and is therefore doomed anyway.  Is there some elegant way to reject the offending line and start over? Yigal Rachman Owen Jacobson

Re: How to get MINA to detect a lost connection?

2007-08-21 Thread Yigal Rachman
Hi, Trustin: Yes, I used it to solve my problem and it works *great* - just a few lines of code to solve the whole thing! Again, thanks to everyone for all the helpful suggestions. Yigal Trustin Lee wrote: On 8/16/07, Yigal Rachman <[EMAIL PROTECTED]> wrote: Thanks to

Re: How to get MINA to detect a lost connection?

2007-08-15 Thread Yigal Rachman
Thanks to all of you who responded so quickly and reminded me that the problem is with TCP and sockets, not MINA. It looks as if I will need to use the idle timer after all.. Best regards, Yigal Yigal Rachman wrote: Hi, Folks: I have an instrument driver that is built on MINA. During

Re: How to get MINA to detect a lost connection?

2007-08-15 Thread Yigal Rachman
trol.  The instrument expects to be left alone while it is doing its job. I was hoping that MINA has some way to detect the loss of the connection, as happens with "normal" socket programming. Yigal mat wrote: https://issues.apache.org/jira/browse/DIRMINA-354 On 8/16/07, Yigal Rachman <[

How to get MINA to detect a lost connection?

2007-08-15 Thread Yigal Rachman
connection is ever lost, the driver continues to think it is connected because MINA does not close the session. Any ideas how I can get this to work properly? Thanks in advance, Yigal Rachman DMAS Data Acquisition Developer NEPTUNE Canada University of Victoria, Victoria, BC, Canada

Re: How to deal with dynamically changing line terminators?

2007-08-13 Thread Yigal Rachman
uffer.allocate(in.remaining()); buffer.setAutoExpand(true); } buffer.put(in); return this; } } protected abstract boolean isTerminator(byte b); protected abstract DecodingState finishDecode(ByteBuffer product, ProtocolDecoderOutput out) throws Exception; } On 8/13/07,

Re: How to deal with dynamically changing line terminators?

2007-08-13 Thread Yigal Rachman
sed to it, but it works well. The "ConsumeToDynamicTerminatorDecodingState" helper class will do exactly what you want. You would need to write a fair bit of custom state machine code for your protocol going this route, but I think it's worth it. http://docs.safehaus.org/display/ASYNCW

Re: How to deal with dynamically changing line terminators?

2007-08-13 Thread Yigal Rachman
te, but I think it's worth it. http://docs.safehaus.org/display/ASYNCWEB/Home -Adam On 8/9/07, Yigal Rachman <[EMAIL PROTECTED]> wrote: Hi, Folks: I have a MINA client that acts as a driver for a scientific instrument. The communication is via a serial link using ASCII. The m

How to deal with dynamically changing line terminators?

2007-08-09 Thread Yigal Rachman
for commands). Could you please suggest a design pattern that would do this elegantly in MINA? I expect it will use the TextLineCodec and possibly some other filters, but I am fuzzy on the details. Best regards, Yigal Rachman DMAS Data Acquisition Developer NEPTUNE Canada Universit

Re: mina-sm: other options?

2007-05-28 Thread Yigal Rachman
excellent examples.  IMHO, I believe we could benefit greatly from studying it to get a deeper grasp of the concepts and seeing how / whether to incorporate these in mina-sm. Best regards, Yigal Niklas Therning wrote: Yigal Rachman wrote: Hi, Folks: Yesterday my first MINA-based

mina-sm: other options?

2007-05-25 Thread Yigal Rachman
d thus far. CHSM is a pre-compiler, which may make it more awkward to use than direct java. However, I suspect that there may be a way to rework it to use java directly, in the spirit of mina-sm. Comments, anyone? Yigal Rachman Instrument Data Acquisition Developer NEPTUNE Canada www.neptunecanada.ca

Re: How do I limit a MINA server to accept just one connection? - solution looks promising...

2007-02-14 Thread Yigal Rachman
Wow - what a fast and informative bunch of responses! I have built a quick prototype incorporating all your suggestions and it seems to work the way I want it to. Thank you all, Yigal

How do I limit a MINA server to accept just one connection?

2007-02-13 Thread Yigal Rachman
ction closed by foreign host" message instead of the "connection refused" message I would prefer to see. I would be grateful for any suggestions on how to achieve this. Thank you, Yigal Rachman DMAS Data Acquisition Developer NEPTUNE Canada University of Victoria,