Actually.......just thinking, i dont see where you are keeping hold of the original write
lock or am i not seeing something
T1 gets write lock
T2 waits for lock
T1 Throws exception
T2 acquires lock
T2 throws exception
T1 kicks off re-initialisation of component
T3 acquires lock
T3 writes but doesnt read
T1 successfully restarted connection
T2 starts re-init process (Now T2 never executed while T1 was re-init)
T3 reads.......
I dont see where you are holding the original write lock, i dont think you can release it
until you have cleaned up the socket or are you keeping a hold of the lock somewhere that
i dont see?? As soon as you throw the IOException you loose your writeLock and if thats
the case the next thread can step in and use the in and out streams while the previous
thread re-creates them!!
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4201864#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...