fix(java): preserve sessions on dataset checkout (#8650)