Connecting Java to Cache Database