You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sirona.apache.org by ol...@apache.org on 2013/10/23 06:26:26 UTC

svn commit: r1534907 [4/4] - in /incubator/sirona/trunk: aop/src/main/java/org/apache/sirona/aop/ aop/src/test/java/org/apache/sirona/aop/ aspectj/src/main/java/org/apache/sirona/aspectj/ aspectj/src/test/java/org/apache/sirona/aspectj/ cdi/src/main/ja...

Modified: incubator/sirona/trunk/web/src/main/java/org/apache/sirona/web/jsp/TagUtils.java
URL: http://svn.apache.org/viewvc/incubator/sirona/trunk/web/src/main/java/org/apache/sirona/web/jsp/TagUtils.java?rev=1534907&r1=1534906&r2=1534907&view=diff
==============================================================================
--- incubator/sirona/trunk/web/src/main/java/org/apache/sirona/web/jsp/TagUtils.java (original)
+++ incubator/sirona/trunk/web/src/main/java/org/apache/sirona/web/jsp/TagUtils.java Wed Oct 23 04:26:23 2013
@@ -1,43 +1,43 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.sirona.web.jsp;
-
-import javax.servlet.jsp.PageContext;
-import java.util.HashMap;
-import java.util.Map;
-
-public final class TagUtils {
-    /**
-     * Maps JSP scope names to PageContext constants
-     */
-    private static final Map<String, Integer> scopes = new HashMap<String, Integer>();
-    static {
-        scopes.put("page", PageContext.PAGE_SCOPE);
-        scopes.put("request", PageContext.REQUEST_SCOPE);
-        scopes.put("session", PageContext.SESSION_SCOPE);
-        scopes.put("application", PageContext.APPLICATION_SCOPE);
-    }
-
-    public static int getScope(final String scopeName) {
-        return scopes.get(scopeName.toLowerCase());
-    }
-
-    private TagUtils() {
-        // no-op
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.sirona.web.jsp;
+
+import javax.servlet.jsp.PageContext;
+import java.util.HashMap;
+import java.util.Map;
+
+public final class TagUtils {
+    /**
+     * Maps JSP scope names to PageContext constants
+     */
+    private static final Map<String, Integer> scopes = new HashMap<String, Integer>();
+    static {
+        scopes.put("page", PageContext.PAGE_SCOPE);
+        scopes.put("request", PageContext.REQUEST_SCOPE);
+        scopes.put("session", PageContext.SESSION_SCOPE);
+        scopes.put("application", PageContext.APPLICATION_SCOPE);
+    }
+
+    public static int getScope(final String scopeName) {
+        return scopes.get(scopeName.toLowerCase());
+    }
+
+    private TagUtils() {
+        // no-op
+    }
+}

Propchange: incubator/sirona/trunk/web/src/main/java/org/apache/sirona/web/jsp/TagUtils.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/sirona/trunk/web/src/main/java/org/apache/sirona/web/lifecycle/CommonsMonitoringLifecycle.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/sirona/trunk/web/src/main/java/org/apache/sirona/web/registration/WebMonitoringInitializer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/sirona/trunk/web/src/main/java/org/apache/sirona/web/servlet/MonitoringFilter.java
URL: http://svn.apache.org/viewvc/incubator/sirona/trunk/web/src/main/java/org/apache/sirona/web/servlet/MonitoringFilter.java?rev=1534907&r1=1534906&r2=1534907&view=diff
==============================================================================
--- incubator/sirona/trunk/web/src/main/java/org/apache/sirona/web/servlet/MonitoringFilter.java (original)
+++ incubator/sirona/trunk/web/src/main/java/org/apache/sirona/web/servlet/MonitoringFilter.java Wed Oct 23 04:26:23 2013
@@ -1,75 +1,75 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.sirona.web.servlet;
-
-import org.apache.sirona.Role;
-import org.apache.sirona.counters.Counter;
-import org.apache.sirona.repositories.Repository;
-import org.apache.sirona.stopwatches.StopWatch;
-
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-
-public class MonitoringFilter implements Filter {
-    @Override
-    public void init(final FilterConfig filterConfig) throws ServletException {
-        // no-op
-    }
-
-    @Override
-    public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain) throws IOException, ServletException {
-        if (HttpServletRequest.class.isInstance(request)) {
-            final HttpServletRequest httpRequest = HttpServletRequest.class.cast(request);
-            final HttpServletResponse httpResponse = HttpServletResponse.class.cast(response);
-            doFilter(httpRequest, httpResponse, chain);
-        } else {
-            // Not an HTTP request...
-            chain.doFilter(request, response);
-        }
-    }
-
-    @Override
-    public void destroy() {
-        // no-op
-    }
-
-    protected void doFilter(final HttpServletRequest request, final HttpServletResponse response, final FilterChain chain) throws IOException, ServletException {
-        final String uri = getRequestedUri(request);
-        final StopWatch stopWatch = Repository.INSTANCE.start(Repository.INSTANCE.getCounter(new Counter.Key(Role.WEB, uri)));
-        try {
-            chain.doFilter(request, response);
-        } finally {
-            stopWatch.stop();
-        }
-    }
-
-    protected String getRequestedUri(final HttpServletRequest request) {
-        return request.getRequestURI();
-        /* if we want to remove webapp context we could do (but a bad idea in an app server since you can get multiple contexts):
-        final String uri = request.getRequestURI();
-        final String context = request.getContextPath();
-        return uri.substring(context.length());
-        */
-    }
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sirona.web.servlet;
+
+import org.apache.sirona.Role;
+import org.apache.sirona.counters.Counter;
+import org.apache.sirona.repositories.Repository;
+import org.apache.sirona.stopwatches.StopWatch;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+public class MonitoringFilter implements Filter {
+    @Override
+    public void init(final FilterConfig filterConfig) throws ServletException {
+        // no-op
+    }
+
+    @Override
+    public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain) throws IOException, ServletException {
+        if (HttpServletRequest.class.isInstance(request)) {
+            final HttpServletRequest httpRequest = HttpServletRequest.class.cast(request);
+            final HttpServletResponse httpResponse = HttpServletResponse.class.cast(response);
+            doFilter(httpRequest, httpResponse, chain);
+        } else {
+            // Not an HTTP request...
+            chain.doFilter(request, response);
+        }
+    }
+
+    @Override
+    public void destroy() {
+        // no-op
+    }
+
+    protected void doFilter(final HttpServletRequest request, final HttpServletResponse response, final FilterChain chain) throws IOException, ServletException {
+        final String uri = getRequestedUri(request);
+        final StopWatch stopWatch = Repository.INSTANCE.start(Repository.INSTANCE.getCounter(new Counter.Key(Role.WEB, uri)));
+        try {
+            chain.doFilter(request, response);
+        } finally {
+            stopWatch.stop();
+        }
+    }
+
+    protected String getRequestedUri(final HttpServletRequest request) {
+        return request.getRequestURI();
+        /* if we want to remove webapp context we could do (but a bad idea in an app server since you can get multiple contexts):
+        final String uri = request.getRequestURI();
+        final String context = request.getContextPath();
+        return uri.substring(context.length());
+        */
+    }
 }
\ No newline at end of file

Propchange: incubator/sirona/trunk/web/src/main/java/org/apache/sirona/web/servlet/MonitoringFilter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/sirona/trunk/web/src/main/java/org/apache/sirona/web/session/MonitoringSessionListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/sirona/trunk/web/src/main/java/org/apache/sirona/web/session/SessionGauge.java
------------------------------------------------------------------------------
    svn:eol-style = native