Hello.  I've started playing around with storing data as attributes in the 
session object.  That's really useful.  :-)  And you had suggested storing the 
string that comes through in the session as a session attribute.  What I'm 
wondering is if there might be a more efficient way to do this.  When a session 
gets a received message, the messagereceived method receives both the session 
and an object containing the message.  Is that object already part of the 
session, or was it already extracted?  If it is still inside the session, maybe 
I can save myself the step of copying it to an attribute in the session.

Thanks,
Michael



----- Original Message ----
> From: Emmanuel Lcharny <[email protected]>
> To: [email protected]
> Sent: Mon, January 25, 2010 4:23:05 PM
> Subject: Re: supporting multiple clients with MINA
> 
> Michael Clifford a écrit :
> > Awesome!  Thanks!  So then is it proper to handle this by using the session 
> > as 
> a key?
> > 
> > ie. Let's say I wanted to save the contents of each input message in a 
> > string, 
> one string per session, so that I can then parse the strings using my 
> application's internal protocol.  
> Why don't you implement the protocol as a filter ? Then your application will 
> receive a complete valid and decoded message, and no need to do that matching.
> > Then I could create a hashmap with the session as the key, and return the 
> appropriate string from that hashmap to concatenate the appropriate input 
> string 
> to, and then my internal handlers would do whatever I need to do with those 
> strings.
> >  
> if you decide to do that, then store the String in the session, as an 
> attribute.




Reply via email to