Session currentSession = acquireBindAndConfigureSession();
Session currentSession = acquireAndBindSession();
    private SessionStatus newOrRestoredSession(MethodInvocation invocation)            throws HibernateException    {        SessionStatus status = sessions.get(invocation.getThis());    	Session previousSession = ! isSessionBoundToThread() ? null :     		sessionBoundToThread();        // a session is currently running.        // something has gone wrong (e.g. with cleanup) abort!        if ( previousSession != null )        {        		String msg = "Dirty Hibernate Session "        			+ sessionBoundToThread() + " found in Thread "        			+ Thread.currentThread();		        sessionBoundToThread().close();		        resetThreadSession();		        throw new InternalException(msg);        }     	    	// we may or may not be in a session, but if we haven't yet bound     	// it to This, then we need to.        else if (status == null || !status.session.isOpen())        {            Session currentSession = acquireBindAndConfigureSession();            status = new SessionStatus( currentSession );            sessions.put(invocation.getThis(), status);        }         // the session bound to This is already currently being called. abort!        else if (status.calls > 1)        {            throw new InternalException(                    "Hibernate session is not re-entrant.\n" +                    "Either you have two threads operating on the same " +                    "stateful object (don't do this)\n or you have a " +                    "recursive call (recurse on the unwrapped object). ");        }                // all is fine.        else {            debug("Binding and reconnecting session.");            bindSession(status.session);            reconnectSession(status.session);        }        // It's ready to be used. Increment.        status.calls++;        return status;    }