Author: ehillenius Date: Mon Aug 27 14:14:04 2007 New Revision: 570246 URL: http://svn.apache.org/viewvc?rev=570246&view=rev Log: logger was defined as protected and used in a sub class. that must have been a mistake
Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/AbstractHttpSessionStore.java wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/SecondLevelCacheSessionStore.java Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/AbstractHttpSessionStore.java URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/AbstractHttpSessionStore.java?rev=570246&r1=570245&r2=570246&view=diff ============================================================================== --- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/AbstractHttpSessionStore.java (original) +++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/AbstractHttpSessionStore.java Mon Aug 27 14:14:04 2007 @@ -36,9 +36,8 @@ /** - * Abstract implementation of [EMAIL PROTECTED] ISessionStore} that works with web - * applications and that provided some speficic http servlet/ session related - * functionality. + * Abstract implementation of [EMAIL PROTECTED] ISessionStore} that works with web applications and that + * provided some speficic http servlet/ session related functionality. * * @author jcompagner * @author Eelco Hillenius @@ -47,8 +46,7 @@ { /** - * Reacts on unbinding from the session by cleaning up the session related - * application data. + * Reacts on unbinding from the session by cleaning up the session related application data. */ protected static final class SessionBindingListener implements @@ -57,12 +55,12 @@ { private static final long serialVersionUID = 1L; - /** Session id. */ - private final String sessionId; - /** The unique key of the application within this web application. */ private final String applicationKey; + /** Session id. */ + private final String sessionId; + /** Whether it is already unbound. */ private boolean unbound = false; @@ -70,8 +68,7 @@ * Construct. * * @param applicationKey - * The unique key of the application within this web - * application + * The unique key of the application within this web application * @param sessionId * The session's id */ @@ -106,7 +103,7 @@ } /** log. */ - protected static Logger log = LoggerFactory.getLogger(AbstractHttpSessionStore.class); + private static Logger log = LoggerFactory.getLogger(AbstractHttpSessionStore.class); /** The web application for this store. Is never null. */ protected final WebApplication application; @@ -126,8 +123,8 @@ // sanity check if (!(application instanceof WebApplication)) { - throw new IllegalStateException(getClass().getName() - + " can only operate in the context of web applications"); + throw new IllegalStateException(getClass().getName() + + " can only operate in the context of web applications"); } this.application = (WebApplication)application; } @@ -154,6 +151,19 @@ } /** + * DO NOT USE. + * + * @param name + * @param session + * @return + * @deprecated remove after deprecation release + */ + public final IPageMap createPageMap(String name, Session session) + { + throw new UnsupportedOperationException("obsolete method"); + } + + /** * @see org.apache.wicket.session.ISessionStore#destroy() */ public void destroy() @@ -162,8 +172,7 @@ } /** - * @see org.apache.wicket.session.ISessionStore#getSessionId(org.apache.wicket.Request, - * boolean) + * @see org.apache.wicket.session.ISessionStore#getSessionId(org.apache.wicket.Request, boolean) */ public final String getSessionId(Request request, boolean create) { @@ -273,11 +282,10 @@ /** * Gets the underlying HttpSession object or null. * <p> - * WARNING: it is a bad idea to depend on the http session object directly. - * Please use the classes and methods that are exposed by Wicket instead. - * Send an email to the mailing list in case it is not clear how to do - * things or you think you miss funcionality which causes you to depend on - * this directly. + * WARNING: it is a bad idea to depend on the http session object directly. Please use the + * classes and methods that are exposed by Wicket instead. Send an email to the mailing list in + * case it is not clear how to do things or you think you miss funcionality which causes you to + * depend on this directly. * </p> * * @param request @@ -290,10 +298,9 @@ } /** - * Template method that is called when a session is being bound to the - * session store. It is called <strong>before</strong> the session object - * itself is added to this store (which is done by calling - * [EMAIL PROTECTED] ISessionStore#setAttribute(Request, String, Object)} with key + * Template method that is called when a session is being bound to the session store. It is + * called <strong>before</strong> the session object itself is added to this store (which is + * done by calling [EMAIL PROTECTED] ISessionStore#setAttribute(Request, String, Object)} with key * [EMAIL PROTECTED] Session#SESSION_ATTRIBUTE_NAME}. * * @param request @@ -306,8 +313,8 @@ } /** - * Template method that is called when the session is being detached from - * the store, which typically happens when the httpsession was invalidated. + * Template method that is called when the session is being detached from the store, which + * typically happens when the httpsession was invalidated. * * @param sessionId * The session id of the session that was invalidated. @@ -316,6 +323,8 @@ { } + // TODO remove after deprecation release + /** * Cast [EMAIL PROTECTED] Request} to [EMAIL PROTECTED] WebRequest}. * @@ -331,24 +340,9 @@ } if (!(request instanceof WebRequest)) { - throw new IllegalArgumentException(getClass().getName() - + " can only work with WebRequests"); + throw new IllegalArgumentException(getClass().getName() + + " can only work with WebRequests"); } return (WebRequest)request; - } - - // TODO remove after deprecation release - - /** - * DO NOT USE. - * - * @param name - * @param session - * @return - * @deprecated remove after deprecation release - */ - public final IPageMap createPageMap(String name, Session session) - { - throw new UnsupportedOperationException("obsolete method"); } } Modified: wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/SecondLevelCacheSessionStore.java URL: http://svn.apache.org/viewvc/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/SecondLevelCacheSessionStore.java?rev=570246&r1=570245&r2=570246&view=diff ============================================================================== --- wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/SecondLevelCacheSessionStore.java (original) +++ wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/SecondLevelCacheSessionStore.java Mon Aug 27 14:14:04 2007 @@ -34,6 +34,8 @@ import org.apache.wicket.util.collections.IntHashMap; import org.apache.wicket.version.IPageVersionManager; import org.apache.wicket.version.undo.Change; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** @@ -43,11 +45,12 @@ */ public class SecondLevelCacheSessionStore extends HttpSessionStore { + private static Logger log = LoggerFactory.getLogger(SecondLevelCacheSessionStore.class); + /** - * This interface is used by the SecondLevelCacheSessionStore so that pages - * can be stored to a persistent layer. Implementation should store the page - * that it gets under the id and version number. So that every page version - * can be reconstructed when asked for. + * This interface is used by the SecondLevelCacheSessionStore so that pages can be stored to a + * persistent layer. Implementation should store the page that it gets under the id and version + * number. So that every page version can be reconstructed when asked for. * * @see DiskPageStore as default implementation. */ @@ -62,13 +65,12 @@ /** * Restores a page version from the persistent layer. * <p> - * Note that the versionNumber and ajaxVersionNumber parameters may be - * -1. + * Note that the versionNumber and ajaxVersionNumber parameters may be -1. * <ul> - * <li>If ajaxVersionNumber is -1 and versionNumber is specified, the - * page store must return the page with highest ajax version. - * <li>If both versionNumber and ajaxVersioNumber are -1, the pagestore - * must return last touched (saved) page version with given id. + * <li>If ajaxVersionNumber is -1 and versionNumber is specified, the page store must + * return the page with highest ajax version. + * <li>If both versionNumber and ajaxVersioNumber are -1, the pagestore must return last + * touched (saved) page version with given id. * </ul> * * @param sessionId @@ -82,9 +84,9 @@ int ajaxVersionNumber); /** - * This method is called when the page is accessed. A IPageStore - * implementation can block until a save of that page version is done. - * So that a specific page version is always restore able. + * This method is called when the page is accessed. A IPageStore implementation can block + * until a save of that page version is done. So that a specific page version is always + * restore able. * * @param sessionId * @param page @@ -104,8 +106,8 @@ void removePage(String sessionId, String pagemap, int id); /** - * Stores the page to a persistent layer. The page should be stored - * under the id and the version number. + * Stores the page to a persistent layer. The page should be stored under the id and the + * version number. * * @param sessionId * @param page @@ -137,9 +139,9 @@ } /** - * Marker interface for PageStores that support replication of serialized - * pages across cluster, which means that the lastPage attribute of - * [EMAIL PROTECTED] SecondLevelCachePageMap} does not have to be serialized; + * Marker interface for PageStores that support replication of serialized pages across cluster, + * which means that the lastPage attribute of [EMAIL PROTECTED] SecondLevelCachePageMap} does not have to + * be serialized; * * @author Matej Knopp */ @@ -149,11 +151,10 @@ }; /** - * Some PageStores might want to preprocess page before serialization. For - * example if the PageStore serializes page, it might keep the serialized - * page during the request. So when the pagemap gets serialized (for session - * replication) in the request thread, the pagestore can provide the already - * serialized data. + * Some PageStores might want to preprocess page before serialization. For example if the + * PageStore serializes page, it might keep the serialized page during the request. So when the + * pagemap gets serialized (for session replication) in the request thread, the pagestore can + * provide the already serialized data. * * @author Matej Knopp */