Seems like strange error. Are you writing something right before you
call session.close()? Could you post your code maybe?
/Niklas
J2EE Professional wrote:
right..i am doing that only...but i get the following exception when i do
session.close()
java.lang.IllegalStateException: Write requests must be transformed to class org.apache.mina.common.ByteBuffer:
should i just catch this exception or is my approach (of doing session.close()) an incorrect way of closing sessions ??
Niklas Therning <[EMAIL PROTECTED]> wrote: Hi,
You could implement your own IoFilter which keeps track of the number of
open connections and then refuses anymore connections when the threshold
has been reached. In your IoFilter you increment the counter everytime
sessionOpened is called and decrement the counter everytime
sessionClosed is called. If sessionOpened is called and the threshold
has been reached you just close the new session at once.
HTH
/Niklas
J2EE Professional wrote:
i am keeping a tab on the number of opened connections...why i reach a
threshold value i should forcefully close any more connections...how to do this
?
---------------------------------
To help you stay safe and secure online, we've developed the all new Yahoo!
Security Centre.
---------------------------------
Yahoo! 360° NEW – Your one place to blog, create, publish & share!