cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r408118 - in /incubator/cayenne/main/trunk/cayenne-regression-profiler: pom.xml src/main/java/org/apache/cayenne/profile/servlet/ProfileFilter.java src/main/webapp/WEB-INF/web.xml
Date Sun, 21 May 2006 01:21:37 GMT
Author: aadamchik
Date: Sat May 20 18:21:37 2006
New Revision: 408118

URL: http://svn.apache.org/viewvc?rev=408118&view=rev
Log:
better diagnostics

Modified:
    incubator/cayenne/main/trunk/cayenne-regression-profiler/pom.xml
    incubator/cayenne/main/trunk/cayenne-regression-profiler/src/main/java/org/apache/cayenne/profile/servlet/ProfileFilter.java
    incubator/cayenne/main/trunk/cayenne-regression-profiler/src/main/webapp/WEB-INF/web.xml

Modified: incubator/cayenne/main/trunk/cayenne-regression-profiler/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/cayenne-regression-profiler/pom.xml?rev=408118&r1=408117&r2=408118&view=diff
==============================================================================
--- incubator/cayenne/main/trunk/cayenne-regression-profiler/pom.xml (original)
+++ incubator/cayenne/main/trunk/cayenne-regression-profiler/pom.xml Sat May 20 18:21:37 2006
@@ -6,6 +6,15 @@
   <name>Cayenne Regression Profiler Web Application</name>
   <version>1.2-SNAPSHOT</version>
   <url>http://incubator.apache.org/cayenne/</url>
+  
+  <repositories>
+		<repository>
+			<id>objectstyle</id>
+			<name>ObjectStyle Public Maven2 repo</name>
+			<url>http://objectstyle.org/maven2</url>
+		</repository>
+  </repositories>
+  
   <build>
     <finalName>cayenne-regression-profiler</finalName>
     <plugins>
@@ -55,26 +64,21 @@
   </build>
   <dependencies>
     <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>3.8.1</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
       <groupId>javax.servlet</groupId>
       <artifactId>servlet-api</artifactId>
       <version>2.4</version>
       <scope>provided</scope>
     </dependency>
     <dependency>
-      <groupId>org.objectstyle.cayenne</groupId>
-      <artifactId>cayenne-nodeps</artifactId>
-      <version>1.2-SNAPSHOT</version>
-    </dependency>
-    <dependency>
       <groupId>hsqldb</groupId>
       <artifactId>hsqldb</artifactId>
       <version>1.8.0.1</version>
+      <scope>runtime</scope>
     </dependency>
+    	<dependency>
+			<groupId>org.objectstyle.cayenne</groupId>
+			<artifactId>cayenne-nodeps</artifactId>
+			<version>1.2-SNAPSHOT</version>
+	</dependency>
   </dependencies>
 </project>

Modified: incubator/cayenne/main/trunk/cayenne-regression-profiler/src/main/java/org/apache/cayenne/profile/servlet/ProfileFilter.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/cayenne-regression-profiler/src/main/java/org/apache/cayenne/profile/servlet/ProfileFilter.java?rev=408118&r1=408117&r2=408118&view=diff
==============================================================================
--- incubator/cayenne/main/trunk/cayenne-regression-profiler/src/main/java/org/apache/cayenne/profile/servlet/ProfileFilter.java
(original)
+++ incubator/cayenne/main/trunk/cayenne-regression-profiler/src/main/java/org/apache/cayenne/profile/servlet/ProfileFilter.java
Sat May 20 18:21:37 2006
@@ -20,11 +20,14 @@
 import javax.servlet.FilterConfig;
 import javax.servlet.ServletException;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.objectstyle.cayenne.access.DataDomain;
 import org.objectstyle.cayenne.access.DataNode;
 import org.objectstyle.cayenne.access.DbGenerator;
 import org.objectstyle.cayenne.conf.Configuration;
 import org.objectstyle.cayenne.conf.WebApplicationContextFilter;
+import org.objectstyle.cayenne.util.LocalizedStringsHandler;
 import org.objectstyle.cayenne.util.Util;
 
 /**
@@ -32,16 +35,26 @@
  */
 public class ProfileFilter extends WebApplicationContextFilter {
 
+    protected Log logger = LogFactory.getLog(getClass());
+
     public synchronized void init(FilterConfig config) throws ServletException {
-        // remove old database
 
+        // remove old database
         File dbDir = new File("target/regression-db");
         if (dbDir.isDirectory()) {
             Util.delete(dbDir.getAbsolutePath(), true);
         }
 
+        // start Cayenne stack
         super.init(config);
 
+        String cayenneVersion = LocalizedStringsHandler.getString("cayenne.version");
+        if (cayenneVersion == null) {
+            cayenneVersion = "unknown";
+        }
+        logger.info("Started Cayenne version - '" + cayenneVersion + "'");
+
+        // create fresh database
         DataDomain domain = Configuration.getSharedConfiguration().getDomain();
         DataNode node = domain.getNode("regression-profile");
         DbGenerator generator = new DbGenerator(node.getAdapter(), domain
@@ -52,5 +65,6 @@
         catch (Exception e) {
             throw new ServletException("Error generating schema", e);
         }
+
     }
 }

Modified: incubator/cayenne/main/trunk/cayenne-regression-profiler/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/cayenne-regression-profiler/src/main/webapp/WEB-INF/web.xml?rev=408118&r1=408117&r2=408118&view=diff
==============================================================================
--- incubator/cayenne/main/trunk/cayenne-regression-profiler/src/main/webapp/WEB-INF/web.xml
(original)
+++ incubator/cayenne/main/trunk/cayenne-regression-profiler/src/main/webapp/WEB-INF/web.xml
Sat May 20 18:21:37 2006
@@ -12,9 +12,14 @@
         <filter-name>CayenneFilter</filter-name>
         <url-pattern>/profile/session/*</url-pattern>
     </filter-mapping>
+    
+    <!-- listener is used for debugging the profile engine and should normally be turned
off -->
+    <!-- 
     <listener>
     	<listener-class>org.apache.cayenne.profile.servlet.SessionTracker</listener-class>
     </listener>
+    -->
+    
     <servlet>
         <servlet-name>ProfileServlet</servlet-name>
         <description>Main profiler servlet that dispatches request to individual tests.</description>



Mime
View raw message