Skip to content

Commit

Permalink
added some logging to debug
Browse files Browse the repository at this point in the history
  • Loading branch information
basejump authored and sronderos committed Apr 18, 2013
1 parent ab6a1d0 commit 0747502
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ class MultiTenantService {
*/
def doWithTenantId(Integer tenantId, Closure callback) {
Integer oldTenantId = currentTenant.get()
if(log.debugEnabled) log.debug "doWithTenantId oldTenantId - $oldTenantId"
hibernateTemplates.withNewSession {
hibernateTemplates.withTransaction(PROPAGATION_REQUIRES_NEW) {
try {
currentTenant.set(tenantId)
if(log.debugEnabled) log.debug "doWithTenantId runin with tenant - $tenantId"
callback.call()
} finally {
currentTenant.set(oldTenantId)
Expand Down

0 comments on commit 0747502

Please sign in to comment.