VIII - When sending very large messages, I need to make sure the server will not overuse
the remoting connection running out of memory, so I've changed the ServerSide flow
control to use a Semaphore instead of a AtomicInt.
As the messages are chunked, I acquire the packetSize (or chunkSize) from
availableCredits. When running out of credit ServerConsumerImpl will just wait until more
credits are returned from the client.
As far as I can see, in regular cases Semaphore is as performant as AtomicInteger (look at
the JDK implementation/ Sync class). And as I needed the chunk to wait on the credits I
have made this change for now.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4184982#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...