document.setUserLock(subject);
// Make token persistant
txnManager = brokerPool.getTransactionManager();
txn = txnManager.beginTransaction();
broker.storeMetadata(txn, document);
txnManager.commit(txn);
if (LOG.isDebugEnabled()) {
LOG.debug("Successfully retrieved token");
}