added more null checks
imporved java doc
increased sleep time for retrying to get a meaningfull txn status.
small perfomance improvment by only retrieving EntityManger once
do not pass fields as parameter to private methods