java configuration version of connection