write close

2007-03-16 Thread Jannie Pieterse
Hi, Im using mina-1.0.2. I trying to write something and then close after as follow: public void SendBle() { ioSession.write("My Message").addListener(new closeSessionFuture(taskFuture)); } private final class closeSessionFuture implements IoFutureListener { private TaskFuture taskFutur

ProtocolDecoderAdapter and session-state.

2007-03-16 Thread Nordin, Glenn
Hi! I have two questions about Apache MINA 1.0 . 1. Is it possible to store state for incomplete reads in ProtocolDecoderAdapter without mixing state from different sessions, if I always create a new instance (prototype) of the ProtocolDecoder in ProtocolCodecFactory.getDecoder method? In

Re: ProtocolDecoderAdapter and session-state.

2007-03-16 Thread Niklas Therning
Nordin, Glenn wrote: > Hi! > > I have two questions about Apache MINA 1.0 . > > 1. Is it possible to store state for incomplete reads in > ProtocolDecoderAdapter without mixing state from different sessions, > if I always create a new instance (prototype) of the ProtocolDecoder > in ProtocolCod

Re: Mina 2.0?

2007-03-16 Thread Stanczak Group
Don't use one. Jamie Bisotti wrote: On 3/14/07, Stanczak Group <[EMAIL PROTECTED]> wrote: Still getting the same thing. I'm using this "svn checkout http://svn.apache.org/repos/asf/mina/trunk mina" to download the trunk. Is that correct? Then I setup my PATH with mvn and JAVA_HOME with my jdk

Do I need to save back a modified Integer attribute?

2007-03-16 Thread Coding Horse
I have a quick question about storing a stateful Integer as a session attribute. This attribute "sequenceNumber" of type Integer holds an increasing sequence number. Do I need to save it back with session.setAttribute("sequenceNumber", new Integer(theModifiedIntValue)) after I modify it? I th

Re: example.proxy problem in mina 1.1

2007-03-16 Thread Keith McNeill
I sorted out the problem. Which took quite awhile...but I'll get to that later. The problem was that in: org.apache.mina.example.proxy.AbstractProxyIoHandler: public void sessionClosed( IoSession session ) throws Exception { if( session.getAttachment() != null ) {

Re: example.proxy problem in mina 1.1

2007-03-16 Thread Niklas Therning
Keith McNeill wrote: > I sorted out the problem. Which took quite awhile...but I'll get to > that later. The problem was that in: > > org.apache.mina.example.proxy.AbstractProxyIoHandler: > > public void sessionClosed( IoSession session ) throws Exception >{ >if( session.getAttachment

[jira] Created: (DIRMINA-357) ConcurrentHashMap.put(key, null) throws an NPE effects BaseIOSession attachments/attributes

2007-03-16 Thread keith mcneill (JIRA)
ConcurrentHashMap.put(key, null) throws an NPE effects BaseIOSession attachments/attributes --- Key: DIRMINA-357 URL: https://issues.apache.org/jira/browse/DIRMINA-357

Re: Do I need to save back a modified Integer attribute?

2007-03-16 Thread peter royal
On Mar 16, 2007, at 7:46 AM, Coding Horse wrote: I have a quick question about storing a stateful Integer as a session attribute. This attribute "sequenceNumber" of type Integer holds an increasing sequence number. Do I need to save it back with session.setAttribute("sequenceNumber", new Int

[jira] Created: (DIRMINA-358) default implementation of exceptionCaught in IOHandlerAdapter eats exceptions

2007-03-16 Thread keith mcneill (JIRA)
default implementation of exceptionCaught in IOHandlerAdapter eats exceptions - Key: DIRMINA-358 URL: https://issues.apache.org/jira/browse/DIRMINA-358 Project: MINA

Re: ProtocolDecoderAdapter and session-state.

2007-03-16 Thread Maarten Bosteels
Hi Niklas, I am reading the mina mailing list since about a year, but this is the first time I see a recommendation to keep the ProtocolDecoder implemantation stateless. I prefer to create a new decoder per session and keep the decoder state in the decode. Sound OO-principle says : store the stat

Re: write close

2007-03-16 Thread Maarten Bosteels
Hi Jannie (or Phil) On 3/16/07, Jannie Pieterse <[EMAIL PROTECTED]> wrote: Hi, Im using mina-1.0.2. I trying to write something and then close after as follow: public void SendBle() { ioSession.write("My Message").addListener(new closeSessionFuture(taskFuture)); } private final class closeSe

Re: ProtocolDecoderAdapter and session-state.

2007-03-16 Thread James Im
Even if you use a ProtocolDecoder per session you have to synchronized the state as it is accessed by different threads. Aand it doesn't matter if there will be no simultaneous access on the object. It is a visibility issue: that a change made by one thread will be visible by another thread. If I'