Optimized EJB client connection speed + fixed some NPE