You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by da...@apache.org on 2007/01/17 20:17:01 UTC

svn commit: r497130 - in /incubator/openejb/trunk/openejb3: container/openejb-core/pom.xml container/openejb-loader/pom.xml pom.xml server/openejb-server/pom.xml server/openejb-server/src/main/java/org/apache/openejb/server/Main.java

Author: dain
Date: Wed Jan 17 11:17:00 2007
New Revision: 497130

URL: http://svn.apache.org/viewvc?view=rev&rev=497130
Log:
Removed xbean-spring code

Modified:
    incubator/openejb/trunk/openejb3/container/openejb-core/pom.xml
    incubator/openejb/trunk/openejb3/container/openejb-loader/pom.xml
    incubator/openejb/trunk/openejb3/pom.xml
    incubator/openejb/trunk/openejb3/server/openejb-server/pom.xml
    incubator/openejb/trunk/openejb3/server/openejb-server/src/main/java/org/apache/openejb/server/Main.java

Modified: incubator/openejb/trunk/openejb3/container/openejb-core/pom.xml
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/container/openejb-core/pom.xml?view=diff&rev=497130&r1=497129&r2=497130
==============================================================================
--- incubator/openejb/trunk/openejb3/container/openejb-core/pom.xml (original)
+++ incubator/openejb/trunk/openejb3/container/openejb-core/pom.xml Wed Jan 17 11:17:00 2007
@@ -118,35 +118,12 @@
               <!--<addClasspath>true</addClasspath>-->
             </manifest>
             <manifestEntries>
-              <Class-Path>openejb-loader-${pom.version}.jar xbean-finder-${removePropertyFromCorePomXbeanVersion}.jar</Class-Path>
+              <Class-Path>openejb-loader-${pom.version}.jar xbean-finder-2.8.jar</Class-Path>
               <J2EE-DeploymentFactory-Implementation-Class>org.apache.openejb.alt.config.VmDeploymentFactory</J2EE-DeploymentFactory-Implementation-Class>
             </manifestEntries>
           </archive>
         </configuration>
       </plugin>
-      <plugin>
-        <groupId>org.apache.xbean</groupId>
-        <artifactId>maven-xbean-plugin</artifactId>
-        <version>${xbeanVersion}</version>
-        <dependencies>
-          <dependency>
-            <groupId>qdox</groupId>
-            <artifactId>qdox</artifactId>
-            <version>${removePropertyFromPomQdoxVersion}</version>
-          </dependency>
-        </dependencies>
-        <executions>
-          <execution>
-            <goals>
-              <goal>mapping</goal>
-            </goals>
-          </execution>
-        </executions>
-        <configuration>
-          <namespace>http://openejb.apache.org/schemas/core</namespace>
-          <excludedClasses>org.apache.openejb.alt.config.ejb,org.apache.openejb.util.io,org.apache.openejb.InterfaceType,org.apache.openejb.BeanType,org.apache.openejb.core.cmp.cmp2.CmrStyle</excludedClasses>
-        </configuration>
-      </plugin>
     </plugins>
   </build>
   <dependencies>
@@ -364,11 +341,6 @@
       <scope>test</scope>
     </dependency>
 
-    <!-- Spring dependencies -->
-    <dependency>
-      <groupId>org.apache.xbean</groupId>
-      <artifactId>xbean-spring</artifactId>
-    </dependency>
     <!-- 
      FIXME: Why should it be specified here? Shouldn't xbean download what's necessary?
     -->

Modified: incubator/openejb/trunk/openejb3/container/openejb-loader/pom.xml
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/container/openejb-loader/pom.xml?view=diff&rev=497130&r1=497129&r2=497130
==============================================================================
--- incubator/openejb/trunk/openejb3/container/openejb-loader/pom.xml (original)
+++ incubator/openejb/trunk/openejb3/container/openejb-loader/pom.xml Wed Jan 17 11:17:00 2007
@@ -30,32 +30,6 @@
   <artifactId>openejb-loader</artifactId>
   <packaging>jar</packaging>
   <name>OpenEJB :: Container :: Loader</name>
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.xbean</groupId>
-        <artifactId>maven-xbean-plugin</artifactId>
-        <version>${xbeanVersion}</version>
-        <dependencies>
-          <dependency>
-            <groupId>qdox</groupId>
-            <artifactId>qdox</artifactId>
-            <version>${removePropertyFromPomQdoxVersion}</version>
-          </dependency>
-        </dependencies>
-        <executions>
-          <execution>
-            <goals>
-              <goal>mapping</goal>
-            </goals>
-          </execution>
-        </executions>
-        <configuration>
-          <namespace>http://openejb.apache.org/schemas/loader</namespace>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
   <dependencies>
     <dependency>
       <groupId>org.apache.geronimo.specs</groupId>

Modified: incubator/openejb/trunk/openejb3/pom.xml
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/pom.xml?view=diff&rev=497130&r1=497129&r2=497130
==============================================================================
--- incubator/openejb/trunk/openejb3/pom.xml (original)
+++ incubator/openejb/trunk/openejb3/pom.xml Wed Jan 17 11:17:00 2007
@@ -93,30 +93,6 @@
     <url>http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3</url>
   </scm>
 
-  <properties>
-    <!--
-       - Used in openejb-core pom.xml
-      -->
-    <xbeanVersion>2.8</xbeanVersion>
-
-    <!--
-       - Remove the property once it's been figured out how to instruct maven-assembly-plugin
-       - to copy SNAPSHOTs as SNAPSHOTs not 20061004.144417-3.
-       - One SNAPSHOT library is used to generate MANIFEST.MF with Class-Path pointing to the library
-       - It references the above property - xbeanVersion - that holds SNAPSHOT which is not available
-       - in lib directory of a assembly as maven-assembly-plugin changes its name to numbers.
-       -
-       - Used in maven-jar-plugin in openejb-core pom.xml and below to declare xbean-finder dependency
-      -->
-    <removePropertyFromCorePomXbeanVersion>2.8</removePropertyFromCorePomXbeanVersion>
-
-    <!--
-       - Remove the property once a version, subsequent to 1.6.1, is found that can parse
-       - org.apache.openejb.alt.config.DeploymentLoader.  The enum seems to trip it up.
-      -->
-    <removePropertyFromPomQdoxVersion>1.6</removePropertyFromPomQdoxVersion>
-  </properties>
-
   <build>
     <defaultGoal>install</defaultGoal>
     <plugins>
@@ -795,28 +771,18 @@
       <dependency>
         <groupId>org.apache.xbean</groupId>
         <artifactId>xbean-finder</artifactId>
-        <version>${removePropertyFromCorePomXbeanVersion}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.xbean</groupId>
-        <artifactId>xbean-naming</artifactId>
-        <version>${xbeanVersion}</version>
+        <version>2.8</version>
       </dependency>
       <dependency>
         <groupId>org.apache.xbean</groupId>
         <artifactId>xbean-reflect</artifactId>
-        <version>${xbeanVersion}</version>
+        <version>2.8</version>
         <exclusions>
           <exclusion>
             <groupId>mx4j</groupId>
             <artifactId>mx4j</artifactId>
           </exclusion>
         </exclusions>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.xbean</groupId>
-        <artifactId>xbean-spring</artifactId>
-        <version>${xbeanVersion}</version>
       </dependency>
       <dependency>
         <groupId>org.springframework</groupId>

Modified: incubator/openejb/trunk/openejb3/server/openejb-server/pom.xml
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/server/openejb-server/pom.xml?view=diff&rev=497130&r1=497129&r2=497130
==============================================================================
--- incubator/openejb/trunk/openejb3/server/openejb-server/pom.xml (original)
+++ incubator/openejb/trunk/openejb3/server/openejb-server/pom.xml Wed Jan 17 11:17:00 2007
@@ -31,25 +31,6 @@
   <artifactId>openejb-server</artifactId>
   <packaging>jar</packaging>
   <name>OpenEJB :: Server :: Core</name>
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.xbean</groupId>
-        <artifactId>maven-xbean-plugin</artifactId>
-        <version>${xbeanVersion}</version>
-        <executions>
-          <execution>
-            <goals>
-              <goal>mapping</goal>
-            </goals>
-          </execution>
-        </executions>
-        <configuration>
-          <namespace>http://openejb.apache.org/schemas/server</namespace>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
   <dependencies>
     <dependency>
       <groupId>org.apache.openejb</groupId>

Modified: incubator/openejb/trunk/openejb3/server/openejb-server/src/main/java/org/apache/openejb/server/Main.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/server/openejb-server/src/main/java/org/apache/openejb/server/Main.java?view=diff&rev=497130&r1=497129&r2=497130
==============================================================================
--- incubator/openejb/trunk/openejb3/server/openejb-server/src/main/java/org/apache/openejb/server/Main.java (original)
+++ incubator/openejb/trunk/openejb3/server/openejb-server/src/main/java/org/apache/openejb/server/Main.java Wed Jan 17 11:17:00 2007
@@ -23,9 +23,6 @@
 
 import org.apache.openejb.loader.SystemInstance;
 import org.apache.openejb.util.JarUtils;
-import org.apache.openejb.util.PropertiesService;
-import org.apache.xbean.spring.context.ClassPathXmlApplicationContext;
-import org.apache.xbean.spring.context.SpringApplicationContext;
 
 /**
  * Assemble OpenEJB instance and boot it up
@@ -34,33 +31,15 @@
 
     private static final String HELP_BASE = "META-INF/org.apache.openejb.cli/";
 
-    // TODO: Remove the static initializer once Main is fully XBean-ized
-    private static final SpringApplicationContext factory;
-    static {
-        factory = new ClassPathXmlApplicationContext("META-INF/openejb-server.xml");
-    }
-
     public static void main(String args[]) {
 
         try {
-            // Parse command-line arguments before OpenEJB is assembled by XBean
-            // Some arguments cause DontStartServerException to be thrown
             Properties props = parseArguments(args);
-
-            PropertiesService propertiesService = (PropertiesService) factory.getBean("propertiesService");
-            // FIXME: Remove parseArguments and let propertiesService take care of properties mgmt
-            propertiesService.putAll(props);
-            
-            // FIXME: Enable XBean-ized SystemInstance 
-            //SystemInstance system = (SystemInstance) factory.getBean("system");
-            
-            SystemInstance.init(propertiesService.getProperties());
+            SystemInstance.init(props);
             SystemInstance system = SystemInstance.get();
             File libs = system.getHome().getDirectory("lib");
             system.getClassPath().addJarsToPath(libs);
-
-            Server server = (Server) factory.getBean("server");
-            server.start();
+            initServer(props);
         } catch (DontStartServerException e) {
 
         } catch (Exception e) {
@@ -71,7 +50,7 @@
     /**
      * Parse arguments and override any {@link System} properties returned via
      * {@link System#getProperties()}.
-     * 
+     *
      * @param args
      *            command line arguments
      * @return properties as defined in System and on the command line
@@ -199,6 +178,12 @@
                 b = in.read();
             }
         } catch (java.io.IOException e) {}
+    }
+
+    private static void initServer(Properties props) throws Exception {
+        Server server = new Server();
+        server.init(props);
+        server.start();
     }
 }