newOrRestoredSession(invocation);
status = newOrRestoredSession(invocation); status.session.setFlushMode( FlushMode.MANUAL );
    private Object doStateful(MethodInvocation invocation) throws Throwable    {        Object result = null;        try        {            newOrRestoredSession(invocation);            result = invocation.proceed();            return result;        }        catch (Throwable e)        {            e.printStackTrace();            throw e;        }        finally        {            try {                if (isCloseSession(invocation))                {                    closeSession();                }                else                {                    disconnectSession();                }            } catch (Exception e) {                                debug("Error while closing/disconnecting session.");                            } finally {                resetThreadSession();                // Everything successfully turned off. Decrement.                if (sessions.containsKey(invocation.getThis()))                {                    sessions.get(invocation.getThis()).calls--;                }            }        }    }