I am using Toplink in my project. While releasing the Unit of Work, we check for the null value. If not null, then we release the unit of work.
But, we do have isActive attribute for UOW, So, shall we check for this attribute before releasing UOW.
Currently, using below one
if (uow != null)
uow.release();
Shall we use this.
if (uow.isActive())
uow.release();
Which approach is correct one...
But, we do have isActive attribute for UOW, So, shall we check for this attribute before releasing UOW.
Currently, using below one
if (uow != null)
uow.release();
Shall we use this.
if (uow.isActive())
uow.release();
Which approach is correct one...