geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r957655 [8/15] - in /geronimo/server/trunk: ./ framework/configs/geronimo-gbean-deployer-bootstrap/src/main/history/ framework/configs/geronimo-gbean-deployer/src/main/history/ framework/configs/jsr88-cli/src/main/history/ framework/configs...
Date Thu, 24 Jun 2010 18:06:33 GMT
Modified: geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/ErrorPageMergeHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/ErrorPageMergeHandler.java?rev=957655&r1=957654&r2=957655&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/ErrorPageMergeHandler.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/ErrorPageMergeHandler.java Thu Jun 24 18:06:24 2010
@@ -22,43 +22,47 @@ import org.apache.geronimo.web25.deploym
 import org.apache.geronimo.web25.deployment.merge.MergeContext;
 import org.apache.geronimo.web25.deployment.merge.MergeItem;
 import org.apache.geronimo.web25.deployment.utils.WebDeploymentMessageUtils;
-import org.apache.geronimo.xbeans.javaee6.ErrorPageType;
-import org.apache.geronimo.xbeans.javaee6.WebAppType;
-import org.apache.geronimo.xbeans.javaee6.WebFragmentType;
+import org.apache.openejb.jee.ErrorPage;
+import org.apache.openejb.jee.WebApp;
+import org.apache.openejb.jee.WebFragment;
 
 /**
  * @version $Rev$ $Date$
  */
-public class ErrorPageMergeHandler implements WebFragmentMergeHandler<WebFragmentType, WebAppType> {
+public class ErrorPageMergeHandler implements WebFragmentMergeHandler<WebFragment, WebApp> {
 
     @Override
-    public void merge(WebFragmentType webFragment, WebAppType webApp, MergeContext mergeContext) throws DeploymentException {
-        for (ErrorPageType errorPage : webFragment.getErrorPageArray()) {
+    public void merge(WebFragment webFragment, WebApp webApp, MergeContext mergeContext) throws DeploymentException {
+        for (ErrorPage errorPage : webFragment.getErrorPage()) {
             MergeItem mergeItem = (MergeItem) mergeContext.getAttribute(createErrorPageKey(errorPage));
             if (mergeItem != null) {
                 if (mergeItem.getSourceType().equals(ElementSource.WEB_XML)) {
                     continue;
-                } else if (mergeItem.getValue().equals(errorPage.getLocation().getStringValue())) {
+                } else if (mergeItem.getValue().equals(errorPage.getLocation())) {
                     boolean isErrorCodeConfigured = errorPage.getErrorCode() != null;
-                    throw new DeploymentException(WebDeploymentMessageUtils.createDuplicateKeyValueMessage("error-page", isErrorCodeConfigured ? "error-code" : "exception-type", isErrorCodeConfigured ? errorPage
-                            .getErrorCode().getStringValue() : errorPage.getExceptionType().getStringValue(), "location", (String) mergeItem.getValue(), mergeItem.getBelongedURL(), errorPage
-                            .getLocation().getStringValue(), mergeContext.getCurrentJarUrl()));
+                    throw new DeploymentException(WebDeploymentMessageUtils.createDuplicateKeyValueMessage("error-page",
+                            isErrorCodeConfigured ? "error-code" : "exception-type",
+                            isErrorCodeConfigured ? "" + errorPage.getErrorCode() : errorPage.getExceptionType(),
+                            "location",
+                            (String) mergeItem.getValue(), mergeItem.getBelongedURL(),
+                            errorPage.getLocation(),
+                            mergeContext.getCurrentJarUrl()));
                 }
             } else {
-                webApp.addNewErrorPage().set(errorPage);
-                mergeContext.setAttribute(createErrorPageKey(errorPage), new MergeItem(errorPage.getLocation().getStringValue(), mergeContext.getCurrentJarUrl(), ElementSource.WEB_FRAGMENT));
+                webApp.getErrorPage().add(errorPage);
+                mergeContext.setAttribute(createErrorPageKey(errorPage), new MergeItem(errorPage.getLocation(), mergeContext.getCurrentJarUrl(), ElementSource.WEB_FRAGMENT));
             }
         }
     }
 
     @Override
-    public void postProcessWebXmlElement(WebAppType webApp, MergeContext context) throws DeploymentException {
+    public void postProcessWebXmlElement(WebApp webApp, MergeContext context) throws DeploymentException {
     }
 
     @Override
-    public void preProcessWebXmlElement(WebAppType webApp, MergeContext context) throws DeploymentException {
-        for (ErrorPageType errorPage : webApp.getErrorPageArray()) {
-            context.setAttribute(createErrorPageKey(errorPage), new MergeItem(errorPage.getLocation().getStringValue(), null, ElementSource.WEB_XML));
+    public void preProcessWebXmlElement(WebApp webApp, MergeContext context) throws DeploymentException {
+        for (ErrorPage errorPage : webApp.getErrorPage()) {
+            context.setAttribute(createErrorPageKey(errorPage), new MergeItem(errorPage.getLocation(), null, ElementSource.WEB_XML));
         }
     }
 
@@ -70,7 +74,7 @@ public class ErrorPageMergeHandler imple
         return "error-page.exception-type." + exceptionType;
     }
 
-    public static final String createErrorPageKey(ErrorPageType errorPage) {
-        return errorPage.getErrorCode() == null ? createExceptionTypeKey(errorPage.getExceptionType().getStringValue()) : createErrorCodeKey(errorPage.getErrorCode().getStringValue());
+    public static final String createErrorPageKey(ErrorPage errorPage) {
+        return errorPage.getErrorCode() == null ? createExceptionTypeKey(errorPage.getExceptionType()) : createErrorCodeKey("" + errorPage.getErrorCode());
     }
 }

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/FilterInitParamMergeHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/FilterInitParamMergeHandler.java?rev=957655&r1=957654&r2=957655&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/FilterInitParamMergeHandler.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/FilterInitParamMergeHandler.java Thu Jun 24 18:06:24 2010
@@ -22,43 +22,43 @@ import org.apache.geronimo.web25.deploym
 import org.apache.geronimo.web25.deployment.merge.MergeContext;
 import org.apache.geronimo.web25.deployment.merge.MergeItem;
 import org.apache.geronimo.web25.deployment.utils.WebDeploymentMessageUtils;
-import org.apache.geronimo.xbeans.javaee6.FilterType;
-import org.apache.geronimo.xbeans.javaee6.ParamValueType;
-import org.apache.geronimo.xbeans.javaee6.WebAppType;
+import org.apache.openejb.jee.Filter;
+import org.apache.openejb.jee.ParamValue;
+import org.apache.openejb.jee.WebApp;
 
 /**
  * @version $Rev$ $Date$
  */
-public class FilterInitParamMergeHandler implements SubMergeHandler<FilterType, FilterType> {
+public class FilterInitParamMergeHandler implements SubMergeHandler<Filter, Filter> {
 
     @Override
-    public void add(FilterType servlet, MergeContext mergeContext) throws DeploymentException {
-        String servletName = servlet.getFilterName().getStringValue();
-        for (ParamValueType paramValue : servlet.getInitParamArray()) {
+    public void add(Filter servlet, MergeContext mergeContext) throws DeploymentException {
+        String servletName = servlet.getFilterName();
+        for (ParamValue paramValue : servlet.getInitParam()) {
             addFilterInitParam(servletName, paramValue, ElementSource.WEB_FRAGMENT, mergeContext.getCurrentJarUrl(), mergeContext);
         }
     }
 
     @Override
-    public void merge(FilterType srcFilter, FilterType targetFilter, MergeContext mergeContext) throws DeploymentException {
-        String filterName = srcFilter.getFilterName().getStringValue();
-        for (ParamValueType paramValue : srcFilter.getInitParamArray()) {
-            MergeItem existedMergeItem = (MergeItem) mergeContext.getAttribute(createFilterInitParamKey(filterName, paramValue.getParamName().getStringValue()));
+    public void merge(Filter srcFilter, Filter targetFilter, MergeContext mergeContext) throws DeploymentException {
+        String filterName = srcFilter.getFilterName();
+        for (ParamValue paramValue : srcFilter.getInitParam()) {
+            MergeItem existedMergeItem = (MergeItem) mergeContext.getAttribute(createFilterInitParamKey(filterName, paramValue.getParamName()));
             if (existedMergeItem == null) {
-                targetFilter.addNewInitParam().set(paramValue);
+                targetFilter.getInitParam().add(paramValue);
                 addFilterInitParam(filterName, paramValue, ElementSource.WEB_FRAGMENT, mergeContext.getCurrentJarUrl(), mergeContext);
             } else {
-                ParamValueType existedParamValue = (ParamValueType) existedMergeItem.getValue();
+                ParamValue existedParamValue = (ParamValue) existedMergeItem.getValue();
                 switch (existedMergeItem.getSourceType()) {
                 case WEB_XML:
                     continue;
                 case WEB_FRAGMENT:
-                    if (existedParamValue.getParamValue().getStringValue().equals(paramValue.getParamValue().getStringValue())
+                    if (existedParamValue.getParamValue().equals(paramValue.getParamValue())
                             || existedMergeItem.getBelongedURL().equals(mergeContext.getCurrentJarUrl())) {
                         break;
                     } else {
-                        throw new DeploymentException(WebDeploymentMessageUtils.createDuplicateKeyValueMessage("filter " + filterName, "param-name", paramValue.getParamName().getStringValue(),
-                                "param-value", existedParamValue.getParamValue().getStringValue(), existedMergeItem.getBelongedURL(), paramValue.getParamValue().getStringValue(), mergeContext
+                        throw new DeploymentException(WebDeploymentMessageUtils.createDuplicateKeyValueMessage("filter " + filterName, "param-name", paramValue.getParamName(),
+                                "param-value", existedParamValue.getParamValue(), existedMergeItem.getBelongedURL(), paramValue.getParamValue(), mergeContext
                                         .getCurrentJarUrl()));
                     }
                 case ANNOTATION:
@@ -67,7 +67,7 @@ public class FilterInitParamMergeHandler
                     //the name specified via the annotation. Init params are additive between the
                     //annotations and descriptors.
                     //In my understanding, the value of init-param should be overridden even if it is merged from annotation before the current web-fragment.xml file
-                    existedParamValue.getParamValue().set(paramValue.getParamValue());
+                    existedParamValue.setParamValue(paramValue.getParamValue());
                     existedMergeItem.setBelongedURL(mergeContext.getCurrentJarUrl());
                     existedMergeItem.setSourceType(ElementSource.WEB_FRAGMENT);
                 }
@@ -76,14 +76,14 @@ public class FilterInitParamMergeHandler
     }
 
     @Override
-    public void postProcessWebXmlElement(WebAppType webApp, MergeContext context) throws DeploymentException {
+    public void postProcessWebXmlElement(WebApp webApp, MergeContext context) throws DeploymentException {
     }
 
     @Override
-    public void preProcessWebXmlElement(WebAppType webApp, MergeContext context) throws DeploymentException {
-        for (FilterType filter : webApp.getFilterArray()) {
-            String filterName = filter.getFilterName().getStringValue();
-            for (ParamValueType paramValue : filter.getInitParamArray()) {
+    public void preProcessWebXmlElement(WebApp webApp, MergeContext context) throws DeploymentException {
+        for (Filter filter : webApp.getFilter()) {
+            String filterName = filter.getFilterName();
+            for (ParamValue paramValue : filter.getInitParam()) {
                 addFilterInitParam(filterName, paramValue, ElementSource.WEB_XML, null, context);
             }
         }
@@ -97,7 +97,7 @@ public class FilterInitParamMergeHandler
         return mergeContext.containsAttribute(createFilterInitParamKey(filterName, paramName));
     }
 
-    public static void addFilterInitParam(String filterName, ParamValueType paramValue, ElementSource source, String relativeUrl, MergeContext mergeContext) {
-        mergeContext.setAttribute(createFilterInitParamKey(filterName, paramValue.getParamName().getStringValue()), new MergeItem(paramValue, relativeUrl, source));
+    public static void addFilterInitParam(String filterName, ParamValue paramValue, ElementSource source, String relativeUrl, MergeContext mergeContext) {
+        mergeContext.setAttribute(createFilterInitParamKey(filterName, paramValue.getParamName()), new MergeItem(paramValue, relativeUrl, source));
     }
 }

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/FilterMappingDispatcherMergeHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/FilterMappingDispatcherMergeHandler.java?rev=957655&r1=957654&r2=957655&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/FilterMappingDispatcherMergeHandler.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/FilterMappingDispatcherMergeHandler.java Thu Jun 24 18:06:24 2010
@@ -19,54 +19,54 @@ package org.apache.geronimo.web25.deploy
 
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.web25.deployment.merge.MergeContext;
-import org.apache.geronimo.xbeans.javaee6.DispatcherType;
-import org.apache.geronimo.xbeans.javaee6.FilterMappingType;
-import org.apache.geronimo.xbeans.javaee6.WebAppType;
+import org.apache.openejb.jee.Dispatcher;
+import org.apache.openejb.jee.FilterMapping;
+import org.apache.openejb.jee.WebApp;
 
 /**
  * @version $Rev$ $Date$
  */
-public class FilterMappingDispatcherMergeHandler implements SubMergeHandler<FilterMappingType, FilterMappingType> {
+public class FilterMappingDispatcherMergeHandler implements SubMergeHandler<FilterMapping, FilterMapping> {
 
     @Override
-    public void add(FilterMappingType filterMapping, MergeContext mergeContext) throws DeploymentException {
-        String filterName = filterMapping.getFilterName().getStringValue();
-        for (DispatcherType dispatcher : filterMapping.getDispatcherArray()) {
-            mergeContext.setAttribute(createFilterMappingDispatcherKey(filterName, dispatcher.getStringValue(), mergeContext), Boolean.TRUE);
+    public void add(FilterMapping filterMapping, MergeContext mergeContext) throws DeploymentException {
+        String filterName = filterMapping.getFilterName();
+        for (Dispatcher dispatcher : filterMapping.getDispatcher()) {
+            mergeContext.setAttribute(createFilterMappingDispatcherKey(filterName, dispatcher, mergeContext), Boolean.TRUE);
         }
     }
 
     @Override
-    public void merge(FilterMappingType srcFilterMapping, FilterMappingType targetFilterMapping, MergeContext mergeContext) throws DeploymentException {
-        String filterName = srcFilterMapping.getFilterName().getStringValue();
-        for (DispatcherType dispatcher : srcFilterMapping.getDispatcherArray()) {
-            if (isFilterMappingDispatcherConfigured(filterName, dispatcher.getStringValue(), mergeContext)) {
+    public void merge(FilterMapping srcFilterMapping, FilterMapping targetFilterMapping, MergeContext mergeContext) throws DeploymentException {
+        String filterName = srcFilterMapping.getFilterName();
+        for (Dispatcher dispatcher : srcFilterMapping.getDispatcher()) {
+            if (isFilterMappingDispatcherConfigured(filterName, dispatcher, mergeContext)) {
                 continue;
             }
-            mergeContext.setAttribute(createFilterMappingDispatcherKey(filterName, dispatcher.getStringValue(), mergeContext), Boolean.TRUE);
-            targetFilterMapping.addNewDispatcher().setStringValue(dispatcher.getStringValue());
+            mergeContext.setAttribute(createFilterMappingDispatcherKey(filterName, dispatcher, mergeContext), Boolean.TRUE);
+            targetFilterMapping.getDispatcher().add(dispatcher);
         }
     }
 
     @Override
-    public void postProcessWebXmlElement(WebAppType webApp, MergeContext context) throws DeploymentException {
+    public void postProcessWebXmlElement(WebApp webApp, MergeContext context) throws DeploymentException {
     }
 
     @Override
-    public void preProcessWebXmlElement(WebAppType webApp, MergeContext context) throws DeploymentException {
-        for (FilterMappingType filterMapping : webApp.getFilterMappingArray()) {
-            String filterName = filterMapping.getFilterName().getStringValue();
-            for (DispatcherType dispatcher : filterMapping.getDispatcherArray()) {
-                context.setAttribute(createFilterMappingDispatcherKey(filterName, dispatcher.getStringValue(), context), Boolean.TRUE);
+    public void preProcessWebXmlElement(WebApp webApp, MergeContext context) throws DeploymentException {
+        for (FilterMapping filterMapping : webApp.getFilterMapping()) {
+            String filterName = filterMapping.getFilterName();
+            for (Dispatcher dispatcher : filterMapping.getDispatcher()) {
+                context.setAttribute(createFilterMappingDispatcherKey(filterName, dispatcher, context), Boolean.TRUE);
             }
         }
     }
 
-    public static String createFilterMappingDispatcherKey(String filterName, String dispatcherValue, MergeContext mergeContext) {
+    public static String createFilterMappingDispatcherKey(String filterName, Dispatcher dispatcherValue, MergeContext mergeContext) {
         return "filter-mapping.filter-name." + filterName + ".dispatcher." + dispatcherValue;
     }
 
-    public static boolean isFilterMappingDispatcherConfigured(String filterName, String dispatcherValue, MergeContext mergeContext) {
+    public static boolean isFilterMappingDispatcherConfigured(String filterName, Dispatcher dispatcherValue, MergeContext mergeContext) {
         return mergeContext.containsAttribute(createFilterMappingDispatcherKey(filterName, dispatcherValue, mergeContext));
     }
 }

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/FilterMappingMergeHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/FilterMappingMergeHandler.java?rev=957655&r1=957654&r2=957655&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/FilterMappingMergeHandler.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/FilterMappingMergeHandler.java Thu Jun 24 18:06:24 2010
@@ -23,47 +23,44 @@ import java.util.List;
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.web25.deployment.merge.ElementSource;
 import org.apache.geronimo.web25.deployment.merge.MergeContext;
-import org.apache.geronimo.xbeans.javaee6.DispatcherType;
-import org.apache.geronimo.xbeans.javaee6.FilterMappingType;
-import org.apache.geronimo.xbeans.javaee6.ServletNameType;
-import org.apache.geronimo.xbeans.javaee6.UrlPatternType;
-import org.apache.geronimo.xbeans.javaee6.WebAppType;
-import org.apache.geronimo.xbeans.javaee6.WebFragmentType;
+import org.apache.openejb.jee.FilterMapping;
+import org.apache.openejb.jee.WebApp;
+import org.apache.openejb.jee.WebFragment;
 
 /**
  * @version $Rev$ $Date$
  */
-public class FilterMappingMergeHandler implements WebFragmentMergeHandler<WebFragmentType, WebAppType> {
+public class FilterMappingMergeHandler implements WebFragmentMergeHandler<WebFragment, WebApp> {
 
-    private List<SubMergeHandler<FilterMappingType, FilterMappingType>> subMergeHandlers;
+    private List<SubMergeHandler<FilterMapping, FilterMapping>> subMergeHandlers;
 
     public FilterMappingMergeHandler() {
-        subMergeHandlers = new ArrayList<SubMergeHandler<FilterMappingType, FilterMappingType>>();
+        subMergeHandlers = new ArrayList<SubMergeHandler<FilterMapping, FilterMapping>>();
         subMergeHandlers.add(new FilterMappingUrlPatternMergeHandler());
         subMergeHandlers.add(new FilterMappingServletNameMergeHandler());
         subMergeHandlers.add(new FilterMappingDispatcherMergeHandler());
     }
 
     @Override
-    public void merge(WebFragmentType webFragment, WebAppType webApp, MergeContext mergeContext) throws DeploymentException {
-        for (FilterMappingType srcFilterMapping : webFragment.getFilterMappingArray()) {
-            String filterName = srcFilterMapping.getFilterName().getStringValue();
-            FilterMappingType targetFilterMapping = (FilterMappingType) mergeContext.getAttribute(createFilterMappingKey(filterName));
+    public void merge(WebFragment webFragment, WebApp webApp, MergeContext mergeContext) throws DeploymentException {
+        for (FilterMapping srcFilterMapping : webFragment.getFilterMapping()) {
+            String filterName = srcFilterMapping.getFilterName();
+            FilterMapping targetFilterMapping = (FilterMapping) mergeContext.getAttribute(createFilterMappingKey(filterName));
             if (targetFilterMapping == null) {
-                targetFilterMapping = (FilterMappingType) webApp.addNewFilterMapping().set(srcFilterMapping);
-                mergeContext.setAttribute(createFilterMappingKey(filterName), targetFilterMapping);
-                for (SubMergeHandler<FilterMappingType, FilterMappingType> subMergeHandler : subMergeHandlers) {
-                    subMergeHandler.add(targetFilterMapping, mergeContext);
+                webApp.getFilterMapping().add(srcFilterMapping);
+                mergeContext.setAttribute(createFilterMappingKey(filterName), srcFilterMapping);
+                for (SubMergeHandler<FilterMapping, FilterMapping> subMergeHandler : subMergeHandlers) {
+                    subMergeHandler.add(srcFilterMapping, mergeContext);
                 }
             } else {
                 if (isFilterMappingFromAnnotation(filterName, mergeContext)) {
                     //If the current url-patterns configurations are from annotations, so let's drop them
-                    targetFilterMapping.setUrlPatternArray(new UrlPatternType[0]);
-                    targetFilterMapping.setDispatcherArray(new DispatcherType[0]);
-                    targetFilterMapping.setServletNameArray(new ServletNameType[0]);
+                    targetFilterMapping.getUrlPattern().clear();
+                    targetFilterMapping.getDispatcher().clear();
+                    targetFilterMapping.getServletName().clear();
                     mergeContext.removeAttribute(createFilterMappingSourceKey(filterName));
                 }
-                for (SubMergeHandler<FilterMappingType, FilterMappingType> subMergeHandler : subMergeHandlers) {
+                for (SubMergeHandler<FilterMapping, FilterMapping> subMergeHandler : subMergeHandlers) {
                     subMergeHandler.merge(srcFilterMapping, targetFilterMapping, mergeContext);
                 }
             }
@@ -71,19 +68,19 @@ public class FilterMappingMergeHandler i
     }
 
     @Override
-    public void postProcessWebXmlElement(WebAppType webApp, MergeContext context) throws DeploymentException {
-        for (SubMergeHandler<FilterMappingType, FilterMappingType> subMergeHandler : subMergeHandlers) {
+    public void postProcessWebXmlElement(WebApp webApp, MergeContext context) throws DeploymentException {
+        for (SubMergeHandler<FilterMapping, FilterMapping> subMergeHandler : subMergeHandlers) {
             subMergeHandler.postProcessWebXmlElement(webApp, context);
         }
     }
 
     @Override
-    public void preProcessWebXmlElement(WebAppType webApp, MergeContext context) throws DeploymentException {
-        for (FilterMappingType filterMapping : webApp.getFilterMappingArray()) {
-            String filterName = filterMapping.getFilterName().getStringValue();
+    public void preProcessWebXmlElement(WebApp webApp, MergeContext context) throws DeploymentException {
+        for (FilterMapping filterMapping : webApp.getFilterMapping()) {
+            String filterName = filterMapping.getFilterName();
             context.setAttribute(createFilterMappingKey(filterName), filterMapping);
         }
-        for (SubMergeHandler<FilterMappingType, FilterMappingType> subMergeHandler : subMergeHandlers) {
+        for (SubMergeHandler<FilterMapping, FilterMapping> subMergeHandler : subMergeHandlers) {
             subMergeHandler.preProcessWebXmlElement(webApp, context);
         }
     }
@@ -96,8 +93,8 @@ public class FilterMappingMergeHandler i
         return mergeContext.containsAttribute(createFilterMappingKey(filterName));
     }
 
-    public static FilterMappingType getFilterMappingType(String filterName, MergeContext mergeContext) {
-        return (FilterMappingType) mergeContext.getAttribute(createFilterMappingKey(filterName));
+    public static FilterMapping getFilterMapping(String filterName, MergeContext mergeContext) {
+        return (FilterMapping) mergeContext.getAttribute(createFilterMappingKey(filterName));
     }
 
     public static String createFilterMappingSourceKey(String filterName) {
@@ -109,7 +106,7 @@ public class FilterMappingMergeHandler i
         return elementSource != null && elementSource.equals(ElementSource.ANNOTATION);
     }
 
-    public static void addFilterMapping(FilterMappingType filterMapping, MergeContext mergeContext) {
-        mergeContext.setAttribute(createFilterMappingKey(filterMapping.getFilterName().getStringValue()), filterMapping);
+    public static void addFilterMapping(FilterMapping filterMapping, MergeContext mergeContext) {
+        mergeContext.setAttribute(createFilterMappingKey(filterMapping.getFilterName()), filterMapping);
     }
 }

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/FilterMappingServletNameMergeHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/FilterMappingServletNameMergeHandler.java?rev=957655&r1=957654&r2=957655&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/FilterMappingServletNameMergeHandler.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/FilterMappingServletNameMergeHandler.java Thu Jun 24 18:06:24 2010
@@ -19,45 +19,44 @@ package org.apache.geronimo.web25.deploy
 
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.web25.deployment.merge.MergeContext;
-import org.apache.geronimo.xbeans.javaee6.FilterMappingType;
-import org.apache.geronimo.xbeans.javaee6.ServletNameType;
-import org.apache.geronimo.xbeans.javaee6.WebAppType;
+import org.apache.openejb.jee.FilterMapping;
+import org.apache.openejb.jee.WebApp;
 
 /**
  * @version $Rev$ $Date$
  */
-public class FilterMappingServletNameMergeHandler implements SubMergeHandler<FilterMappingType, FilterMappingType> {
+public class FilterMappingServletNameMergeHandler implements SubMergeHandler<FilterMapping, FilterMapping> {
 
     @Override
-    public void add(FilterMappingType filterMapping, MergeContext mergeContext) throws DeploymentException {
-        String filterName = filterMapping.getFilterName().getStringValue();
-        for (ServletNameType servletName : filterMapping.getServletNameArray()) {
-            mergeContext.setAttribute(createFilterMappingServletNameKey(filterName, servletName.getStringValue()), Boolean.TRUE);
+    public void add(FilterMapping filterMapping, MergeContext mergeContext) throws DeploymentException {
+        String filterName = filterMapping.getFilterName();
+        for (String servletName : filterMapping.getServletName()) {
+            mergeContext.setAttribute(createFilterMappingServletNameKey(filterName, servletName), Boolean.TRUE);
         }
     }
 
     @Override
-    public void merge(FilterMappingType srcFilterMapping, FilterMappingType targetFilterMapping, MergeContext mergeContext) throws DeploymentException {
-        String filterName = srcFilterMapping.getFilterName().getStringValue();
-        for (ServletNameType servletName : srcFilterMapping.getServletNameArray()) {
-            String filterMappingServletNameKey = createFilterMappingServletNameKey(filterName, servletName.getStringValue());
+    public void merge(FilterMapping srcFilterMapping, FilterMapping targetFilterMapping, MergeContext mergeContext) throws DeploymentException {
+        String filterName = srcFilterMapping.getFilterName();
+        for (String servletName : srcFilterMapping.getServletName()) {
+            String filterMappingServletNameKey = createFilterMappingServletNameKey(filterName, servletName);
             if (!mergeContext.containsAttribute(filterMappingServletNameKey)) {
-                targetFilterMapping.addNewServletName().set(servletName);
+                targetFilterMapping.getServletName().add(servletName);
                 mergeContext.setAttribute(filterMappingServletNameKey, Boolean.TRUE);
             }
         }
     }
 
     @Override
-    public void postProcessWebXmlElement(WebAppType webApp, MergeContext context) throws DeploymentException {
+    public void postProcessWebXmlElement(WebApp webApp, MergeContext context) throws DeploymentException {
     }
 
     @Override
-    public void preProcessWebXmlElement(WebAppType webApp, MergeContext context) throws DeploymentException {
-        for (FilterMappingType filterMapping : webApp.getFilterMappingArray()) {
-            String filterName = filterMapping.getFilterName().getStringValue();
-            for (ServletNameType servletName : filterMapping.getServletNameArray()) {
-                context.setAttribute(createFilterMappingServletNameKey(filterName, servletName.getStringValue()), Boolean.TRUE);
+    public void preProcessWebXmlElement(WebApp webApp, MergeContext context) throws DeploymentException {
+        for (FilterMapping filterMapping : webApp.getFilterMapping()) {
+            String filterName = filterMapping.getFilterName();
+            for (String servletName : filterMapping.getServletName()) {
+                context.setAttribute(createFilterMappingServletNameKey(filterName, servletName), Boolean.TRUE);
             }
         }
     }

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/FilterMappingUrlPatternMergeHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/FilterMappingUrlPatternMergeHandler.java?rev=957655&r1=957654&r2=957655&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/FilterMappingUrlPatternMergeHandler.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/FilterMappingUrlPatternMergeHandler.java Thu Jun 24 18:06:24 2010
@@ -21,59 +21,55 @@ import org.apache.geronimo.common.Deploy
 import org.apache.geronimo.web25.deployment.merge.MergeContext;
 import org.apache.geronimo.web25.deployment.utils.WebDeploymentMessageUtils;
 import org.apache.geronimo.web25.deployment.utils.WebDeploymentValidationUtils;
-import org.apache.geronimo.xbeans.javaee6.FilterMappingType;
-import org.apache.geronimo.xbeans.javaee6.UrlPatternType;
-import org.apache.geronimo.xbeans.javaee6.WebAppType;
+import org.apache.openejb.jee.FilterMapping;
+import org.apache.openejb.jee.WebApp;
 
 /**
  * @version $Rev$ $Date$
  */
-public class FilterMappingUrlPatternMergeHandler implements SubMergeHandler<FilterMappingType, FilterMappingType> {
+public class FilterMappingUrlPatternMergeHandler implements SubMergeHandler<FilterMapping, FilterMapping> {
 
     @Override
-    public void add(FilterMappingType filterMapping, MergeContext mergeContext) throws DeploymentException {
-        String filterName = filterMapping.getFilterName().getStringValue();
-        for (UrlPatternType urlPattern : filterMapping.getUrlPatternArray()) {
-            String urlPatternStr = urlPattern.getStringValue();
-            if (!WebDeploymentValidationUtils.isValidUrlPattern(urlPatternStr)) {
-                throw new DeploymentException(WebDeploymentMessageUtils.createInvalidUrlPatternErrorMessage("filter-mapping", filterName, urlPatternStr, "web-fragment.xml located in "
+    public void add(FilterMapping filterMapping, MergeContext mergeContext) throws DeploymentException {
+        String filterName = filterMapping.getFilterName();
+        for (String urlPattern : filterMapping.getUrlPattern()) {
+            if (!WebDeploymentValidationUtils.isValidUrlPattern(urlPattern)) {
+                throw new DeploymentException(WebDeploymentMessageUtils.createInvalidUrlPatternErrorMessage("filter-mapping", filterName, urlPattern, "web-fragment.xml located in "
                         + mergeContext.getCurrentJarUrl()));
             }
-            mergeContext.setAttribute(createFilterMappingUrlPatternKey(filterName, urlPatternStr), urlPattern);
+            mergeContext.setAttribute(createFilterMappingUrlPatternKey(filterName, urlPattern), urlPattern);
         }
     }
 
     @Override
-    public void merge(FilterMappingType srcFilterMapping, FilterMappingType targetFilterMapping, MergeContext mergeContext) throws DeploymentException {
-        String filterName = srcFilterMapping.getFilterName().getStringValue();
-        for (UrlPatternType urlPattern : srcFilterMapping.getUrlPatternArray()) {
-            String urlPatternStr = urlPattern.getStringValue();
-            String filterMappingUrlPatternKey = createFilterMappingUrlPatternKey(filterName, urlPatternStr);
+    public void merge(FilterMapping srcFilterMapping, FilterMapping targetFilterMapping, MergeContext mergeContext) throws DeploymentException {
+        String filterName = srcFilterMapping.getFilterName();
+        for (String urlPattern : srcFilterMapping.getUrlPattern()) {
+            String filterMappingUrlPatternKey = createFilterMappingUrlPatternKey(filterName, urlPattern);
             if (!mergeContext.containsAttribute(filterMappingUrlPatternKey)) {
-                UrlPatternType newUrlPattern = (UrlPatternType) targetFilterMapping.addNewUrlPattern().set(urlPattern);
-                if (!WebDeploymentValidationUtils.isValidUrlPattern(urlPatternStr)) {
-                    throw new DeploymentException(WebDeploymentMessageUtils.createInvalidUrlPatternErrorMessage("filter-mapping", filterName, urlPatternStr, "web-fragment.xml located in "
+                targetFilterMapping.getUrlPattern().add(urlPattern);
+                if (!WebDeploymentValidationUtils.isValidUrlPattern(urlPattern)) {
+                    throw new DeploymentException(WebDeploymentMessageUtils.createInvalidUrlPatternErrorMessage("filter-mapping", filterName, urlPattern, "web-fragment.xml located in "
                             + mergeContext.getCurrentJarUrl()));
                 }
-                mergeContext.setAttribute(filterMappingUrlPatternKey, newUrlPattern);
+                mergeContext.setAttribute(filterMappingUrlPatternKey, urlPattern);
             }
         }
     }
 
     @Override
-    public void postProcessWebXmlElement(WebAppType webApp, MergeContext context) throws DeploymentException {
+    public void postProcessWebXmlElement(WebApp webApp, MergeContext context) throws DeploymentException {
     }
 
     @Override
-    public void preProcessWebXmlElement(WebAppType webApp, MergeContext context) throws DeploymentException {
-        for (FilterMappingType filterMapping : webApp.getFilterMappingArray()) {
-            String filterName = filterMapping.getFilterName().getStringValue();
-            for (UrlPatternType urlPattern : filterMapping.getUrlPatternArray()) {
-                String urlPatternStr = urlPattern.getStringValue();
-                if (!WebDeploymentValidationUtils.isValidUrlPattern(urlPatternStr)) {
-                    throw new DeploymentException(WebDeploymentMessageUtils.createInvalidUrlPatternErrorMessage("filter-mapping", filterName, urlPatternStr, "web.xml"));
+    public void preProcessWebXmlElement(WebApp webApp, MergeContext context) throws DeploymentException {
+        for (FilterMapping filterMapping : webApp.getFilterMapping()) {
+            String filterName = filterMapping.getFilterName();
+            for (String urlPattern : filterMapping.getUrlPattern()) {
+                if (!WebDeploymentValidationUtils.isValidUrlPattern(urlPattern)) {
+                    throw new DeploymentException(WebDeploymentMessageUtils.createInvalidUrlPatternErrorMessage("filter-mapping", filterName, urlPattern, "web.xml"));
                 }
-                context.setAttribute(createFilterMappingUrlPatternKey(filterName, urlPatternStr), urlPattern);
+                context.setAttribute(createFilterMappingUrlPatternKey(filterName, urlPattern), urlPattern);
             }
         }
     }

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/FilterMergeHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/FilterMergeHandler.java?rev=957655&r1=957654&r2=957655&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/FilterMergeHandler.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/FilterMergeHandler.java Thu Jun 24 18:06:24 2010
@@ -22,35 +22,35 @@ import java.util.List;
 
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.web25.deployment.merge.MergeContext;
-import org.apache.geronimo.xbeans.javaee6.FilterType;
-import org.apache.geronimo.xbeans.javaee6.WebAppType;
-import org.apache.geronimo.xbeans.javaee6.WebFragmentType;
+import org.apache.openejb.jee.Filter;
+import org.apache.openejb.jee.WebApp;
+import org.apache.openejb.jee.WebFragment;
 
 /**
  * @version $Rev$ $Date$
  */
-public class FilterMergeHandler implements WebFragmentMergeHandler<WebFragmentType, WebAppType> {
+public class FilterMergeHandler implements WebFragmentMergeHandler<WebFragment, WebApp> {
 
-    private List<SubMergeHandler<FilterType, FilterType>> subMergeHandlers;
+    private List<SubMergeHandler<Filter, Filter>> subMergeHandlers;
 
     public FilterMergeHandler() {
-        subMergeHandlers = new ArrayList<SubMergeHandler<FilterType, FilterType>>();
+        subMergeHandlers = new ArrayList<SubMergeHandler<Filter, Filter>>();
         subMergeHandlers.add(new FilterInitParamMergeHandler());
     }
 
     @Override
-    public void merge(WebFragmentType webFragment, WebAppType webApp, MergeContext mergeContext) throws DeploymentException {
-        for (FilterType srcFilter : webFragment.getFilterArray()) {
-            String filterName = srcFilter.getFilterName().getStringValue();
-            FilterType targetFilter = (FilterType) mergeContext.getAttribute(createFilterKey(filterName));
+    public void merge(WebFragment webFragment, WebApp webApp, MergeContext mergeContext) throws DeploymentException {
+        for (Filter srcFilter : webFragment.getFilter()) {
+            String filterName = srcFilter.getFilterName();
+            Filter targetFilter = (Filter) mergeContext.getAttribute(createFilterKey(filterName));
             if (targetFilter == null) {
-                targetFilter = (FilterType) webApp.addNewFilter().set(srcFilter);
+                webApp.getFilter().add(srcFilter);
                 mergeContext.setAttribute(createFilterKey(filterName), targetFilter);
-                for (SubMergeHandler<FilterType, FilterType> subMergeHandler : subMergeHandlers) {
+                for (SubMergeHandler<Filter, Filter> subMergeHandler : subMergeHandlers) {
                     subMergeHandler.add(targetFilter, mergeContext);
                 }
             } else {
-                for (SubMergeHandler<FilterType, FilterType> subMergeHandler : subMergeHandlers) {
+                for (SubMergeHandler<Filter, Filter> subMergeHandler : subMergeHandlers) {
                     subMergeHandler.merge(srcFilter, targetFilter, mergeContext);
                 }
             }
@@ -58,18 +58,18 @@ public class FilterMergeHandler implemen
     }
 
     @Override
-    public void postProcessWebXmlElement(WebAppType webApp, MergeContext mergeContext) throws DeploymentException {
-        for (SubMergeHandler<FilterType, FilterType> subMergeHandler : subMergeHandlers) {
+    public void postProcessWebXmlElement(WebApp webApp, MergeContext mergeContext) throws DeploymentException {
+        for (SubMergeHandler<Filter, Filter> subMergeHandler : subMergeHandlers) {
             subMergeHandler.postProcessWebXmlElement(webApp, mergeContext);
         }
     }
 
     @Override
-    public void preProcessWebXmlElement(WebAppType webApp, MergeContext mergeContext) throws DeploymentException {
-        for (FilterType filter : webApp.getFilterArray()) {
-            mergeContext.setAttribute(createFilterKey(filter.getFilterName().getStringValue()), filter);
+    public void preProcessWebXmlElement(WebApp webApp, MergeContext mergeContext) throws DeploymentException {
+        for (Filter filter : webApp.getFilter()) {
+            mergeContext.setAttribute(createFilterKey(filter.getFilterName()), filter);
         }
-        for (SubMergeHandler<FilterType, FilterType> subMergeHandler : subMergeHandlers) {
+        for (SubMergeHandler<Filter, Filter> subMergeHandler : subMergeHandlers) {
             subMergeHandler.preProcessWebXmlElement(webApp, mergeContext);
         }
     }
@@ -82,11 +82,11 @@ public class FilterMergeHandler implemen
         return mergeContext.containsAttribute(createFilterKey(filterName));
     }
 
-    public static FilterType getFilter(String filterName, MergeContext mergeContext) {
-        return (FilterType) mergeContext.getAttribute(createFilterKey(filterName));
+    public static Filter getFilter(String filterName, MergeContext mergeContext) {
+        return (Filter) mergeContext.getAttribute(createFilterKey(filterName));
     }
 
-    public static void addFilter(FilterType filter, MergeContext mergeContext) {
-        mergeContext.setAttribute(createFilterKey(filter.getFilterName().getStringValue()), filter);
+    public static void addFilter(Filter filter, MergeContext mergeContext) {
+        mergeContext.setAttribute(createFilterKey(filter.getFilterName()), filter);
     }
 }

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/JspConfigMergeHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/JspConfigMergeHandler.java?rev=957655&r1=957654&r2=957655&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/JspConfigMergeHandler.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/JspConfigMergeHandler.java Thu Jun 24 18:06:24 2010
@@ -23,64 +23,66 @@ import org.apache.geronimo.web25.deploym
 import org.apache.geronimo.web25.deployment.merge.MergeHelper;
 import org.apache.geronimo.web25.deployment.merge.MergeItem;
 import org.apache.geronimo.web25.deployment.utils.WebDeploymentMessageUtils;
-import org.apache.geronimo.xbeans.javaee6.JspConfigType;
-import org.apache.geronimo.xbeans.javaee6.JspPropertyGroupType;
-import org.apache.geronimo.xbeans.javaee6.TaglibType;
-import org.apache.geronimo.xbeans.javaee6.WebAppType;
-import org.apache.geronimo.xbeans.javaee6.WebFragmentType;
+import org.apache.openejb.jee.JspConfig;
+import org.apache.openejb.jee.JspPropertyGroup;
+import org.apache.openejb.jee.Taglib;
+import org.apache.openejb.jee.WebApp;
+import org.apache.openejb.jee.WebFragment;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
  * @version $Rev$ $Date$
  */
-public class JspConfigMergeHandler implements WebFragmentMergeHandler<WebFragmentType, WebAppType> {
+public class JspConfigMergeHandler implements WebFragmentMergeHandler<WebFragment, WebApp> {
 
     private static final Logger logger = LoggerFactory.getLogger(JspConfigMergeHandler.class);
 
     @Override
-    public void merge(WebFragmentType webFragment, WebAppType webApp, MergeContext mergeContext) throws DeploymentException {
-        if (webFragment.getJspConfigArray().length == 0) {
+    public void merge(WebFragment webFragment, WebApp webApp, MergeContext mergeContext) throws DeploymentException {
+        if (webFragment.getJspConfig().isEmpty()) {
             return;
         }
-        if (webFragment.getJspConfigArray().length > 1) {
+        if (webFragment.getJspConfig().size() > 1) {
             logger.warn(WebDeploymentMessageUtils.createMultipleConfigurationWarningMessage("jsp-config", mergeContext.getCurrentJarUrl()));
         }
-        JspConfigType srcJspConfig = webFragment.getJspConfigArray(0);
-        JspConfigType targetJspConfig = webApp.getJspConfigArray().length == 0 ? webApp.addNewJspConfig() : webApp.getJspConfigArray(0);
+        JspConfig srcJspConfig = webFragment.getJspConfig().get(0);
+        if (webApp.getJspConfig().isEmpty()) {
+            webApp.getJspConfig().add( new JspConfig());
+        }
+        JspConfig targetJspConfig = webApp.getJspConfig().get(0);
         //Merge Tag lib configurations
-        for (TaglibType taglib : srcJspConfig.getTaglibArray()) {
-            if (MergeHelper.mergeRequired(createTaglibKey(taglib), "jsp-config/tag-lib", "taglib-uri", taglib.getTaglibUri().getStringValue(), "taglib-location", taglib.getTaglibLocation()
-                    .getStringValue(), mergeContext)) {
-                TaglibType newTaglib = targetJspConfig.addNewTaglib();
-                newTaglib.set(taglib);
+        for (Taglib taglib : srcJspConfig.getTaglib()) {
+            if (MergeHelper.mergeRequired(createTaglibKey(taglib), "jsp-config/tag-lib", "taglib-uri", taglib.getTaglibUri(), "taglib-location", taglib.getTaglibLocation()
+                    , mergeContext)) {
+                targetJspConfig.getTaglib().add(taglib);
             }
         }
         //Merge jsp-property-group configurations, seem that no merge actions are required, just add them to the web.xml file
-        for (JspPropertyGroupType srcJspPropertyGroup : srcJspConfig.getJspPropertyGroupArray()) {
-            targetJspConfig.addNewJspPropertyGroup().set(srcJspPropertyGroup);
+        for (JspPropertyGroup srcJspPropertyGroup : srcJspConfig.getJspPropertyGroup()) {
+            targetJspConfig.getJspPropertyGroup().add(srcJspPropertyGroup);
         }
     }
 
     @Override
-    public void postProcessWebXmlElement(WebAppType webApp, MergeContext context) throws DeploymentException {
+    public void postProcessWebXmlElement(WebApp webApp, MergeContext context) throws DeploymentException {
     }
 
     @Override
-    public void preProcessWebXmlElement(WebAppType webApp, MergeContext context) throws DeploymentException {
-        if (webApp.getJspConfigArray().length == 0) {
+    public void preProcessWebXmlElement(WebApp webApp, MergeContext context) throws DeploymentException {
+        if (webApp.getJspConfig().isEmpty()) {
             return;
         }
-        if (webApp.getJspConfigArray().length > 1) {
+        if (webApp.getJspConfig().size() > 1) {
             throw new DeploymentException(WebDeploymentMessageUtils.createMultipleConfigurationWebAppErrorMessage("jsp-config"));
         }
-        JspConfigType jspConfig = webApp.getJspConfigArray(0);
-        for (TaglibType taglib : jspConfig.getTaglibArray()) {
-            context.setAttribute(createTaglibKey(taglib), new MergeItem(taglib.getTaglibLocation().getStringValue(), null, ElementSource.WEB_XML));
+        JspConfig jspConfig = webApp.getJspConfig().get(0);
+        for (Taglib taglib : jspConfig.getTaglib()) {
+            context.setAttribute(createTaglibKey(taglib), new MergeItem(taglib.getTaglibLocation(), null, ElementSource.WEB_XML));
         }
     }
 
-    public static String createTaglibKey(TaglibType taglib) {
-        return "jsp-config.taglib.taglib-uri." + taglib.getTaglibUri().getStringValue();
+    public static String createTaglibKey(Taglib taglib) {
+        return "jsp-config.taglib.taglib-uri." + taglib.getTaglibUri();
     }
 }

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/ListenerMergeHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/ListenerMergeHandler.java?rev=957655&r1=957654&r2=957655&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/ListenerMergeHandler.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/ListenerMergeHandler.java Thu Jun 24 18:06:24 2010
@@ -19,37 +19,36 @@ package org.apache.geronimo.web25.deploy
 
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.web25.deployment.merge.MergeContext;
-import org.apache.geronimo.xbeans.javaee6.ListenerType;
-import org.apache.geronimo.xbeans.javaee6.WebAppType;
-import org.apache.geronimo.xbeans.javaee6.WebFragmentType;
+import org.apache.openejb.jee.Listener;
+import org.apache.openejb.jee.WebApp;
+import org.apache.openejb.jee.WebFragment;
 
 /**
  * According to the spec 8.2.3.g.vii
  * Multiple <listener> elements with the same <listener-class> are treated as a single <listener> declaration
  * @version $Rev$ $Date$
  */
-public class ListenerMergeHandler implements WebFragmentMergeHandler<WebFragmentType, WebAppType> {
+public class ListenerMergeHandler implements WebFragmentMergeHandler<WebFragment, WebApp> {
 
     @Override
-    public void merge(WebFragmentType webFragment, WebAppType webApp, MergeContext mergeContext) throws DeploymentException {
-        for (ListenerType listener : webFragment.getListenerArray()) {
-            String listenerClassName = listener.getListenerClass().getStringValue();
+    public void merge(WebFragment webFragment, WebApp webApp, MergeContext mergeContext) throws DeploymentException {
+        for (Listener listener : webFragment.getListener()) {
+            String listenerClassName = listener.getListenerClass();
             if (!mergeContext.containsAttribute(createListenerKey(listenerClassName))) {
-                ListenerType targetListener = webApp.addNewListener();
-                targetListener.addNewListenerClass().setStringValue(listenerClassName);
-                mergeContext.setAttribute(createListenerKey(listener.getListenerClass().getStringValue()), listener);
+                webApp.getListener().add(listener);
+                mergeContext.setAttribute(createListenerKey(listener.getListenerClass()), listener);
             }
         }
     }
 
     @Override
-    public void postProcessWebXmlElement(WebAppType webApp, MergeContext context) throws DeploymentException {
+    public void postProcessWebXmlElement(WebApp webApp, MergeContext context) throws DeploymentException {
     }
 
     @Override
-    public void preProcessWebXmlElement(WebAppType webApp, MergeContext context) throws DeploymentException {
-        for (ListenerType listener : webApp.getListenerArray()) {
-            context.setAttribute(createListenerKey(listener.getListenerClass().getStringValue()), listener);
+    public void preProcessWebXmlElement(WebApp webApp, MergeContext context) throws DeploymentException {
+        for (Listener listener : webApp.getListener()) {
+            context.setAttribute(createListenerKey(listener.getListenerClass()), listener);
         }
     }
 
@@ -61,7 +60,7 @@ public class ListenerMergeHandler implem
         return mergeContext.containsAttribute(createListenerKey(listenerClassName));
     }
 
-    public static void addListener(ListenerType listener, MergeContext mergeContext) {
-        mergeContext.setAttribute(createListenerKey(listener.getListenerClass().getStringValue()), listener);
+    public static void addListener(Listener listener, MergeContext mergeContext) {
+        mergeContext.setAttribute(createListenerKey(listener.getListenerClass()), listener);
     }
 }

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/LocaleEncodingMappingListMergeHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/LocaleEncodingMappingListMergeHandler.java?rev=957655&r1=957654&r2=957655&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/LocaleEncodingMappingListMergeHandler.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/LocaleEncodingMappingListMergeHandler.java Thu Jun 24 18:06:24 2010
@@ -22,21 +22,21 @@ import org.apache.geronimo.web25.deploym
 import org.apache.geronimo.web25.deployment.merge.MergeContext;
 import org.apache.geronimo.web25.deployment.merge.MergeItem;
 import org.apache.geronimo.web25.deployment.utils.WebDeploymentMessageUtils;
-import org.apache.geronimo.xbeans.javaee6.LocaleEncodingMappingListType;
-import org.apache.geronimo.xbeans.javaee6.LocaleEncodingMappingType;
-import org.apache.geronimo.xbeans.javaee6.WebAppType;
-import org.apache.geronimo.xbeans.javaee6.WebFragmentType;
+import org.apache.openejb.jee.LocaleEncodingMapping;
+import org.apache.openejb.jee.LocaleEncodingMappingList;
+import org.apache.openejb.jee.WebApp;
+import org.apache.openejb.jee.WebFragment;
 
 /**
  * @version $Rev$ $Date$
  */
-public class LocaleEncodingMappingListMergeHandler implements WebFragmentMergeHandler<WebFragmentType, WebAppType> {
+public class LocaleEncodingMappingListMergeHandler implements WebFragmentMergeHandler<WebFragment, WebApp> {
 
     @Override
-    public void merge(WebFragmentType webFragment, WebAppType webApp, MergeContext mergeContext) throws DeploymentException {
-        LocaleEncodingMappingListType targetLocaleEncodingMappingList = null;
-        for (LocaleEncodingMappingListType localeEncodingMappingList : webFragment.getLocaleEncodingMappingListArray()) {
-            for (LocaleEncodingMappingType localeEncodingMapping : localeEncodingMappingList.getLocaleEncodingMappingArray()) {
+    public void merge(WebFragment webFragment, WebApp webApp, MergeContext mergeContext) throws DeploymentException {
+        LocaleEncodingMappingList targetLocaleEncodingMappingList = webApp.getLocaleEncodingMappingList().isEmpty() ? null: webApp.getLocaleEncodingMappingList().get(0);
+        for (LocaleEncodingMappingList localeEncodingMappingList : webFragment.getLocaleEncodingMappingList()) {
+            for (LocaleEncodingMapping localeEncodingMapping : localeEncodingMappingList.getLocaleEncodingMapping()) {
                 String localeEncodingMappingKey = createLocaleEncodingMappingKey(localeEncodingMapping.getLocale());
                 MergeItem mergeItem = (MergeItem) mergeContext.getAttribute(localeEncodingMappingKey);
                 if (mergeItem != null && mergeItem.isFromWebFragment() && !mergeItem.getValue().equals(localeEncodingMapping.getEncoding())) {
@@ -44,39 +44,35 @@ public class LocaleEncodingMappingListMe
                             (String) mergeItem.getValue(), mergeItem.getBelongedURL(), localeEncodingMapping.getLocale(), mergeContext.getCurrentJarUrl()));
                 }
                 if (targetLocaleEncodingMappingList == null) {
-                    targetLocaleEncodingMappingList = webApp.getLocaleEncodingMappingListArray().length > 0 ? webApp.getLocaleEncodingMappingListArray(0) : webApp.addNewLocaleEncodingMappingList();
+                    targetLocaleEncodingMappingList = new LocaleEncodingMappingList();
+                    webApp.getLocaleEncodingMappingList().add(targetLocaleEncodingMappingList);
                 }
-                targetLocaleEncodingMappingList.addNewLocaleEncodingMapping().set(localeEncodingMapping);
+                targetLocaleEncodingMappingList.getLocaleEncodingMapping().add(localeEncodingMapping);
                 mergeContext.setAttribute(localeEncodingMappingKey, new MergeItem(localeEncodingMapping.getEncoding(), mergeContext.getCurrentJarUrl(), ElementSource.WEB_FRAGMENT));
             }
         }
     }
 
     @Override
-    public void postProcessWebXmlElement(WebAppType webApp, MergeContext context) throws DeploymentException {
+    public void postProcessWebXmlElement(WebApp webApp, MergeContext context) throws DeploymentException {
     }
 
     @Override
-    public void preProcessWebXmlElement(WebAppType webApp, MergeContext context) throws DeploymentException {
-        LocaleEncodingMappingListType[] localeEncodingMappingLists = webApp.getLocaleEncodingMappingListArray();
-        if (localeEncodingMappingLists.length == 0) {
-            return;
-        }
-        //Spec 14.2 While multiple locale-encoding-mapping lists are found, we need to concatenate the items
-        if (localeEncodingMappingLists.length > 1) {
-            LocaleEncodingMappingListType targetLocaleEncodingMappingList = localeEncodingMappingLists[0];
-            for (int i = 1; i < localeEncodingMappingLists.length; i++) {
-                LocaleEncodingMappingListType localeEncodingMappingList = localeEncodingMappingLists[i];
-                for (LocaleEncodingMappingType localeEncodingMapping : localeEncodingMappingList.getLocaleEncodingMappingArray()) {
-                    targetLocaleEncodingMappingList.addNewLocaleEncodingMapping().set(localeEncodingMapping);
-                }
-            }
-            for (int i = 1, iLength = localeEncodingMappingLists.length; i < iLength; i++) {
-                webApp.removeLocaleEncodingMappingList(1);
+    public void preProcessWebXmlElement(WebApp webApp, MergeContext context) throws DeploymentException {
+        LocaleEncodingMappingList targetLocaleEncodingMappingList = null;
+        for (LocaleEncodingMappingList list: webApp.getLocaleEncodingMappingList()) {
+            if (targetLocaleEncodingMappingList == null) {
+                targetLocaleEncodingMappingList = list;
+            } else {
+                targetLocaleEncodingMappingList.getLocaleEncodingMapping().addAll(list.getLocaleEncodingMapping());
             }
         }
-        for (LocaleEncodingMappingType localeEncodingMapping : webApp.getLocaleEncodingMappingListArray(0).getLocaleEncodingMappingArray()) {
-            context.setAttribute(createLocaleEncodingMappingKey(localeEncodingMapping.getLocale()), new MergeItem(localeEncodingMapping.getEncoding(), null, ElementSource.WEB_XML));
+        if (targetLocaleEncodingMappingList != null) {
+            webApp.getLocaleEncodingMappingList().clear();
+            webApp.getLocaleEncodingMappingList().add(targetLocaleEncodingMappingList);
+            for (LocaleEncodingMapping localeEncodingMapping : targetLocaleEncodingMappingList.getLocaleEncodingMapping()) {
+                context.setAttribute(createLocaleEncodingMappingKey(localeEncodingMapping.getLocale()), new MergeItem(localeEncodingMapping.getEncoding(), null, ElementSource.WEB_XML));
+            }
         }
     }
 

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/LoginConfigMergeHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/LoginConfigMergeHandler.java?rev=957655&r1=957654&r2=957655&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/LoginConfigMergeHandler.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/LoginConfigMergeHandler.java Thu Jun 24 18:06:24 2010
@@ -20,27 +20,27 @@ package org.apache.geronimo.web25.deploy
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.web25.deployment.merge.MergeContext;
 import org.apache.geronimo.web25.deployment.utils.WebDeploymentMessageUtils;
-import org.apache.geronimo.xbeans.javaee6.WebAppType;
-import org.apache.geronimo.xbeans.javaee6.WebFragmentType;
+import org.apache.openejb.jee.WebApp;
+import org.apache.openejb.jee.WebFragment;
 
 /**
  * @FIXME For login-config, no rules are mentioned in spec, from my understanding, we should only use the one from web.xml
  * @version $Rev$ $Date$
  */
-public class LoginConfigMergeHandler implements WebFragmentMergeHandler<WebFragmentType, WebAppType> {
+public class LoginConfigMergeHandler implements WebFragmentMergeHandler<WebFragment, WebApp> {
 
     @Override
-    public void merge(WebFragmentType srcElement, WebAppType targetElement, MergeContext mergeContext) throws DeploymentException {
+    public void merge(WebFragment srcElement, WebApp targetElement, MergeContext mergeContext) throws DeploymentException {
     }
 
     @Override
-    public void postProcessWebXmlElement(WebAppType webApp, MergeContext context) throws DeploymentException {
+    public void postProcessWebXmlElement(WebApp webApp, MergeContext context) throws DeploymentException {
         // TODO Auto-generated method stub
     }
 
     @Override
-    public void preProcessWebXmlElement(WebAppType webApp, MergeContext context) throws DeploymentException {
-        if (webApp.getLoginConfigArray().length > 1) {
+    public void preProcessWebXmlElement(WebApp webApp, MergeContext context) throws DeploymentException {
+        if (webApp.getLoginConfig().size() > 1) {
             throw new DeploymentException(WebDeploymentMessageUtils.createMultipleConfigurationWebAppErrorMessage("login-config"));
         }
     }

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/MessageDestinationMergeHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/MessageDestinationMergeHandler.java?rev=957655&r1=957654&r2=957655&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/MessageDestinationMergeHandler.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/MessageDestinationMergeHandler.java Thu Jun 24 18:06:24 2010
@@ -22,42 +22,42 @@ import org.apache.geronimo.web25.deploym
 import org.apache.geronimo.web25.deployment.merge.MergeContext;
 import org.apache.geronimo.web25.deployment.merge.MergeItem;
 import org.apache.geronimo.web25.deployment.utils.WebDeploymentMessageUtils;
-import org.apache.geronimo.xbeans.javaee6.MessageDestinationType;
-import org.apache.geronimo.xbeans.javaee6.WebAppType;
-import org.apache.geronimo.xbeans.javaee6.WebFragmentType;
+import org.apache.openejb.jee.MessageDestination;
+import org.apache.openejb.jee.WebApp;
+import org.apache.openejb.jee.WebFragment;
 
 /**
  * @version $Rev$ $Date$
  */
-public class MessageDestinationMergeHandler implements WebFragmentMergeHandler<WebFragmentType, WebAppType> {
+public class MessageDestinationMergeHandler implements WebFragmentMergeHandler<WebFragment, WebApp> {
 
     @Override
-    public void merge(WebFragmentType webFragment, WebAppType webApp, MergeContext mergeContext) throws DeploymentException {
-        for (MessageDestinationType messageDestination : webApp.getMessageDestinationArray()) {
-            String messageDestinationName = messageDestination.getMessageDestinationName().getStringValue();
-            if (mergeContext.containsAttribute(createMessageDestinationConfiguredInWebXMLKey(messageDestination.getMessageDestinationName().getStringValue()))) {
+    public void merge(WebFragment webFragment, WebApp webApp, MergeContext mergeContext) throws DeploymentException {
+        for (MessageDestination messageDestination : webApp.getMessageDestination()) {
+            String messageDestinationName = messageDestination.getMessageDestinationName();
+            if (mergeContext.containsAttribute(createMessageDestinationConfiguredInWebXMLKey(messageDestination.getMessageDestinationName()))) {
                 continue;
             }
             if (mergeContext.containsAttribute(createMessageDestinationConfiguredInWebFragmentXMLKey(messageDestinationName))) {
                 MergeItem mergeItem = (MergeItem) mergeContext.getAttribute(createMessageDestinationConfiguredInWebFragmentXMLKey(messageDestinationName));
                 throw new DeploymentException(WebDeploymentMessageUtils.createDuplicateJNDIRefMessage("message-destination", messageDestinationName, mergeItem.getBelongedURL(), mergeContext.getCurrentJarUrl()));
             } else {
-                MessageDestinationType newMessageDestination = (MessageDestinationType) webApp.addNewMessageDestination().set(messageDestination);
-                mergeContext.setAttribute(createMessageDestinationConfiguredInWebFragmentXMLKey(messageDestinationName), new MergeItem(newMessageDestination, mergeContext.getCurrentJarUrl(),
+                 webApp.getMessageDestination().add(messageDestination);
+                mergeContext.setAttribute(createMessageDestinationConfiguredInWebFragmentXMLKey(messageDestinationName), new MergeItem(messageDestination, mergeContext.getCurrentJarUrl(),
                         ElementSource.WEB_FRAGMENT));
             }
         }
     }
 
     @Override
-    public void postProcessWebXmlElement(WebAppType webApp, MergeContext context) throws DeploymentException {
+    public void postProcessWebXmlElement(WebApp webApp, MergeContext context) throws DeploymentException {
         // TODO Auto-generated method stub
     }
 
     @Override
-    public void preProcessWebXmlElement(WebAppType webApp, MergeContext context) throws DeploymentException {
-        for (MessageDestinationType messageDestination : webApp.getMessageDestinationArray()) {
-            context.setAttribute(createMessageDestinationConfiguredInWebXMLKey(messageDestination.getMessageDestinationName().getStringValue()), Boolean.TRUE);
+    public void preProcessWebXmlElement(WebApp webApp, MergeContext context) throws DeploymentException {
+        for (MessageDestination messageDestination : webApp.getMessageDestination()) {
+            context.setAttribute(createMessageDestinationConfiguredInWebXMLKey(messageDestination.getMessageDestinationName()), Boolean.TRUE);
         }
     }
 

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/MessageDestinationRefMergeHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/MessageDestinationRefMergeHandler.java?rev=957655&r1=957654&r2=957655&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/MessageDestinationRefMergeHandler.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/MessageDestinationRefMergeHandler.java Thu Jun 24 18:06:24 2010
@@ -22,15 +22,15 @@ import org.apache.geronimo.web25.deploym
 import org.apache.geronimo.web25.deployment.merge.MergeContext;
 import org.apache.geronimo.web25.deployment.merge.MergeItem;
 import org.apache.geronimo.web25.deployment.utils.WebDeploymentMessageUtils;
-import org.apache.geronimo.xbeans.javaee6.InjectionTargetType;
-import org.apache.geronimo.xbeans.javaee6.MessageDestinationRefType;
-import org.apache.geronimo.xbeans.javaee6.WebAppType;
-import org.apache.geronimo.xbeans.javaee6.WebFragmentType;
+import org.apache.openejb.jee.InjectionTarget;
+import org.apache.openejb.jee.MessageDestinationRef;
+import org.apache.openejb.jee.WebApp;
+import org.apache.openejb.jee.WebFragment;
 
 /**
  * @version $Rev$ $Date$
  */
-public class MessageDestinationRefMergeHandler implements WebFragmentMergeHandler<WebFragmentType, WebAppType> {
+public class MessageDestinationRefMergeHandler implements WebFragmentMergeHandler<WebFragment, WebApp> {
 
     public static final String MESSAGE_DESTINATION_REF_NAME_PREFIX = "message-destination-ref.message-destination-ref-name.";
 
@@ -42,9 +42,9 @@ public class MessageDestinationRefMergeH
      * b. web.xml file should inherit it from the web-fragment.xml file
      */
     @Override
-    public void merge(WebFragmentType webFragment, WebAppType webApp, MergeContext mergeContext) throws DeploymentException {
-        for (MessageDestinationRefType srcMessageDestinationRef : webFragment.getMessageDestinationRefArray()) {
-            String messageDestinationRefName = srcMessageDestinationRef.getMessageDestinationRefName().getStringValue();
+    public void merge(WebFragment webFragment, WebApp webApp, MergeContext mergeContext) throws DeploymentException {
+        for (MessageDestinationRef srcMessageDestinationRef : webFragment.getMessageDestinationRef()) {
+            String messageDestinationRefName = srcMessageDestinationRef.getMessageDestinationRefName();
             String messageDestinationRefKey = createMessageDestinationRefKey(messageDestinationRefName);
             MergeItem mergeItem = (MergeItem) mergeContext.getAttribute(messageDestinationRefKey);
             if (mergeItem != null) {
@@ -52,43 +52,43 @@ public class MessageDestinationRefMergeH
                     throw new DeploymentException(WebDeploymentMessageUtils.createDuplicateJNDIRefMessage("message-destination-ref", messageDestinationRefName, mergeItem.getBelongedURL(), mergeContext.getCurrentJarUrl()));
                 } else if (mergeItem.isFromWebXml() && !isMessageDestinationRefInjectTargetsConfiguredInInitialWebXML(messageDestinationRefName, mergeContext)) {
                     //Merge InjectTarget
-                    MessageDestinationRefType messageDestinationRef = (MessageDestinationRefType) mergeItem.getValue();
-                    for (InjectionTargetType injectTarget : srcMessageDestinationRef.getInjectionTargetArray()) {
-                        String messageDestinationRefInjectTargetKey = createMessageDestinationRefInjectTargetKey(messageDestinationRefName, injectTarget.getInjectionTargetClass().getStringValue(), injectTarget
-                                .getInjectionTargetName().getStringValue());
+                    MessageDestinationRef messageDestinationRef = (MessageDestinationRef) mergeItem.getValue();
+                    for (InjectionTarget injectTarget : srcMessageDestinationRef.getInjectionTarget()) {
+                        String messageDestinationRefInjectTargetKey = createMessageDestinationRefInjectTargetKey(messageDestinationRefName, injectTarget.getInjectionTargetClass(), injectTarget
+                                .getInjectionTargetName());
                         if (!mergeContext.containsAttribute(messageDestinationRefInjectTargetKey)) {
-                            messageDestinationRef.addNewInjectionTarget().set(injectTarget);
+                            messageDestinationRef.getInjectionTarget().add(injectTarget);
                             mergeContext.setAttribute(messageDestinationRefInjectTargetKey, Boolean.TRUE);
                         }
                     }
                 }
             } else {
-                MessageDestinationRefType targetMessageDestinationRef = (MessageDestinationRefType) webApp.addNewMessageDestinationRef().set(srcMessageDestinationRef);
-                mergeContext.setAttribute(messageDestinationRefKey, new MergeItem(targetMessageDestinationRef, mergeContext.getCurrentJarUrl(), ElementSource.WEB_FRAGMENT));
-                for (InjectionTargetType injectionTarget : targetMessageDestinationRef.getInjectionTargetArray()) {
-                    mergeContext.setAttribute(createMessageDestinationRefInjectTargetKey(messageDestinationRefName, injectionTarget.getInjectionTargetClass().getStringValue(), injectionTarget.getInjectionTargetName()
-                            .getStringValue()), Boolean.TRUE);
+                webApp.getMessageDestinationRef().add(srcMessageDestinationRef);
+                mergeContext.setAttribute(messageDestinationRefKey, new MergeItem(srcMessageDestinationRef, mergeContext.getCurrentJarUrl(), ElementSource.WEB_FRAGMENT));
+                for (InjectionTarget injectionTarget : srcMessageDestinationRef.getInjectionTarget()) {
+                    mergeContext.setAttribute(createMessageDestinationRefInjectTargetKey(messageDestinationRefName, injectionTarget.getInjectionTargetClass(), injectionTarget.getInjectionTargetName()
+                            ), Boolean.TRUE);
                 }
             }
         }
     }
 
     @Override
-    public void postProcessWebXmlElement(WebAppType webApp, MergeContext context) throws DeploymentException {
+    public void postProcessWebXmlElement(WebApp webApp, MergeContext context) throws DeploymentException {
     }
 
     @Override
-    public void preProcessWebXmlElement(WebAppType webApp, MergeContext mergeContext) throws DeploymentException {
-        for (MessageDestinationRefType messageDestinationRef : webApp.getMessageDestinationRefArray()) {
-            String messageDestinationRefName = messageDestinationRef.getMessageDestinationRefName().getStringValue();
+    public void preProcessWebXmlElement(WebApp webApp, MergeContext mergeContext) throws DeploymentException {
+        for (MessageDestinationRef messageDestinationRef : webApp.getMessageDestinationRef()) {
+            String messageDestinationRefName = messageDestinationRef.getMessageDestinationRefName();
             mergeContext.setAttribute(createMessageDestinationRefKey(messageDestinationRefName), new MergeItem(messageDestinationRef, null, ElementSource.WEB_XML));
             //Create an attribute tag to indicate whether injectTarget is configured in web.xml file
-            if (messageDestinationRef.getInjectionTargetArray().length > 0) {
+            if (!messageDestinationRef.getInjectionTarget().isEmpty()) {
                 mergeContext.setAttribute(createMessageDestinationRefInjectTargetConfiguredInWebXMLKey(messageDestinationRefName), Boolean.TRUE);
             }
-            for (InjectionTargetType injectionTarget : messageDestinationRef.getInjectionTargetArray()) {
-                mergeContext.setAttribute(createMessageDestinationRefInjectTargetKey(messageDestinationRefName, injectionTarget.getInjectionTargetClass().getStringValue(), injectionTarget.getInjectionTargetName()
-                        .getStringValue()), Boolean.TRUE);
+            for (InjectionTarget injectionTarget : messageDestinationRef.getInjectionTarget()) {
+                mergeContext.setAttribute(createMessageDestinationRefInjectTargetKey(messageDestinationRefName, injectionTarget.getInjectionTargetClass(), injectionTarget.getInjectionTargetName()
+                        ), Boolean.TRUE);
             }
         }
     }

Modified: geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/MimeMappingMergeHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/MimeMappingMergeHandler.java?rev=957655&r1=957654&r2=957655&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/MimeMappingMergeHandler.java (original)
+++ geronimo/server/trunk/plugins/j2ee/geronimo-web-2.5-builder/src/main/java/org/apache/geronimo/web25/deployment/merge/webfragment/MimeMappingMergeHandler.java Thu Jun 24 18:06:24 2010
@@ -22,19 +22,19 @@ import org.apache.geronimo.web25.deploym
 import org.apache.geronimo.web25.deployment.merge.MergeContext;
 import org.apache.geronimo.web25.deployment.merge.MergeItem;
 import org.apache.geronimo.web25.deployment.utils.WebDeploymentMessageUtils;
-import org.apache.geronimo.xbeans.javaee6.MimeMappingType;
-import org.apache.geronimo.xbeans.javaee6.WebAppType;
-import org.apache.geronimo.xbeans.javaee6.WebFragmentType;
+import org.apache.openejb.jee.MimeMapping;
+import org.apache.openejb.jee.WebApp;
+import org.apache.openejb.jee.WebFragment;
 
 /**
  * @version $Rev$ $Date$
  */
-public class MimeMappingMergeHandler implements WebFragmentMergeHandler<WebFragmentType, WebAppType> {
+public class MimeMappingMergeHandler implements WebFragmentMergeHandler<WebFragment, WebApp> {
 
     @Override
-    public void merge(WebFragmentType webFragment, WebAppType webApp, MergeContext mergeContext) throws DeploymentException {
-        for (MimeMappingType mimeMapping : webFragment.getMimeMappingArray()) {
-            String extension = mimeMapping.getExtension().getStringValue();
+    public void merge(WebFragment webFragment, WebApp webApp, MergeContext mergeContext) throws DeploymentException {
+        for (MimeMapping mimeMapping : webFragment.getMimeMapping()) {
+            String extension = mimeMapping.getExtension();
             if (isMimeMappingConfiguredInWebXML(extension, mergeContext)) {
                 continue;
             }
@@ -42,23 +42,23 @@ public class MimeMappingMergeHandler imp
             String qualifedMimeMappingName = createMimeMappingConfiguredInWebFragmentXMLKey(extension);
             MergeItem existedMimeMapping = (MergeItem) mergeContext.getAttribute(qualifedMimeMappingName);
             if (existedMimeMapping == null) {
-                mergeContext.setAttribute(qualifedMimeMappingName, new MergeItem(mimeMapping.getMimeType().getStringValue(), jarUrl, ElementSource.WEB_FRAGMENT));
-                webApp.addNewMimeMapping().set(mimeMapping);
-            } else if (!mimeMapping.getMimeType().getStringValue().equals(existedMimeMapping.getValue())) {
+                mergeContext.setAttribute(qualifedMimeMappingName, new MergeItem(mimeMapping.getMimeType(), jarUrl, ElementSource.WEB_FRAGMENT));
+                webApp.getMimeMapping().add(mimeMapping);
+            } else if (!mimeMapping.getMimeType().equals(existedMimeMapping.getValue())) {
                 throw new DeploymentException(WebDeploymentMessageUtils.createDuplicateKeyValueMessage("mime-mapping", "extension", extension, "mime-type", (String) existedMimeMapping.getValue(), existedMimeMapping
-                        .getBelongedURL(), mimeMapping.getMimeType().getStringValue(), jarUrl));
+                        .getBelongedURL(), mimeMapping.getMimeType(), jarUrl));
             }
         }
     }
 
     @Override
-    public void postProcessWebXmlElement(WebAppType webApp, MergeContext context) throws DeploymentException {
+    public void postProcessWebXmlElement(WebApp webApp, MergeContext context) throws DeploymentException {
     }
 
     @Override
-    public void preProcessWebXmlElement(WebAppType webApp, MergeContext context) throws DeploymentException {
-        for (MimeMappingType mimeMapping : webApp.getMimeMappingArray()) {
-            context.setAttribute(createMimeMappingConfiguredInWebXMLKey(mimeMapping.getExtension().getStringValue()), Boolean.TRUE);
+    public void preProcessWebXmlElement(WebApp webApp, MergeContext context) throws DeploymentException {
+        for (MimeMapping mimeMapping : webApp.getMimeMapping()) {
+            context.setAttribute(createMimeMappingConfiguredInWebXMLKey(mimeMapping.getExtension()), Boolean.TRUE);
         }
     }
 



Mime
View raw message