Proper close code for jsr356 handling