geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pra...@apache.org
Subject svn commit: r596801 - in /geronimo/sandbox/jetspeed-integration: jetspeed-base/pom.xml jetspeed-database/src/main/java/org/apache/geronimo/jetspeed/integration/JetspeedSerializerGBean.java jetspeed-tomcat/pom.xml
Date Tue, 20 Nov 2007 19:53:05 GMT
Author: prasad
Date: Tue Nov 20 11:53:04 2007
New Revision: 596801

URL: http://svn.apache.org/viewvc?rev=596801&view=rev
Log:
* moved gbean to jetspeed-tomcat car

Modified:
    geronimo/sandbox/jetspeed-integration/jetspeed-base/pom.xml
    geronimo/sandbox/jetspeed-integration/jetspeed-database/src/main/java/org/apache/geronimo/jetspeed/integration/JetspeedSerializerGBean.java
    geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/pom.xml

Modified: geronimo/sandbox/jetspeed-integration/jetspeed-base/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jetspeed-integration/jetspeed-base/pom.xml?rev=596801&r1=596800&r2=596801&view=diff
==============================================================================
--- geronimo/sandbox/jetspeed-integration/jetspeed-base/pom.xml (original)
+++ geronimo/sandbox/jetspeed-integration/jetspeed-base/pom.xml Tue Nov 20 11:53:04 2007
@@ -35,12 +35,6 @@
     
     <dependencies>
         <dependency>
-            <groupId>org.apache.geronimo.modules</groupId>
-            <artifactId>jetspeed-database</artifactId>
-            <version>${version}</version>
-            <type>jar</type>
-        </dependency>
-        <dependency>
             <groupId>org.apache.portals.jetspeed-2</groupId>
             <artifactId>jetspeed-api</artifactId>
             <version>${jetspeedVersion}</version>
@@ -74,6 +68,8 @@
             <version>${version}</version>
             <type>car</type>
         </dependency>
+
+         
     </dependencies>
     
     <build>

Modified: geronimo/sandbox/jetspeed-integration/jetspeed-database/src/main/java/org/apache/geronimo/jetspeed/integration/JetspeedSerializerGBean.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jetspeed-integration/jetspeed-database/src/main/java/org/apache/geronimo/jetspeed/integration/JetspeedSerializerGBean.java?rev=596801&r1=596800&r2=596801&view=diff
==============================================================================
--- geronimo/sandbox/jetspeed-integration/jetspeed-database/src/main/java/org/apache/geronimo/jetspeed/integration/JetspeedSerializerGBean.java
(original)
+++ geronimo/sandbox/jetspeed-integration/jetspeed-database/src/main/java/org/apache/geronimo/jetspeed/integration/JetspeedSerializerGBean.java
Tue Nov 20 11:53:04 2007
@@ -43,33 +43,6 @@
 
     public JetspeedSerializerGBean(String driverClass, String url, String user, String password,
String logLevel, ClassLoader classLoader) throws Exception {
 
-        if ( classLoader == null ) {
-            System.out.println("CLASSLOADER IS NULL !!!");
-        }
-        else {
-            URL springUrl = classLoader.getResource("org/apache/jetspeed/components/jndi/SpringJNDIStarter.class");

-            if ( springUrl != null ) {
-                System.out.println("SpringJNDIStarter is in cp");
-            }
-
-            URL genUrl = classLoader.getResource("org/apache/commons/pool/impl/GenericObjectPool.class");

-            if ( genUrl != null ) {
-                System.out.println("GenObjectPool is in cp");
-            }
-
-            URL foo = classLoader.getResource("org/apache/commons/pool/impl/foo.class");

-            if ( foo != null ) {
-                System.out.println("foo is in cp");
-            }
-            else {
-                System.out.println("foo is NOT in cp");
-            }
-
-            //System.out.println("\nDumping classLoader");
-            //ClassLoaderDumper.dump(classLoader);
-        }
-
-
         if ( driverClass == null )
             driverClass = "org.apache.derby.jdbc.EmbeddedDriver";
         if ( url == null )
@@ -78,29 +51,21 @@
             user = "";
         if ( password == null )
             password = "";
-
-
-        // maybe we can parameterize these too in the future. For now, we don't have to.
-        String applicationPath = null;
-        String bootConfigFiles = null;
-        String configFiles = null;
-
-        if ( applicationPath == null )
-            applicationPath = "WEB-INF";
-        if ( bootConfigFiles == null )
-            bootConfigFiles = "WEB-INF/assembly/boot/";
-        if ( configFiles == null )
-            configFiles = "WEB-INF/assembly/";
         if ( logLevel == null )
             logLevel = "ERROR";
 
 
-        bootConfigFiles = bootConfigFiles + "*.xml";
-        configFiles = configFiles + "*.xml";
-
 
         JetspeedSerializer serializer = null;
 
+        String applicationPath = getAppRoot(classLoader);
+        String configFiles = new File(applicationPath, "assembly").getAbsolutePath();
+        String bootConfigFiles = new File(configFiles, "boot").getAbsolutePath();
+
+        configFiles = configFiles + File.separator + "*.xml";
+        System.out.println(configFiles);
+        bootConfigFiles = bootConfigFiles + File.separator + "*.xml";
+        System.out.println(bootConfigFiles);
 
         HashMap context = new HashMap();
         context.put(SpringJNDIStarter.DATASOURCE_DRIVER, driverClass);
@@ -167,6 +132,25 @@
             e1.printStackTrace();
 
         }
+    }
+
+    private String getAppRoot(ClassLoader classLoader) {
+        URL url = classLoader.getResource("org/apache/jetspeed/components/jndi/SpringJNDIStarter.class");
+        if (url == null) {
+            System.out.println("SpringJNDIStarter.class is not in classpath");
+            return null;
+        }
+
+        System.out.println("getFile " + url.getFile());
+        String path = url.getFile();
+        int index = path.lastIndexOf("!");
+        path = path.substring(0, index);
+        System.out.println(path);
+        path = path.substring(path.indexOf("/") + 1);
+        System.out.println(path);
+        path = new File(path).getParentFile().getParent();
+        System.out.println(path);
+        return path;
     }
 
 

Modified: geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/pom.xml?rev=596801&r1=596800&r2=596801&view=diff
==============================================================================
--- geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/pom.xml (original)
+++ geronimo/sandbox/jetspeed-integration/jetspeed-tomcat/pom.xml Tue Nov 20 11:53:04 2007
@@ -57,7 +57,33 @@
             <version>${jetspeedVersion}</version>
             <type>war</type>
         </dependency>
+
+        <dependency>
+            <groupId>org.apache.geronimo.modules</groupId>
+            <artifactId>jetspeed-database</artifactId>
+            <version>${version}</version>
+            <type>jar</type>
+        </dependency>
+        <dependency>
+             <groupId>org.apache.portals.jetspeed-2</groupId>
+             <artifactId>jetspeed-serializer</artifactId>
+             <version>${jetspeedVersion}</version>
+             <type>jar</type>
+         </dependency>
+        <dependency>
+             <groupId>javolution</groupId>
+             <artifactId>javolution</artifactId>
+             <version>4.0.2</version>
+             <type>jar</type>
+         </dependency>
+        <dependency>
+             <groupId>tyrex</groupId>
+             <artifactId>tyrex</artifactId>
+             <version>1.0.1</version>
+             <type>jar</type>
+         </dependency>
     </dependencies>
+
     <build>
         <resources>
             <resource>
@@ -91,6 +117,11 @@
                         <version>${jetspeedVersion}</version>
                         <type>war</type>
                     </module>
+                    <commonInstance>
+                        <plugin-artifact>
+                          <source-repository>http://www.bluesunrise.com/maven</source-repository>
+                        </plugin-artifact>
+                    </commonInstance>
                 </configuration>
             </plugin>
             <!--



Mime
View raw message