@Override public <T> ContextualInstance<T> get(BeanIdentifier id) { ContextualInstance<T> instance = super.get(id); if (instance == null && isAttached()) { String prefixedId = getNamingScheme().prefix(id); instance = cast(getAttribute(prefixedId)); } if (resetHttpSessionAttributeOnBeanAccess && instance != null){ put(id, instance); } return instance; }
@Override protected Object getAttribute(String prefixedId) { HttpSession session = getSession(false); if (session != null) { return session.getAttribute(prefixedId); } return null; }
@Override public <T> ContextualInstance<T> get(BeanIdentifier id) { ContextualInstance<T> instance = super.get(id); if (instance == null && isAttached()) { String prefixedId = getNamingScheme().prefix(id); instance = cast(getAttribute(prefixedId)); } if (resetHttpSessionAttributeOnBeanAccess && instance != null){ put(id, instance); } return instance; }
@Override protected Object getAttribute(String prefixedId) { HttpSession session = getSession(false); if (session != null) { return session.getAttribute(prefixedId); } return null; }
@Override public <T> ContextualInstance<T> get(BeanIdentifier id) { ContextualInstance<T> instance = super.get(id); if (instance == null && isAttached()) { String prefixedId = getNamingScheme().prefix(id); instance = cast(getAttribute(prefixedId)); } if (resetHttpSessionAttributeOnBeanAccess && instance != null){ put(id, instance); } return instance; }
@Override protected Object getAttribute(String prefixedId) { HttpSession session = getSession(false); if (session != null) { return session.getAttribute(prefixedId); } return null; }
protected Iterator<String> getAttributeNames() { HttpSession session = getSession(false); if (session == null) { return emptyIterator(); } else { return new EnumerationIterator<String>(session.getAttributeNames()); } }
@Override protected void setAttribute(String key, Object instance) { HttpSession session = getSession(true); if (session != null) { session.setAttribute(key, instance); ContextLogger.LOG.addedKeyToSession(key, this.getSession(false).getId()); } else { ContextLogger.LOG.unableToAddKeyToSession(key); } }
@Override protected void setAttribute(String key, Object instance) { HttpSession session = getSession(true); if (session != null) { session.setAttribute(key, instance); ContextLogger.LOG.addedKeyToSession(key, this.getSession(false).getId()); } else { ContextLogger.LOG.unableToAddKeyToSession(key); } }
protected Iterator<String> getAttributeNames() { HttpSession session = getSession(false); if (session == null) { return emptyIterator(); } else { return new EnumerationIterator<String>(session.getAttributeNames()); } }
@Override protected void removeAttribute(String key) { HttpSession session = getSession(false); if (session != null) { session.removeAttribute(key); ContextLogger.LOG.removedKeyFromSession(key, this.getSession(false).getId()); } else { ContextLogger.LOG.unableToRemoveKeyFromSession(key); } }
@Override protected void setAttribute(String key, Object instance) { HttpSession session = getSession(true); if (session != null) { session.setAttribute(key, instance); ContextLogger.LOG.addedKeyToSession(key, this.getSession(false).getId()); } else { ContextLogger.LOG.unableToAddKeyToSession(key); } }
protected Iterator<String> getAttributeNames() { HttpSession session = getSession(false); if (session == null) { return emptyIterator(); } else { return new EnumerationIterator<String>(session.getAttributeNames()); } }
@Override protected void removeAttribute(String key) { HttpSession session = getSession(false); if (session != null) { session.removeAttribute(key); ContextLogger.LOG.removedKeyFromSession(key, this.getSession(false).getId()); } else { ContextLogger.LOG.unableToRemoveKeyFromSession(key); } }
@Override protected void removeAttribute(String key) { HttpSession session = getSession(false); if (session != null) { session.removeAttribute(key); ContextLogger.LOG.removedKeyFromSession(key, this.getSession(false).getId()); } else { ContextLogger.LOG.unableToRemoveKeyFromSession(key); } }
return lockStore; HttpSession session = getSession(false); if(session == null) { lockStore = new LockStore(); CURRENT_LOCK_STORE.set(lockStore); try { session = getSession(true); } finally { CURRENT_LOCK_STORE.remove();
return lockStore; HttpSession session = getSession(false); if(session == null) { lockStore = new LockStore(); CURRENT_LOCK_STORE.set(lockStore); try { session = getSession(true); } finally { CURRENT_LOCK_STORE.remove();
return lockStore; HttpSession session = getSession(false); if(session == null) { lockStore = new LockStore(); CURRENT_LOCK_STORE.set(lockStore); try { session = getSession(true); } finally { CURRENT_LOCK_STORE.remove();