Send the message name array to java to prevent access violations
Synchronize the shutdown hooks