improved code at EjbConnector class