Forums Register Login

Releasing Unit Of Work

+Pie Number of slices to send: Send
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...
+Pie Number of slices to send: Send
Either is probably ok, but first checking isActive() is more correct.
+Pie Number of slices to send: Send
Thanks James..
Tomorrow is the first day of the new metric calendar. Comfort me tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 866 times.
Similar Threads
Creating threads in EJB
Toplink API
Problem with method
Toplink Cache removing on delete objects from database manually
How to get request scope attribute values thru HttpUnit
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 05:50:12.