SearchSession#isOpen() in the javabean mapper

Description

Session activity information is missing. This is very important if the previously opened session was opened by another code fragment in the same transaction. Elsewhere, the same session is accessed without knowing if a session shutdown was programmatically performed before.

The fix would be to add a "boolean active()" field to the "SearchSession" api.


Environment

None

Activity

Show:
Yoann Rodière
April 20, 2021, 11:12 AM

This is not a bug, it’s a feature request. I changed the issue type accordingly.

Maybe name the new method isOpen(), to be consistent with the wording of the close() method? That would also be more consistent with EntityManager#isOpen.

But sure, feel free to submit a PR.

Waldemar Kłaczyński
April 20, 2021, 10:46 AM
Edited

It is useful if in several places of the code it is checked whether the session has already been used in the transaction and has not been closed:


Fixed

Assignee

Waldemar Kłaczyński

Reporter

Waldemar Kłaczyński