01: /*
02: * Copyright 2002-2005 the original author or authors.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16:
17: package info.jtrac.wicket;
18:
19: import org.apache.wicket.application.ReloadingClassLoader;
20: import org.apache.wicket.protocol.http.ReloadingWicketFilter;
21: import org.slf4j.Logger;
22: import org.slf4j.LoggerFactory;
23:
24: /**
25: * only used in development mode, hot deploy modified code
26: * as far as possible without having to restart webappimport org.slf4j.LoggerFactory;
27:
28: */
29: public class JtracReloadingWicketFilter extends ReloadingWicketFilter {
30:
31: private final Logger logger = LoggerFactory.getLogger(getClass());
32:
33: private static final String banner = "\n***********************************************\n"
34: + "*** WARNING: Reloading Wicket Filter in use ***\n"
35: + "*** This is wrong if production mode. ***\n"
36: + "***********************************************";
37:
38: static {
39: ReloadingClassLoader.includePattern("info.jtrac.wicket.*");
40: ReloadingClassLoader
41: .excludePattern("info.jtrac.wicket.JtracApplication");
42: ReloadingClassLoader
43: .excludePattern("info.jtrac.wicket.JtracSession");
44: ReloadingClassLoader
45: .excludePattern("info.jtrac.wicket.DashboardPage");
46: // ReloadingClassLoader.excludePattern("org.springframework.*");
47: // ReloadingClassLoader.excludePattern("org.acegisecurity.*");
48: }
49:
50: public JtracReloadingWicketFilter() {
51: super();
52: logger.warn(banner);
53: }
54:
55: }
|