tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1239415 - /openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java
Date Thu, 02 Feb 2012 00:05:05 GMT
Author: rmannibucau
Date: Thu Feb  2 00:05:05 2012
New Revision: 1239415

URL: http://svn.apache.org/viewvc?rev=1239415&view=rev
Log:
dumping files with metadata to complete

Modified:
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java?rev=1239415&r1=1239414&r2=1239415&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java
(original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java
Thu Feb  2 00:05:05 2012
@@ -986,17 +986,12 @@ public class AnnotationDeployer implemen
 
         public WebModule deploy(WebModule webModule) throws OpenEJBException {
             WebApp webApp = webModule.getWebApp();
-            if (webApp != null && (webApp.isMetadataComplete())) {
-                return webModule;
-            }
-
             if (readDumpedDD()) {
                 final File dumpedWeb = getDumpWeb(webModule.getModuleId());
                 if (!dumpedWeb.exists()) {
                     FileOutputStream fos = null;
                     try {
                         webModule.setWebApp(ReadDescriptors.readWebApp(dumpedWeb.toURI().toURL()));
-                        webModule.getWebApp().setMetadataComplete(true);
                         logger.info("read web.xml for module " + webModule.getModuleId()
+ " at " + dumpedWeb.getAbsolutePath());
                         return webModule;
                     } catch (Exception ignored) {
@@ -1006,6 +1001,9 @@ public class AnnotationDeployer implemen
                     }
                 }
             }
+            if (webApp != null && (webApp.isMetadataComplete())) {
+                return webModule;
+            }
 
             try {
                 if (webModule.getFinder() == null) {
@@ -1080,23 +1078,20 @@ public class AnnotationDeployer implemen
         }
 
         public EjbModule deploy(EjbModule ejbModule) throws OpenEJBException {
-            if (ejbModule.getEjbJar() != null && ejbModule.getEjbJar().isMetadataComplete())
{
-                return ejbModule;
-            }
             if (readDumpedDD()) {
                 final File dumpedEjbJar = getDumpEjbJar(ejbModule.getModuleId());
                 if (dumpedEjbJar.exists()) {
                     try {
                         ejbModule.setEjbJar(ReadDescriptors.readEjbJar(dumpedEjbJar.toURI().toURL()));
-                        ejbModule.getEjbJar().setMetadataComplete(true);
                         logger.info("using ejb-jar " + dumpedEjbJar.getAbsolutePath() + "
for module " + ejbModule.getModuleId());
-                        return ejbModule;
                     } catch (MalformedURLException ignored) {
                         logger.warning("can't read dumped ejb-jar");
                     }
                 }
             }
-
+            if (ejbModule.getEjbJar() != null && ejbModule.getEjbJar().isMetadataComplete())
{
+                return ejbModule;
+            }
 
             try {
                 if (ejbModule.getFinder() == null) {
@@ -1933,6 +1928,7 @@ public class AnnotationDeployer implemen
                     FileOutputStream fos = null;
                     try {
                         fos = new FileOutputStream(dumpedWeb);
+                        webModule.getWebApp().setMetadataComplete(true);
                         JaxbJavaee.marshal(WebApp.class, webModule.getWebApp(), fos);
                         logger.info("dumped web.xml for module " + webModule.getModuleId()
+ " at " + dumpedWeb.getAbsolutePath());
                     } catch (Exception e) {
@@ -2454,6 +2450,7 @@ public class AnnotationDeployer implemen
                     FileOutputStream fos = null;
                     try {
                         fos = new FileOutputStream(dumpedEjbJar);
+                        ejbModule.getEjbJar().setMetadataComplete(true);
                         JaxbJavaee.marshal(EjbJar.class, ejbModule.getEjbJar(), fos);
                         logger.info("dumped ejb-jar for module " + ejbModule.getModuleId()
+ " at " + dumpedEjbJar.getAbsolutePath());
                     } catch (Exception e) {



Mime
View raw message