WFLY-3772 Implement graceful shutdown for JCA

What is the purpose of these operations?