improved code in EjbConnector class