You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-scm@portals.apache.org by ms...@apache.org on 2015/11/27 13:37:58 UTC

[17/38] portals-pluto git commit: Adapted Puto to use new configuration classes

Adapted Puto to use new configuration classes


Project: http://git-wip-us.apache.org/repos/asf/portals-pluto/repo
Commit: http://git-wip-us.apache.org/repos/asf/portals-pluto/commit/54db2766
Tree: http://git-wip-us.apache.org/repos/asf/portals-pluto/tree/54db2766
Diff: http://git-wip-us.apache.org/repos/asf/portals-pluto/diff/54db2766

Branch: refs/heads/V3Prototype
Commit: 54db27666c805f810751b2e9a791f63111adc7bc
Parents: bf15b33
Author: Scott Nicklous <ms...@apache.org>
Authored: Tue Oct 27 07:35:04 2015 +0100
Committer: Scott Nicklous <ms...@apache.org>
Committed: Tue Oct 27 07:35:04 2015 +0100

----------------------------------------------------------------------
 maven-pluto-plugin/pom.xml                      |   6 +
 .../om/portlet/impl/ConfigurationProcessor.java |   4 +
 .../impl/JSR168ConfigurationProcessor.java      |   4 +-
 .../impl/JSR286ConfigurationProcessor.java      |  11 +-
 .../impl/JSR362ConfigurationProcessor.java      |   4 +-
 .../container/EventCoordinationServiceImpl.java | 671 ++++++++++---------
 .../services/container/EventProviderImpl.java   | 328 +++++----
 .../services/container/PortletWindowThread.java | 320 +++++----
 .../container/DriverPortletConfigImpl.java      |  15 +-
 .../PublicRenderParameterQNameMapper.java       |  10 -
 .../container/ResourceBundleFactoryTest.java    |  14 +-
 pluto-util/pom.xml                              |   6 +
 .../assemble/SecondWarTestPortletClass.java     |  78 +++
 .../util/assemble/WarTestPortletClass.java      |  78 +++
 .../assemble/ear/ComplexEarDeployerTest.ear     | Bin 3411 -> 3276 bytes
 .../pluto/util/assemble/ear/EarDeployerTest.ear | Bin 1711 -> 1892 bytes
 .../apache/pluto/util/assemble/file/portlet.xml |  78 +--
 .../assemble/war/WarDeployerTestPortlet.war     | Bin 1456 -> 1779 bytes
 .../war/WarDeployerTestPortletNoManifest.war    | Bin 1024 -> 1188 bytes
 pom.xml                                         |   2 +-
 20 files changed, 891 insertions(+), 738 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/54db2766/maven-pluto-plugin/pom.xml
----------------------------------------------------------------------
diff --git a/maven-pluto-plugin/pom.xml b/maven-pluto-plugin/pom.xml
index aa19829..6fc3eed 100644
--- a/maven-pluto-plugin/pom.xml
+++ b/maven-pluto-plugin/pom.xml
@@ -38,6 +38,12 @@
       <scope>compile</scope>
     </dependency>
     <dependency>
+      <groupId>org.apache.portals.pluto</groupId>
+      <artifactId>portlet-api</artifactId>
+      <version>${project.version}</version>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-core</artifactId>
     </dependency>

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/54db2766/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/ConfigurationProcessor.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/ConfigurationProcessor.java b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/ConfigurationProcessor.java
index 455f9e9..bfd6c6e 100644
--- a/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/ConfigurationProcessor.java
+++ b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/ConfigurationProcessor.java
@@ -116,6 +116,10 @@ public abstract class ConfigurationProcessor {
             txt.append(assignable.getCanonicalName());
             throw new Exception();
          }
+      } catch (ClassNotFoundException e) {
+         LOG.warn(txt.toString() + e.getLocalizedMessage());
+         // can't throw exception if class not found, since the portlet
+         // application definition is used by the assembly mojo
       } catch (Exception e) {
          LOG.warn(txt.toString());
          throw new IllegalArgumentException(txt.toString(), e);

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/54db2766/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/JSR168ConfigurationProcessor.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/JSR168ConfigurationProcessor.java b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/JSR168ConfigurationProcessor.java
index e0a6468..89304a9 100644
--- a/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/JSR168ConfigurationProcessor.java
+++ b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/JSR168ConfigurationProcessor.java
@@ -442,9 +442,9 @@ public class JSR168ConfigurationProcessor extends ConfigurationProcessor {
          String warning;
          String pn = portlet.getPortletName().getValue();
          if (!isValidIdentifier(pn)) {
-            warning = "Bad portlet name: " + pn;
+            warning = "Portlet name not valid Java identifier: " + pn;
             LOG.warn(warning);
-            throw new IllegalArgumentException(warning);
+            // throw new IllegalArgumentException(warning);
          }
          
          String clsName = portlet.getPortletClass();

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/54db2766/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/JSR286ConfigurationProcessor.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/JSR286ConfigurationProcessor.java b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/JSR286ConfigurationProcessor.java
index 2e9e940..0f32ad0 100644
--- a/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/JSR286ConfigurationProcessor.java
+++ b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/JSR286ConfigurationProcessor.java
@@ -560,7 +560,7 @@ public class JSR286ConfigurationProcessor extends ConfigurationProcessor {
 
          // validate data
          if ((item.getName() == null) || (item.getName().getValue() == null)) {
-            String warning = "Bad portlet preference. Ppreference name was null.";
+            String warning = "Bad portlet preference. Preference name was null.";
             LOG.warn(warning);
             throw new IllegalArgumentException(warning);
          }
@@ -572,7 +572,10 @@ public class JSR286ConfigurationProcessor extends ConfigurationProcessor {
          for (ValueType vt : vals) {
             lines.add(vt.getValue());
          }
-         boolean isRO = (item.getReadOnly().value().equalsIgnoreCase("true"));
+         boolean isRO = false;      // default if not specified
+         if (item.getReadOnly() != null && item.getReadOnly().value() != null) {
+            isRO = (item.getReadOnly().value().equalsIgnoreCase("true"));
+         }
 
          Preference pref = new PreferenceImpl(name, isRO, lines);
          list.add(pref);
@@ -770,9 +773,9 @@ public class JSR286ConfigurationProcessor extends ConfigurationProcessor {
          String warning;
          String pn = portlet.getPortletName().getValue();
          if (!isValidIdentifier(pn)) {
-            warning = "Bad portlet name: " + pn;
+            warning = "Portlet name not valid Java identifier: " + pn;
             LOG.warn(warning);
-            throw new IllegalArgumentException(warning);
+            //throw new IllegalArgumentException(warning);
          }
 
          String clsName = portlet.getPortletClass();

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/54db2766/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/JSR362ConfigurationProcessor.java
----------------------------------------------------------------------
diff --git a/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/JSR362ConfigurationProcessor.java b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/JSR362ConfigurationProcessor.java
index d23afc2..e20898d 100644
--- a/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/JSR362ConfigurationProcessor.java
+++ b/pluto-container/src/main/java/org/apache/pluto/container/om/portlet/impl/JSR362ConfigurationProcessor.java
@@ -770,9 +770,9 @@ public class JSR362ConfigurationProcessor extends ConfigurationProcessor {
          String warning;
          String pn = portlet.getPortletName().getValue();
          if (!isValidIdentifier(pn)) {
-            warning = "Bad portlet name: " + pn;
+            warning = "Portlet name not valid Java identifier: " + pn;
             LOG.warn(warning);
-            throw new IllegalArgumentException(warning);
+            // throw new IllegalArgumentException(warning);
          }
 
          String clsName = portlet.getPortletClass();

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/54db2766/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/EventCoordinationServiceImpl.java
----------------------------------------------------------------------
diff --git a/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/EventCoordinationServiceImpl.java b/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/EventCoordinationServiceImpl.java
index f34dcd9..3048273 100644
--- a/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/EventCoordinationServiceImpl.java
+++ b/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/EventCoordinationServiceImpl.java
@@ -57,341 +57,362 @@ import java.io.Serializable;
 import java.io.StringReader;
 import java.util.*;
 
-public class EventCoordinationServiceImpl implements EventCoordinationService
-{
-	/** Logger. */
-	private static final Logger LOG = LoggerFactory.getLogger(EventCoordinationServiceImpl.class);
-
-	private static final long WAITING_CYCLE = 100;
-
-	/** PortletRegistryService used to obtain PortletApplicationConfig objects */
-	private final PortletRegistryService portletRegistry;
-
-	/** PortletContextService used to obtain PortletContext objects */
-    private final PortletContextService portletContextService;
-
-    public EventCoordinationServiceImpl(PortletRegistryService portletRegistry, PortletContextService portletContextService) {
-        this.portletRegistry = portletRegistry;
-        this.portletContextService = portletContextService;
-    }
-
-    public void processEvents(PortletContainer container, PortletWindow portletWindow, HttpServletRequest request,
-                              HttpServletResponse response, List<Event> events)
-    {
-        ServletContext containerServletContext = PortalRequestContext.getContext(request).getServletContext();
-        DriverConfiguration driverConfig = (DriverConfiguration) containerServletContext
-                .getAttribute(AttributeKeys.DRIVER_CONFIG);
-
-        // PortalURL portalURL = PortalURLParserImpl.getParser().parse(request);
-        PortalURL portalURL = PortalRequestContext.getContext(request).createPortalURL();
-
-//      Map<String, PortletWindowThread> portletWindowThreads = new HashMap<String, PortletWindowThread>();
-
-//      ThreadGroup threadGroup = new ThreadGroup("FireEventThreads");
-
-        for (Event event : events)
-        {
-            List<String> portletNames = getAllPortletsRegisteredForEvent(
-                    event, driverConfig, containerServletContext);
-
-            // Deliver events to all portlets in the portal
-            // Collection<PortletWindowConfig> portlets = getAllPortlets(driverConfig);
-            
-            // Limit event delivery to portlets that are on the current page
-            Collection<PortletWindowConfig> portlets = new ArrayList<PortletWindowConfig>();
-            for (String pid : portalURL.getPortletIds()) {
-               portlets.add(PortletWindowConfig.fromId(pid));
+public class EventCoordinationServiceImpl implements EventCoordinationService {
+   /** Logger. */
+   private static final Logger          LOG           = LoggerFactory
+                                                            .getLogger(EventCoordinationServiceImpl.class);
+
+   private static final long            WAITING_CYCLE = 100;
+
+   /** PortletRegistryService used to obtain PortletApplicationConfig objects */
+   private final PortletRegistryService portletRegistry;
+
+   /** PortletContextService used to obtain PortletContext objects */
+   private final PortletContextService  portletContextService;
+
+   public EventCoordinationServiceImpl(PortletRegistryService portletRegistry,
+         PortletContextService portletContextService) {
+      this.portletRegistry = portletRegistry;
+      this.portletContextService = portletContextService;
+   }
+
+   public void processEvents(PortletContainer container,
+         PortletWindow portletWindow, HttpServletRequest request,
+         HttpServletResponse response, List<Event> events) {
+      ServletContext containerServletContext = PortalRequestContext.getContext(
+            request).getServletContext();
+      DriverConfiguration driverConfig = (DriverConfiguration) containerServletContext
+            .getAttribute(AttributeKeys.DRIVER_CONFIG);
+
+      // PortalURL portalURL = PortalURLParserImpl.getParser().parse(request);
+      PortalURL portalURL = PortalRequestContext.getContext(request)
+            .createPortalURL();
+
+      // Map<String, PortletWindowThread> portletWindowThreads = new
+      // HashMap<String, PortletWindowThread>();
+
+      // ThreadGroup threadGroup = new ThreadGroup("FireEventThreads");
+
+      for (Event event : events) {
+         List<String> portletNames = getAllPortletsRegisteredForEvent(event,
+               driverConfig, containerServletContext);
+
+         // Deliver events to all portlets in the portal
+         // Collection<PortletWindowConfig> portlets =
+         // getAllPortlets(driverConfig);
+
+         // Limit event delivery to portlets that are on the current page
+         Collection<PortletWindowConfig> portlets = new ArrayList<PortletWindowConfig>();
+         for (String pid : portalURL.getPortletIds()) {
+            portlets.add(PortletWindowConfig.fromId(pid));
+         }
+
+         // iterate all portlets in the portal
+         for (PortletWindowConfig config : portlets) {
+            PortletWindow window = new PortletWindowImpl(container, config,
+                  portalURL);
+            if (portletNames != null) {
+               for (String portlet : portletNames) {
+                  if (portlet.equals(config.getId())) {
+                     /*
+                      * PLUTO-569: multi-threaded (event) request processing
+                      * isn't thread save with the Pluto Portal Driver handling
+                      * of request attributes as they all are stored/managed
+                      * within the single underlying HttpServletRequest.
+                      * Providing proper thread save parallel request processing
+                      * would require extensive enhancements to the Pluto Portal
+                      * Driver and as such is out-of-scope for the purpose of
+                      * the Portal Driver itself.
+                      * 
+                      * // the thread now is a new one, with possible //
+                      * waiting, // for the old to exit
+                      * 
+                      * 
+                      * PortletWindowThread portletWindowThread =
+                      * getPortletWindowThread(portletWindowThreads,
+                      * threadGroup, container, config, window, request,
+                      * response, containerServletContext);
+                      * 
+                      * // is this event portletWindowThread.addEvent(event);
+                      * 
+                      * portletWindowThread.start();
+                      * 
+                      * } } } } waitForEventExecution(threadGroup); try {
+                      * Thread.sleep(WAITING_CYCLE); } catch
+                      * (InterruptedException e) { LOG.warn(e.getMessage(),e); }
+                      * } waitForEventExecution(threadGroup);
+                      */
+                     doEvent(container, window, event, request, response);
+                  }
+               }
             }
+         }
+      }
+   }
 
-            // iterate all portlets in the portal
-            for (PortletWindowConfig config : portlets) {
-                PortletWindow window = new PortletWindowImpl(container, config, portalURL);
-                if (portletNames != null) {
-                    for (String portlet : portletNames) {
-                        if (portlet.equals(config.getId())) {
-/* PLUTO-569: multi-threaded (event) request processing isn't thread save with the Pluto Portal Driver handling of request attributes
-   as they all are stored/managed within the single underlying HttpServletRequest.
-   Providing proper thread save parallel request processing would require extensive enhancements to the Pluto Portal Driver and as
-   such is out-of-scope for the purpose of the Portal Driver itself.
-
-                            // the thread now is a new one, with possible
-                            // waiting,
-                            // for the old to exit
-                            
-
-                            PortletWindowThread portletWindowThread = getPortletWindowThread(portletWindowThreads,
-                                    threadGroup, container, config, window, request, response, containerServletContext);
-
-                            // is this event
-                            portletWindowThread.addEvent(event);
-
-                            portletWindowThread.start();
-                            
-                        }
-                    }
-                }
+   protected void doEvent(PortletContainer container,
+         PortletWindow portletWindow, Event event, HttpServletRequest request,
+         HttpServletResponse response) {
+      try {
+         Object value = event.getValue();
+
+         XMLStreamReader xml = null;
+         try {
+            if (value instanceof String) {
+               String in = (String) value;
+               xml = XMLInputFactory.newInstance().createXMLStreamReader(
+                     new StringReader(in));
             }
-            waitForEventExecution(threadGroup);
+         } catch (XMLStreamException e1) {
+            throw new IllegalStateException(e1);
+         } catch (FactoryConfigurationError e1) {
+            throw new IllegalStateException(e1);
+         }
+
+         if (xml != null) {
+            // XMLStreamReader xml = (XMLStreamReader) event.getValue();
+
+            // provider.getEventDefinition(event.getQName());
             try {
-                Thread.sleep(WAITING_CYCLE);
-            } catch (InterruptedException e) {
-                LOG.warn(e.getMessage(),e);
+               // now test if object is jaxb
+               EventDefinition eventDefinitionDD = getEventDefintion(
+                     portletWindow, event.getQName());
+
+               ClassLoader loader = portletContextService
+                     .getClassLoader(portletWindow.getPortletDefinition()
+                           .getApplication().getName());
+               Class<? extends Serializable> clazz = loader.loadClass(
+                     eventDefinitionDD.getValueType()).asSubclass(
+                     Serializable.class);
+
+               JAXBContext jc = JAXBContext.newInstance(clazz);
+               Unmarshaller unmarshaller = jc.createUnmarshaller();
+
+               // unmarshaller.setEventHandler(new
+               // javax.xml.bind.helpers.DefaultValidationEventHandler());
+
+               JAXBElement result = unmarshaller.unmarshal(xml, clazz);
+
+               event = new EventImpl(event.getQName(),
+                     (Serializable) result.getValue());
+            } catch (JAXBException e) {
+               throw new IllegalStateException(e);
+            } catch (ClassCastException e) {
+               throw new IllegalStateException(e);
+            } catch (ClassNotFoundException e) {
+               throw new IllegalStateException(e);
+            } catch (PortletContainerException e) {
+               throw new IllegalStateException(e);
             }
-        }
-        waitForEventExecution(threadGroup);
-*/                          
-                            doEvent(container, window, event, request, response);
+         }
+         container.doEvent(portletWindow, request, response, event);
+      } catch (PortletException e) {
+         LOG.warn(e.getMessage(), e);
+      } catch (IOException e) {
+         LOG.warn(e.getMessage(), e);
+      } catch (PortletContainerException e) {
+         LOG.warn(e.getMessage(), e);
+      }
+   }
+
+   private EventDefinition getEventDefintion(PortletWindow portletWindow, QName name) {
+      PortletApplicationDefinition appDD = portletWindow.getPortletDefinition().getApplication();
+      
+      for (EventDefinition def : appDD.getEventDefinitions()) {
+         if (def.getQName().equals(name)) {
+            return def;
+         }
+      }
+      
+      throw new IllegalStateException();
+   }
+
+   private List<String> getAllPortletsRegisteredForEvent(Event event,
+         DriverConfiguration driverConfig,
+         ServletContext containerServletContext) {
+      Set<String> resultSet = new HashSet<String>();
+      List<String> resultList = new ArrayList<String>();
+      QName eventName = event.getQName();
+      Collection<PortletWindowConfig> portlets = getAllPortlets(driverConfig);
+
+      for (PortletWindowConfig portlet : portlets) {
+         String contextPath = portlet.getContextPath();
+         String applicationName = contextPath;
+         PortletApplicationDefinition portletAppDD = null;
+         try {
+            portletAppDD = portletRegistry
+                  .getPortletApplication(applicationName);
+            List<? extends PortletDefinition> portletDDs = portletAppDD
+                  .getPortlets();
+            List<QName> aliases = getAllAliases(eventName, portletAppDD);
+            for (PortletDefinition portletDD : portletDDs) {
+               List<? extends EventDefinitionReference> processingEvents = portletDD
+                     .getSupportedProcessingEvents();
+               if (isEventSupported(processingEvents, eventName,
+                     portletAppDD.getDefaultNamespace())) {
+                  if (portletDD.getPortletName().equals(
+                        portlet.getPortletName())) {
+                     resultSet.add(portlet.getId());
+                  }
+               } else {
+
+                  if (processingEvents != null) {
+                     for (EventDefinitionReference ref : processingEvents) {
+                        QName name = ref.getQualifiedName();
+                        if (name == null) {
+                           continue;
                         }
-                    }
-                }
-            }
-        }
-    }
-    
-    protected void doEvent(PortletContainer container, PortletWindow portletWindow, Event event, 
-                               HttpServletRequest request, HttpServletResponse response ) {
-        try {
-            Object value = event.getValue();
-            
-            XMLStreamReader xml = null;
-            try {
-                if (value instanceof String) {
-                    String in = (String) value; 
-                    xml = XMLInputFactory.newInstance().createXMLStreamReader(new StringReader(in));
-                }           
-            }  
-            catch (XMLStreamException e1) {
-                throw new IllegalStateException(e1);
-            } catch (FactoryConfigurationError e1) {
-                throw new IllegalStateException(e1);
-            }
-            
-            if (xml != null) {
-                //XMLStreamReader xml = (XMLStreamReader) event.getValue();
-                
-                    //provider.getEventDefinition(event.getQName());
-                try {
-                    // now test if object is jaxb
-                    EventDefinition eventDefinitionDD = getEventDefintion(portletWindow, event.getQName()); 
-                    
-                    ClassLoader loader = portletContextService.getClassLoader(portletWindow.getPortletDefinition().getApplication().getName());
-                    Class<? extends Serializable> clazz = loader.loadClass(eventDefinitionDD.getValueType()).asSubclass(Serializable.class);
-
-                    JAXBContext jc = JAXBContext.newInstance(clazz);
-                    Unmarshaller unmarshaller  = jc.createUnmarshaller();
-
-//                  unmarshaller.setEventHandler(new javax.xml.bind.helpers.DefaultValidationEventHandler());
-
-                    JAXBElement result = unmarshaller.unmarshal(xml,clazz);
-
-                    event =  new EventImpl(event.getQName(),(Serializable) result.getValue());
-                } catch (JAXBException e) {
-                    throw new IllegalStateException(e);
-                } catch (ClassCastException e) {
-                    throw new IllegalStateException(e);
-                } catch (ClassNotFoundException e) {
-                    throw new IllegalStateException(e);
-                } catch (PortletContainerException e) {
-                    throw new IllegalStateException(e);
-                }
-            }                   
-            container.doEvent(portletWindow, request, response, event); 
-        } catch (PortletException e) {
-            LOG.warn(e.getMessage(),e);
-        } catch (IOException e) {
-            LOG.warn(e.getMessage(),e);
-        } catch (PortletContainerException e) {
-            LOG.warn(e.getMessage(),e);
-        }   
-    }
-
-    private EventDefinition getEventDefintion(PortletWindow portletWindow, QName name) {
-        PortletApplicationDefinition appDD = portletWindow.getPortletDefinition().getApplication();
-        for (EventDefinition def : appDD.getEventDefinitions()){
-            if (def.getQName() != null){
-                if (def.getQName().equals(name))
-                    return def;
+                        // add also grouped portlets, that ends with "."
+                        if (name.toString().endsWith(".")
+                              && eventName.toString().startsWith(
+                                    name.toString())
+                              && portletDD.getPortletName().equals(
+                                    portlet.getPortletName())) {
+                           resultSet.add(portlet.getId());
+                        }
+                        // also look for alias names:
+                        if (aliases != null) {
+                           for (QName alias : aliases) {
+                              if (alias.toString().equals(name.toString())
+                                    && portletDD.getPortletName().equals(
+                                          portlet.getPortletName())) {
+                                 resultSet.add(portlet.getId());
+                              }
+                           }
+                        }
+                        // also look for default namespaced events
+                        if (name.getNamespaceURI() == null
+                              || name.getNamespaceURI().equals("")) {
+                           String defaultNamespace = portletAppDD
+                                 .getDefaultNamespace();
+                           QName qname = new QName(defaultNamespace,
+                                 name.getLocalPart());
+                           if (eventName.toString().equals(qname.toString())
+                                 && portletDD.getPortletName().equals(
+                                       portlet.getPortletName())) {
+                              resultSet.add(portlet.getId());
+                           }
+                        }
+                     }
+                  }
+               }
             }
-            else{
-                QName tmp = new QName(appDD.getDefaultNamespace(),def.getName());
-                if (tmp.equals(name))
-                    return def;
+         } catch (PortletContainerException e) {
+            LOG.warn(e.getMessage(), e);
+         }
+      }
+
+      // make list
+      for (String name : resultSet) {
+         resultList.add(name);
+      }
+      return resultList;
+   }
+
+   private boolean isEventSupported(
+         List<? extends EventDefinitionReference> supportedEvents,
+         QName eventName, String defaultNamespace) {
+      if (supportedEvents != null) {
+         for (EventDefinitionReference ref : supportedEvents) {
+            QName refQName = ref.getQualifiedName();
+            if (refQName != null && refQName.equals(eventName)) {
+               return true;
             }
-        }
-        throw new IllegalStateException();
-    }
-    
-	private List<String> getAllPortletsRegisteredForEvent(Event event,
-			DriverConfiguration driverConfig, ServletContext containerServletContext) {
-		Set<String> resultSet = new HashSet<String>();
-		List<String> resultList = new ArrayList<String>();
-		QName eventName = event.getQName();
-		Collection<PortletWindowConfig> portlets = getAllPortlets(driverConfig);
-
-		for (PortletWindowConfig portlet : portlets) {
-			String contextPath = portlet.getContextPath();
-            String applicationName = contextPath;
-			PortletApplicationDefinition portletAppDD = null;
-			try {
-				portletAppDD = portletRegistry.getPortletApplication(applicationName);
-				List<? extends PortletDefinition> portletDDs = portletAppDD.getPortlets();
-				List<QName> aliases = getAllAliases(eventName, portletAppDD);
-				for (PortletDefinition portletDD : portletDDs) {
-					List<? extends EventDefinitionReference> processingEvents = portletDD.getSupportedProcessingEvents();
-					if (isEventSupported(processingEvents, eventName, portletAppDD.getDefaultNamespace())) {
-                        if (portletDD.getPortletName().equals(portlet.getPortletName())) {
-                                                          resultSet.add(portlet.getId());
-                        }
-					} else {
-
-						if (processingEvents != null) {
-							for (EventDefinitionReference ref : processingEvents) {
-							    QName name = ref.getQualifiedName(portletAppDD.getDefaultNamespace());
-							    if (name == null)
-							    {
-							        continue;
-							    }
-								// add also grouped portlets, that ends with "."
-								if (name.toString().endsWith(".")
-										&& eventName.toString().startsWith(name.toString())
-										&& portletDD.getPortletName().equals(portlet.getPortletName())) {
-									resultSet.add(portlet.getId());
-								}
-								// also look for alias names:
-								if (aliases != null) {
-									for (QName alias : aliases) {
-										if (alias.toString().equals(name.toString())
-												&& portletDD.getPortletName().equals(portlet.getPortletName())) {
-											resultSet.add(portlet.getId());
-										}
-									}
-								}
-								// also look for default namespaced events
-								if (name.getNamespaceURI() == null || name.getNamespaceURI().equals("")) {
-									String defaultNamespace = portletAppDD.getDefaultNamespace();
-									QName qname = new QName(defaultNamespace, name.getLocalPart());
-									if (eventName.toString().equals(qname.toString())
-											&& portletDD.getPortletName().equals(portlet.getPortletName())) {
-										resultSet.add(portlet.getId());
-									}
-								}
-							}
-						}
-					}
-				}
-			} catch (PortletContainerException e) {
-				LOG.warn(e.getMessage(),e);
-			}
-		}
-
-		// make list
-		for (String name : resultSet) {
-			resultList.add(name);
-		}
-		return resultList;
-	}
-	
-	private boolean isEventSupported(List<? extends EventDefinitionReference> supportedEvents, QName eventName, String defaultNamespace)
-	{
-	    if (supportedEvents != null)
-	    {
-	        for (EventDefinitionReference ref : supportedEvents)
-	        {
-	            QName refQName = ref.getQualifiedName(defaultNamespace);
-	            if (refQName != null && refQName.equals(eventName))
-	            {
-	                return true;
-	            }
-	        }
-	    }
-	    return false;
-	}
-
-	private List<QName> getAllAliases(QName eventName, PortletApplicationDefinition portletAppDD) {
-		if (portletAppDD.getEventDefinitions() != null) {
-			
-			for (EventDefinition def : portletAppDD.getEventDefinitions()){
-			    QName defQName = def.getQualifiedName(portletAppDD.getDefaultNamespace());
-				if (defQName != null && defQName.equals(eventName)){
-						return def.getAliases();
-				}
-			}
-		}
-		return null;
-	}
-
-	/**
-	 * gets the right PortletWindowThread or makes a new one, if theres none
-	 * 
-	 */
-	private PortletWindowThread getPortletWindowThread(Map<String, PortletWindowThread> portletWindowThreads, ThreadGroup threadGroup,
-			PortletContainer container, PortletWindowConfig config,
-			PortletWindow window, HttpServletRequest req, HttpServletResponse res, ServletContext containerServletContext)
-	{
-        String windowID = window.getId().getStringId();
-        PortletWindowThread portletWindowThread = portletWindowThreads
-                .get(windowID);
-        if (portletWindowThread == null) {
-            portletWindowThread = new PortletWindowThread(threadGroup, config.getId(),
-                                                          container, window, 
-                                                          req, res, portletContextService);
-            portletWindowThreads.put(windowID, portletWindowThread);
-        } else {
-            // a thread could be started twice, so we make a new one,
-            // after the old thread stopped
-            // try {
-            try {
-                portletWindowThread.join();
-            } catch (InterruptedException e) {
-                LOG.warn(e.getMessage(),e);
+         }
+      }
+      return false;
+   }
+
+   private List<QName> getAllAliases(QName eventName,
+         PortletApplicationDefinition portletAppDD) {
+      if (portletAppDD.getEventDefinitions() != null) {
+
+         for (EventDefinition def : portletAppDD.getEventDefinitions()) {
+            QName defQName = def.getQName();
+            if (defQName != null && defQName.equals(eventName)) {
+               return def.getAliases();
             }
-            portletWindowThreads.remove(portletWindowThread);
-            portletWindowThread = new PortletWindowThread(threadGroup, config.getId(),
-                                                          container, window, 
-                                                          req, res, portletContextService);
-            portletWindowThreads.put(windowID, portletWindowThread);
-        }
-        return portletWindowThread;
-	}
-
-	/**
-	 * Wait for event execution.
-	 */
-	private void waitForEventExecution(ThreadGroup threadGroup) {
-		long counter = 0;
-		while (threadGroup.activeCount() > 0) {
-			try {
-				counter = +WAITING_CYCLE;
-				if (counter > 500) {
-					threadGroup.stop();
-				}
-				Thread.sleep(WAITING_CYCLE);
-			} catch (InterruptedException e) {
-				LOG.warn(e.getMessage(),e);
-			}
-		}
-	}
-
-	/**
+         }
+      }
+      return null;
+   }
+
+   
+   /**
+    * gets the right PortletWindowThread or makes a new one, if theres none
+    * 
+    */
+//   private PortletWindowThread getPortletWindowThread(
+//         Map<String, PortletWindowThread> portletWindowThreads,
+//         ThreadGroup threadGroup, PortletContainer container,
+//         PortletWindowConfig config, PortletWindow window,
+//         HttpServletRequest req, HttpServletResponse res,
+//         ServletContext containerServletContext) {
+//      String windowID = window.getId().getStringId();
+//      PortletWindowThread portletWindowThread = portletWindowThreads
+//            .get(windowID);
+//      if (portletWindowThread == null) {
+//         portletWindowThread = new PortletWindowThread(threadGroup,
+//               config.getId(), container, window, req, res,
+//               portletContextService);
+//         portletWindowThreads.put(windowID, portletWindowThread);
+//      } else {
+//         // a thread could be started twice, so we make a new one,
+//         // after the old thread stopped
+//         // try {
+//         try {
+//            portletWindowThread.join();
+//         } catch (InterruptedException e) {
+//            LOG.warn(e.getMessage(), e);
+//         }
+//         portletWindowThreads.remove(portletWindowThread);
+//         portletWindowThread = new PortletWindowThread(threadGroup,
+//               config.getId(), container, window, req, res,
+//               portletContextService);
+//         portletWindowThreads.put(windowID, portletWindowThread);
+//      }
+//      return portletWindowThread;
+//   }
+
+   /**
+    * Wait for event execution.
+    */
+//   private void waitForEventExecution(ThreadGroup threadGroup) {
+//      long counter = 0;
+//      while (threadGroup.activeCount() > 0) {
+//         try {
+//            counter = +WAITING_CYCLE;
+//            if (counter > 500) {
+//               threadGroup.stop();
+//            }
+//            Thread.sleep(WAITING_CYCLE);
+//         } catch (InterruptedException e) {
+//            LOG.warn(e.getMessage(), e);
+//         }
+//      }
+//   }
+
+   /**
 	 * 
 	 */
-	private Collection<PortletWindowConfig> getAllPortlets(DriverConfiguration driverConfig)
-	{
-		Collection<PortletWindowConfig> portlets = new ArrayList<PortletWindowConfig>();
-        Collection pages = driverConfig.getPages();
-        if (pages != null){
-            Iterator iPages = pages.iterator();
-            while(iPages.hasNext()){
-                PageConfig pageConfig = (PageConfig) iPages.next();
-                Collection portletIDs = pageConfig.getPortletIds();
-                if (portletIDs != null){
-                    Iterator iPortletIDs = portletIDs.iterator();
-                    while(iPortletIDs.hasNext()){
-                        portlets.add(PortletWindowConfig.fromId(iPortletIDs.next().toString()));
-                    }
-                }
+   private Collection<PortletWindowConfig> getAllPortlets(
+         DriverConfiguration driverConfig) {
+      Collection<PortletWindowConfig> portlets = new ArrayList<PortletWindowConfig>();
+      Collection pages = driverConfig.getPages();
+      if (pages != null) {
+         Iterator iPages = pages.iterator();
+         while (iPages.hasNext()) {
+            PageConfig pageConfig = (PageConfig) iPages.next();
+            Collection portletIDs = pageConfig.getPortletIds();
+            if (portletIDs != null) {
+               Iterator iPortletIDs = portletIDs.iterator();
+               while (iPortletIDs.hasNext()) {
+                  portlets.add(PortletWindowConfig.fromId(iPortletIDs.next()
+                        .toString()));
+               }
             }
-        }
-		return portlets;
-	}
+         }
+      }
+      return portlets;
+   }
 }

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/54db2766/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/EventProviderImpl.java
----------------------------------------------------------------------
diff --git a/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/EventProviderImpl.java b/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/EventProviderImpl.java
index fba2134..df0ca7d 100644
--- a/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/EventProviderImpl.java
+++ b/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/EventProviderImpl.java
@@ -1,172 +1,156 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.pluto.driver.services.container;
-
-import java.io.Serializable;
-import java.io.StringWriter;
-import java.io.Writer;
-import java.util.List;
-
-import javax.portlet.Event;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Marshaller;
-import javax.xml.namespace.QName;
-import javax.xml.stream.FactoryConfigurationError;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.pluto.container.EventProvider;
-import org.apache.pluto.container.PortletContainerException;
-import org.apache.pluto.container.PortletWindow;
-import org.apache.pluto.container.driver.PortletRegistryService;
-import org.apache.pluto.container.om.portlet.EventDefinition;
-import org.apache.pluto.container.om.portlet.EventDefinitionReference;
-import org.apache.pluto.container.om.portlet.PortletApplicationDefinition;
-import org.apache.pluto.driver.services.portal.PortletWindowConfig;
-
-/**
- * @version $Id$
- */
-public class EventProviderImpl implements EventProvider
-{
-    /** Logger. */
-    private static final Logger LOG = LoggerFactory.getLogger(EventProviderImpl.class);
-    private PortletWindow portletWindow;
-    private PortletRegistryService portletRegistry;
-    
-    public EventProviderImpl(PortletWindow portletWindow, PortletRegistryService portletRegistry)
-    {
-        this.portletWindow = portletWindow;
-        this.portletRegistry = portletRegistry;
-    }
-
-    @SuppressWarnings("unchecked")
-    public Event createEvent(QName qname, Serializable value) throws IllegalArgumentException
-    {
-        if (isDeclaredAsPublishingEvent(qname))
-        {
-            if (value != null && !isValueInstanceOfDefinedClass(qname, value))
-            {
-                throw new IllegalArgumentException("Payload class (" +
-                                                   value.getClass().getCanonicalName() +
-                                                   ") does not have the right class, check your defined event types in portlet.xml.");
-            }
-            try
-            {
-                if (value == null)
-                {
-                    return new EventImpl(qname, value);
-                }
-                else
-                {
-                    ClassLoader cl = Thread.currentThread().getContextClassLoader();
-                    Writer out = new StringWriter();
-                    Class clazz = value.getClass();
-                    try
-                    {
-                        Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
-                        JAXBContext jc = JAXBContext.newInstance(clazz);
-                        Marshaller marshaller = jc.createMarshaller();
-                        JAXBElement<Serializable> element = new JAXBElement<Serializable>(qname, clazz, value);
-                        marshaller.marshal(element, out);
-                    }
-                    finally
-                    {
-                        Thread.currentThread().setContextClassLoader(cl);
-                    }
-                    return new EventImpl(qname, out.toString());
-                }
-            }
-            catch (JAXBException e)
-            {
-                // maybe there is no valid jaxb binding
-                // TODO wsrp:eventHandlingFailed
-                LOG.error("Event handling failed", e);
-            }
-            catch (FactoryConfigurationError e)
-            {
-                LOG.warn(e.getMessage(),e);
-            }
-        }
-        return null;
-    }
-
-    private boolean isDeclaredAsPublishingEvent(QName qname)
-    {
-        String applicationId = PortletWindowConfig.parseContextPath(portletWindow.getId().getStringId());
-        String applicationName = applicationId;
-        String portletName = PortletWindowConfig.parsePortletName(portletWindow.getId().getStringId());
-        List<? extends EventDefinitionReference> events = null;
-        try
-        {
-            events = portletRegistry.getPortlet(applicationName, portletName).getSupportedPublishingEvents();
-        }
-        catch (PortletContainerException e1)
-        {
-            e1.printStackTrace();
-        }
-        if (events != null)
-        {
-            String defaultNamespace = portletWindow.getPortletDefinition().getApplication()
-                                                   .getDefaultNamespace();
-            for (EventDefinitionReference ref : events)
-            {
-                QName name = ref.getQualifiedName(defaultNamespace);
-                if (name == null)
-                {
-                    continue;
-                }
-                if (qname.equals(name))
-                {
-                    return true;
-                }
-            }
-        }
-        return false;
-    }
-
-    private boolean isValueInstanceOfDefinedClass(QName qname, Serializable value)
-    {
-        PortletApplicationDefinition app = portletWindow.getPortletDefinition().getApplication();
-        List<? extends EventDefinition> events = app.getEventDefinitions();
-        if (events != null)
-        {
-            for (EventDefinition def : events)
-            {
-                if (def.getQName() != null)
-                {
-                    if (def.getQName().equals(qname))
-                    {
-                        return value.getClass().getName().equals(def.getValueType());
-                    }
-                }
-                else
-                {
-                    QName tmp = new QName(app.getDefaultNamespace(), def.getName());
-                    if (tmp.equals(qname))
-                    {
-                        return value.getClass().getName().equals(def.getValueType());
-                    }
-                }
-            }
-        }
-        // event not declared
-        return true;
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.driver.services.container;
+
+import java.io.Serializable;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.util.List;
+
+import javax.portlet.Event;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+import javax.xml.namespace.QName;
+import javax.xml.stream.FactoryConfigurationError;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.pluto.container.EventProvider;
+import org.apache.pluto.container.PortletContainerException;
+import org.apache.pluto.container.PortletWindow;
+import org.apache.pluto.container.driver.PortletRegistryService;
+import org.apache.pluto.container.om.portlet.EventDefinition;
+import org.apache.pluto.container.om.portlet.EventDefinitionReference;
+import org.apache.pluto.container.om.portlet.PortletApplicationDefinition;
+import org.apache.pluto.driver.services.portal.PortletWindowConfig;
+
+/**
+ * @version $Id$
+ */
+public class EventProviderImpl implements EventProvider
+{
+    /** Logger. */
+    private static final Logger LOG = LoggerFactory.getLogger(EventProviderImpl.class);
+    private PortletWindow portletWindow;
+    private PortletRegistryService portletRegistry;
+    
+    public EventProviderImpl(PortletWindow portletWindow, PortletRegistryService portletRegistry)
+    {
+        this.portletWindow = portletWindow;
+        this.portletRegistry = portletRegistry;
+    }
+
+    @SuppressWarnings("unchecked")
+    public Event createEvent(QName qname, Serializable value) throws IllegalArgumentException
+    {
+        if (isDeclaredAsPublishingEvent(qname))
+        {
+            if (value != null && !isValueInstanceOfDefinedClass(qname, value))
+            {
+                throw new IllegalArgumentException("Payload class (" +
+                                                   value.getClass().getCanonicalName() +
+                                                   ") does not have the right class, check your defined event types in portlet.xml.");
+            }
+            try
+            {
+                if (value == null)
+                {
+                    return new EventImpl(qname, value);
+                }
+                else
+                {
+                    ClassLoader cl = Thread.currentThread().getContextClassLoader();
+                    Writer out = new StringWriter();
+                    Class clazz = value.getClass();
+                    try
+                    {
+                        Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
+                        JAXBContext jc = JAXBContext.newInstance(clazz);
+                        Marshaller marshaller = jc.createMarshaller();
+                        JAXBElement<Serializable> element = new JAXBElement<Serializable>(qname, clazz, value);
+                        marshaller.marshal(element, out);
+                    }
+                    finally
+                    {
+                        Thread.currentThread().setContextClassLoader(cl);
+                    }
+                    return new EventImpl(qname, out.toString());
+                }
+            }
+            catch (JAXBException e)
+            {
+                // maybe there is no valid jaxb binding
+                // TODO wsrp:eventHandlingFailed
+                LOG.error("Event handling failed", e);
+            }
+            catch (FactoryConfigurationError e)
+            {
+                LOG.warn(e.getMessage(),e);
+            }
+        }
+        return null;
+    }
+
+    private boolean isDeclaredAsPublishingEvent(QName qname)
+    {
+        String applicationId = PortletWindowConfig.parseContextPath(portletWindow.getId().getStringId());
+        String applicationName = applicationId;
+        String portletName = PortletWindowConfig.parsePortletName(portletWindow.getId().getStringId());
+        List<? extends EventDefinitionReference> events = null;
+        try
+        {
+            events = portletRegistry.getPortlet(applicationName, portletName).getSupportedPublishingEvents();
+        }
+        catch (PortletContainerException e1)
+        {
+            e1.printStackTrace();
+        }
+        if (events != null)
+        {
+            for (EventDefinitionReference ref : events)
+            {
+                QName name = ref.getQualifiedName();
+                if (name == null)
+                {
+                    continue;
+                }
+                if (qname.equals(name))
+                {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
+   private boolean isValueInstanceOfDefinedClass(QName qname, Serializable value) {
+      PortletApplicationDefinition app = portletWindow.getPortletDefinition().getApplication();
+      
+      List<? extends EventDefinition> events = app.getEventDefinitions();
+      if (events != null) {
+         for (EventDefinition def : events) {
+            if (def.getQName().equals(qname)) {
+               return value.getClass().getName().equals(def.getValueType());
+            }
+         }
+      }
+        // event not declared
+        return true;
+    }
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/54db2766/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletWindowThread.java
----------------------------------------------------------------------
diff --git a/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletWindowThread.java b/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletWindowThread.java
index d5a491d..3d44198 100644
--- a/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletWindowThread.java
+++ b/pluto-portal-driver-impl/src/main/java/org/apache/pluto/driver/services/container/PortletWindowThread.java
@@ -1,163 +1,157 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.pluto.driver.services.container;
-
-import java.io.IOException;
-import java.io.Serializable;
-import java.io.StringReader;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.portlet.Event;
-import javax.portlet.PortletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.JAXBException;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.namespace.QName;
-import javax.xml.parsers.FactoryConfigurationError;
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.pluto.container.PortletContainer;
-import org.apache.pluto.container.PortletContainerException;
-import org.apache.pluto.container.PortletWindow;
-import org.apache.pluto.container.driver.PortletContextService;
-import org.apache.pluto.container.om.portlet.EventDefinition;
-import org.apache.pluto.container.om.portlet.PortletApplicationDefinition;
-
-public class PortletWindowThread extends Thread {
-	
-	/** Logger. */
-    private static final Logger LOG = LoggerFactory.getLogger(PortletWindowThread.class);
-    
-    private PortletContainer container;
-    
-	private PortletWindow portletWindow;
-	
-	private HttpServletRequest request;
-    private HttpServletResponse response;
-	
-	/** PortletRegistryService used to obtain PortletApplicationConfig objects */
-	private PortletContextService portletContextService;
-	
-	private List<Event> events = new ArrayList<Event>();
-
-	public PortletWindowThread(ThreadGroup group, String name,
-	                           PortletContainer container, PortletWindow window, 
-	                           HttpServletRequest request, HttpServletResponse response, 
-	                           PortletContextService portletContextService)
-	{
-		super(group, name);
-        this.request = request;
-        this.response = response;
-		this.portletWindow = window;
-		this.container = container;
-		this.portletContextService = portletContextService;
-	}
-
-	/* (non-Javadoc)
-	 * @see java.lang.Thread#run()
-	 */
-	@Override
-	public void run() {
-		super.run();
-		while (events.size() > 0) {
-			try {
-//				synchronized (this) {
-					Event event = events.remove(0);
-			        Object value = event.getValue();
-			        
-			        XMLStreamReader xml = null;
-					try {
-						if (value instanceof String) {
-							String in = (String) value; 
-							xml = XMLInputFactory.newInstance().createXMLStreamReader(new StringReader(in));
-						}			
-					}  
-					catch (XMLStreamException e1) {
-						throw new IllegalStateException(e1);
-					} catch (FactoryConfigurationError e1) {
-						throw new IllegalStateException(e1);
-					}
-			        
-			        if (xml != null) {
-			        	//XMLStreamReader xml = (XMLStreamReader) event.getValue();
-			        	
-			        		//provider.getEventDefinition(event.getQName());
-			        	try {
-			        		// now test if object is jaxb
-			        		EventDefinition eventDefinitionDD = getEventDefintion(event.getQName()); 
-			        		
-			        		ClassLoader loader = portletContextService.getClassLoader(portletWindow.getPortletDefinition().getApplication().getName());
-			        		Class<? extends Serializable> clazz = loader.loadClass(eventDefinitionDD.getValueType()).asSubclass(Serializable.class);
-
-			        		JAXBContext jc = JAXBContext.newInstance(clazz);
-			        		Unmarshaller unmarshaller  = jc.createUnmarshaller();
-
-//			        		unmarshaller.setEventHandler(new javax.xml.bind.helpers.DefaultValidationEventHandler());
-
-			        		JAXBElement result = unmarshaller.unmarshal(xml,clazz);
-
-			        		event =  new EventImpl(event.getQName(),(Serializable) result.getValue());
-			        	} catch (JAXBException e) {
-			        		throw new IllegalStateException(e);
-			        	} catch (ClassCastException e) {
-			        		throw new IllegalStateException(e);
-			        	} catch (ClassNotFoundException e) {
-			        		throw new IllegalStateException(e);
-			        	} catch (PortletContainerException e) {
-			        		throw new IllegalStateException(e);
-						}
-			        }					
-					container.doEvent(portletWindow, request, response, event);	
-//				}
-			} catch (PortletException e) {
-				LOG.warn(e.getMessage(),e);
-			} catch (IOException e) {
-				LOG.warn(e.getMessage(),e);
-			} catch (PortletContainerException e) {
-				LOG.warn(e.getMessage(),e);
-			}	
-		}
-	}
-
-	public void addEvent(Event event) {
-		this.events.add(event);	
-	}
-
-	private EventDefinition getEventDefintion(QName name) {
-		PortletApplicationDefinition appDD = portletWindow.getPortletDefinition().getApplication();
-		for (EventDefinition def : appDD.getEventDefinitions()){
-			if (def.getQName() != null){
-				if (def.getQName().equals(name))
-					return def;
-			}
-			else{
-				QName tmp = new QName(appDD.getDefaultNamespace(),def.getName());
-				if (tmp.equals(name))
-					return def;
-			}
-		}
-		throw new IllegalStateException();
-	}
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.pluto.driver.services.container;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.io.StringReader;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.portlet.Event;
+import javax.portlet.PortletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.namespace.QName;
+import javax.xml.parsers.FactoryConfigurationError;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.apache.pluto.container.PortletContainer;
+import org.apache.pluto.container.PortletContainerException;
+import org.apache.pluto.container.PortletWindow;
+import org.apache.pluto.container.driver.PortletContextService;
+import org.apache.pluto.container.om.portlet.EventDefinition;
+import org.apache.pluto.container.om.portlet.PortletApplicationDefinition;
+
+public class PortletWindowThread extends Thread {
+	
+	/** Logger. */
+    private static final Logger LOG = LoggerFactory.getLogger(PortletWindowThread.class);
+    
+    private PortletContainer container;
+    
+	private PortletWindow portletWindow;
+	
+	private HttpServletRequest request;
+    private HttpServletResponse response;
+	
+	/** PortletRegistryService used to obtain PortletApplicationConfig objects */
+	private PortletContextService portletContextService;
+	
+	private List<Event> events = new ArrayList<Event>();
+
+	public PortletWindowThread(ThreadGroup group, String name,
+	                           PortletContainer container, PortletWindow window, 
+	                           HttpServletRequest request, HttpServletResponse response, 
+	                           PortletContextService portletContextService)
+	{
+		super(group, name);
+        this.request = request;
+        this.response = response;
+		this.portletWindow = window;
+		this.container = container;
+		this.portletContextService = portletContextService;
+	}
+
+	/* (non-Javadoc)
+	 * @see java.lang.Thread#run()
+	 */
+	@Override
+	public void run() {
+		super.run();
+		while (events.size() > 0) {
+			try {
+//				synchronized (this) {
+					Event event = events.remove(0);
+			        Object value = event.getValue();
+			        
+			        XMLStreamReader xml = null;
+					try {
+						if (value instanceof String) {
+							String in = (String) value; 
+							xml = XMLInputFactory.newInstance().createXMLStreamReader(new StringReader(in));
+						}			
+					}  
+					catch (XMLStreamException e1) {
+						throw new IllegalStateException(e1);
+					} catch (FactoryConfigurationError e1) {
+						throw new IllegalStateException(e1);
+					}
+			        
+			        if (xml != null) {
+			        	//XMLStreamReader xml = (XMLStreamReader) event.getValue();
+			        	
+			        		//provider.getEventDefinition(event.getQName());
+			        	try {
+			        		// now test if object is jaxb
+			        		EventDefinition eventDefinitionDD = getEventDefintion(event.getQName()); 
+			        		
+			        		ClassLoader loader = portletContextService.getClassLoader(portletWindow.getPortletDefinition().getApplication().getName());
+			        		Class<? extends Serializable> clazz = loader.loadClass(eventDefinitionDD.getValueType()).asSubclass(Serializable.class);
+
+			        		JAXBContext jc = JAXBContext.newInstance(clazz);
+			        		Unmarshaller unmarshaller  = jc.createUnmarshaller();
+
+//			        		unmarshaller.setEventHandler(new javax.xml.bind.helpers.DefaultValidationEventHandler());
+
+			        		JAXBElement<?> result = unmarshaller.unmarshal(xml,clazz);
+
+			        		event =  new EventImpl(event.getQName(),(Serializable) result.getValue());
+			        	} catch (JAXBException e) {
+			        		throw new IllegalStateException(e);
+			        	} catch (ClassCastException e) {
+			        		throw new IllegalStateException(e);
+			        	} catch (ClassNotFoundException e) {
+			        		throw new IllegalStateException(e);
+			        	} catch (PortletContainerException e) {
+			        		throw new IllegalStateException(e);
+						}
+			        }					
+					container.doEvent(portletWindow, request, response, event);	
+//				}
+			} catch (PortletException e) {
+				LOG.warn(e.getMessage(),e);
+			} catch (IOException e) {
+				LOG.warn(e.getMessage(),e);
+			} catch (PortletContainerException e) {
+				LOG.warn(e.getMessage(),e);
+			}	
+		}
+	}
+
+	public void addEvent(Event event) {
+		this.events.add(event);	
+	}
+
+	private EventDefinition getEventDefintion(QName name) {
+		PortletApplicationDefinition appDD = portletWindow.getPortletDefinition().getApplication();
+		for (EventDefinition def : appDD.getEventDefinitions()){
+		   if (def.getQName().equals(name)) {
+		      return def;
+		   }
+		}
+		throw new IllegalStateException();
+	}
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/54db2766/pluto-portal-driver/src/main/java/org/apache/pluto/driver/container/DriverPortletConfigImpl.java
----------------------------------------------------------------------
diff --git a/pluto-portal-driver/src/main/java/org/apache/pluto/driver/container/DriverPortletConfigImpl.java b/pluto-portal-driver/src/main/java/org/apache/pluto/driver/container/DriverPortletConfigImpl.java
index a4a624b..a9845e3 100644
--- a/pluto-portal-driver/src/main/java/org/apache/pluto/driver/container/DriverPortletConfigImpl.java
+++ b/pluto-portal-driver/src/main/java/org/apache/pluto/driver/container/DriverPortletConfigImpl.java
@@ -85,20 +85,7 @@ public class DriverPortletConfigImpl extends AbstractPortletConfigImpl implement
          PublicRenderParameter prp = prps.get(prpname);
          if (prp != null) {
             QName qn = prp.getQName();
-            if (qn == null) {
-               String name = prp.getName();
-               String ns = portlet.getApplication().getDefaultNamespace();
-               if (name != null && ns != null) {
-                  qn = new QName(ns, name);
-               } else {
-                  LOG.warn("Bad public render parameter name / namespace definition. name="
-                        + name + ", namespace=" + ns);
-               }
-            }
-            
-            if (qn != null) {
-               prpdefs.put(prpname, qn);
-            }
+            prpdefs.put(prpname, qn);
          } else {
             LOG.warn("Could not get public render parameter definition for identifier: " + prpname);
          }

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/54db2766/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/PublicRenderParameterQNameMapper.java
----------------------------------------------------------------------
diff --git a/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/PublicRenderParameterQNameMapper.java b/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/PublicRenderParameterQNameMapper.java
index 42fb80e..21579ae 100644
--- a/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/PublicRenderParameterQNameMapper.java
+++ b/pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/portal/PublicRenderParameterQNameMapper.java
@@ -90,7 +90,6 @@ public class PublicRenderParameterQNameMapper implements PublicRenderParameterMa
             Collection<String> prpIds = pd.getSupportedPublicRenderParameters();
             if (prpIds != null && prpIds.size() > 0) {
                Collection<? extends PublicRenderParameter> prpDefs = pad.getPublicRenderParameters();
-               String namespace = pad.getDefaultNamespace();
                for (String prpId : prpIds) {
                   Iterator<? extends PublicRenderParameter> i = prpDefs.iterator();
                   QName qn = null;
@@ -98,15 +97,6 @@ public class PublicRenderParameterQNameMapper implements PublicRenderParameterMa
                      PublicRenderParameter prpDef = i.next();
                      if (prpDef.getIdentifier().equals(prpId)) {
                         qn = prpDef.getQName();
-                        if (qn == null) {
-                           // If qname is null, build a qnamme from the name & namespace fields
-                           String name = prpDef.getName();
-                           if (name == null) {
-                              LOGGER.error("Problem with PRP definition: Both QName and Nqme are null.");
-                           } else {
-                              qn = new QName(namespace, name);
-                           }
-                        }
                      }
                   }
                   if (qn == null) {

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/54db2766/pluto-portal-driver/src/test/java/org/apache/pluto/driver/container/ResourceBundleFactoryTest.java
----------------------------------------------------------------------
diff --git a/pluto-portal-driver/src/test/java/org/apache/pluto/driver/container/ResourceBundleFactoryTest.java b/pluto-portal-driver/src/test/java/org/apache/pluto/driver/container/ResourceBundleFactoryTest.java
index 8654d4b..98a5eaf 100644
--- a/pluto-portal-driver/src/test/java/org/apache/pluto/driver/container/ResourceBundleFactoryTest.java
+++ b/pluto-portal-driver/src/test/java/org/apache/pluto/driver/container/ResourceBundleFactoryTest.java
@@ -24,6 +24,8 @@ import junit.framework.Assert;
 
 import org.apache.pluto.container.om.portlet.PortletDefinition;
 import org.apache.pluto.container.om.portlet.PortletInfo;
+import org.apache.pluto.container.om.portlet.impl.PortletDefinitionImpl;
+import org.apache.pluto.container.om.portlet.impl.PortletInfoImpl;
 import org.apache.pluto.container.om.portlet20.impl.PortletType;
 import org.apache.pluto.driver.container.ResourceBundleFactory;
 
@@ -38,12 +40,12 @@ public class ResourceBundleFactoryTest extends PlutoTestCase {
     public void setUp() throws Exception {
         super.setUp();
 
-        validDD = new PortletType();
-
-        PortletInfo info = validDD.getPortletInfo();
-        info.setTitle("Info Title");
-        info.setShortTitle("Info Short Title");
-        info.setKeywords("Info Keywords");
+        String ti = "Info Title";
+        String sti = "Info Short Title";
+        String kw = "Info Keywords";
+        PortletInfo info = new PortletInfoImpl(ti, kw, sti);
+        validDD = new PortletDefinitionImpl("RBTestPortlet", null);
+        validDD.setPortletInfo(info);
         validDD.setResourceBundle(TestResourceBundle.class.getName());
     }
 

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/54db2766/pluto-util/pom.xml
----------------------------------------------------------------------
diff --git a/pluto-util/pom.xml b/pluto-util/pom.xml
index e119e4b..12b18a7 100644
--- a/pluto-util/pom.xml
+++ b/pluto-util/pom.xml
@@ -46,6 +46,12 @@
       <version>${project.version}</version>
       <scope>compile</scope>
     </dependency>
+    <dependency>
+      <groupId>org.apache.portals.pluto</groupId>
+      <artifactId>portlet-api</artifactId>
+      <version>${project.version}</version>
+      <scope>provided</scope>
+    </dependency>
 
     <dependency>
       <groupId>commons-cli</groupId>

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/54db2766/pluto-util/src/test/java/org/apache/pluto/util/assemble/SecondWarTestPortletClass.java
----------------------------------------------------------------------
diff --git a/pluto-util/src/test/java/org/apache/pluto/util/assemble/SecondWarTestPortletClass.java b/pluto-util/src/test/java/org/apache/pluto/util/assemble/SecondWarTestPortletClass.java
new file mode 100644
index 0000000..9f29c73
--- /dev/null
+++ b/pluto-util/src/test/java/org/apache/pluto/util/assemble/SecondWarTestPortletClass.java
@@ -0,0 +1,78 @@
+/*  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+
+package org.apache.pluto.util.assemble;
+
+import java.io.IOException;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.Portlet;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletException;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+/**
+ * Dummy portlet for test
+ * 
+ * @author Scott Nicklous
+ *
+ */
+public class SecondWarTestPortletClass implements Portlet {
+
+   /* (non-Javadoc)
+    * @see javax.portlet.Portlet#destroy()
+    */
+   @Override
+   public void destroy() {
+      // TODO Auto-generated method stub
+
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.Portlet#init(javax.portlet.PortletConfig)
+    */
+   @Override
+   public void init(PortletConfig arg0) throws PortletException {
+      // TODO Auto-generated method stub
+
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.Portlet#processAction(javax.portlet.ActionRequest, javax.portlet.ActionResponse)
+    */
+   @Override
+   public void processAction(ActionRequest arg0, ActionResponse arg1)
+         throws PortletException, IOException {
+      // TODO Auto-generated method stub
+
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.Portlet#render(javax.portlet.RenderRequest, javax.portlet.RenderResponse)
+    */
+   @Override
+   public void render(RenderRequest arg0, RenderResponse arg1)
+         throws PortletException, IOException {
+      // TODO Auto-generated method stub
+
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/54db2766/pluto-util/src/test/java/org/apache/pluto/util/assemble/WarTestPortletClass.java
----------------------------------------------------------------------
diff --git a/pluto-util/src/test/java/org/apache/pluto/util/assemble/WarTestPortletClass.java b/pluto-util/src/test/java/org/apache/pluto/util/assemble/WarTestPortletClass.java
new file mode 100644
index 0000000..07d44ab
--- /dev/null
+++ b/pluto-util/src/test/java/org/apache/pluto/util/assemble/WarTestPortletClass.java
@@ -0,0 +1,78 @@
+/*  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+
+package org.apache.pluto.util.assemble;
+
+import java.io.IOException;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.Portlet;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletException;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+
+/**
+ * Dummy portlet for test
+ * 
+ * @author Scott Nicklous
+ *
+ */
+public class WarTestPortletClass implements Portlet {
+
+   /* (non-Javadoc)
+    * @see javax.portlet.Portlet#destroy()
+    */
+   @Override
+   public void destroy() {
+      // TODO Auto-generated method stub
+
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.Portlet#init(javax.portlet.PortletConfig)
+    */
+   @Override
+   public void init(PortletConfig arg0) throws PortletException {
+      // TODO Auto-generated method stub
+
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.Portlet#processAction(javax.portlet.ActionRequest, javax.portlet.ActionResponse)
+    */
+   @Override
+   public void processAction(ActionRequest arg0, ActionResponse arg1)
+         throws PortletException, IOException {
+      // TODO Auto-generated method stub
+
+   }
+
+   /* (non-Javadoc)
+    * @see javax.portlet.Portlet#render(javax.portlet.RenderRequest, javax.portlet.RenderResponse)
+    */
+   @Override
+   public void render(RenderRequest arg0, RenderResponse arg1)
+         throws PortletException, IOException {
+      // TODO Auto-generated method stub
+
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/54db2766/pluto-util/src/test/resources/org/apache/pluto/util/assemble/ear/ComplexEarDeployerTest.ear
----------------------------------------------------------------------
diff --git a/pluto-util/src/test/resources/org/apache/pluto/util/assemble/ear/ComplexEarDeployerTest.ear b/pluto-util/src/test/resources/org/apache/pluto/util/assemble/ear/ComplexEarDeployerTest.ear
index 41a0520..00b5d7c 100644
Binary files a/pluto-util/src/test/resources/org/apache/pluto/util/assemble/ear/ComplexEarDeployerTest.ear and b/pluto-util/src/test/resources/org/apache/pluto/util/assemble/ear/ComplexEarDeployerTest.ear differ

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/54db2766/pluto-util/src/test/resources/org/apache/pluto/util/assemble/ear/EarDeployerTest.ear
----------------------------------------------------------------------
diff --git a/pluto-util/src/test/resources/org/apache/pluto/util/assemble/ear/EarDeployerTest.ear b/pluto-util/src/test/resources/org/apache/pluto/util/assemble/ear/EarDeployerTest.ear
index c6bfdc5..a8064f3 100644
Binary files a/pluto-util/src/test/resources/org/apache/pluto/util/assemble/ear/EarDeployerTest.ear and b/pluto-util/src/test/resources/org/apache/pluto/util/assemble/ear/EarDeployerTest.ear differ

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/54db2766/pluto-util/src/test/resources/org/apache/pluto/util/assemble/file/portlet.xml
----------------------------------------------------------------------
diff --git a/pluto-util/src/test/resources/org/apache/pluto/util/assemble/file/portlet.xml b/pluto-util/src/test/resources/org/apache/pluto/util/assemble/file/portlet.xml
index 1a6680d..b25c91c 100644
--- a/pluto-util/src/test/resources/org/apache/pluto/util/assemble/file/portlet.xml
+++ b/pluto-util/src/test/resources/org/apache/pluto/util/assemble/file/portlet.xml
@@ -1,39 +1,39 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-   http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" version="1.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">
-    <portlet>
-        <portlet-name>WarTestPortletName</portlet-name>
-        <portlet-class>WarTestPortletClass</portlet-class>
-        <expiration-cache>0</expiration-cache>
-        <supports>
-            <mime-type>text/html</mime-type>
-            <portlet-mode>help</portlet-mode>
-        </supports>
-        <supported-locale>en-US</supported-locale>
-
-        <portlet-info>
-            <title>WarTestPortlet Title</title>
-            <short-title>WarTestPortlet Short Title</short-title>
-            <keywords>WarTestPortlet, Keywords</keywords>
-        </portlet-info>
-    </portlet>
-</portlet-app>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd" version="1.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">
+    <portlet>
+        <portlet-name>WarTestPortletName</portlet-name>
+        <portlet-class>org.apache.pluto.util.assemble.WarTestPortletClass</portlet-class>
+        <expiration-cache>0</expiration-cache>
+        <supports>
+            <mime-type>text/html</mime-type>
+            <portlet-mode>help</portlet-mode>
+        </supports>
+        <supported-locale>en-US</supported-locale>
+
+        <portlet-info>
+            <title>WarTestPortlet Title</title>
+            <short-title>WarTestPortlet Short Title</short-title>
+            <keywords>WarTestPortlet, Keywords</keywords>
+        </portlet-info>
+    </portlet>
+</portlet-app>

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/54db2766/pluto-util/src/test/resources/org/apache/pluto/util/assemble/war/WarDeployerTestPortlet.war
----------------------------------------------------------------------
diff --git a/pluto-util/src/test/resources/org/apache/pluto/util/assemble/war/WarDeployerTestPortlet.war b/pluto-util/src/test/resources/org/apache/pluto/util/assemble/war/WarDeployerTestPortlet.war
index e1748e6..6b79e4d 100644
Binary files a/pluto-util/src/test/resources/org/apache/pluto/util/assemble/war/WarDeployerTestPortlet.war and b/pluto-util/src/test/resources/org/apache/pluto/util/assemble/war/WarDeployerTestPortlet.war differ

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/54db2766/pluto-util/src/test/resources/org/apache/pluto/util/assemble/war/WarDeployerTestPortletNoManifest.war
----------------------------------------------------------------------
diff --git a/pluto-util/src/test/resources/org/apache/pluto/util/assemble/war/WarDeployerTestPortletNoManifest.war b/pluto-util/src/test/resources/org/apache/pluto/util/assemble/war/WarDeployerTestPortletNoManifest.war
index 38a96c9..95af62b 100644
Binary files a/pluto-util/src/test/resources/org/apache/pluto/util/assemble/war/WarDeployerTestPortletNoManifest.war and b/pluto-util/src/test/resources/org/apache/pluto/util/assemble/war/WarDeployerTestPortletNoManifest.war differ

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/54db2766/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 0df5d83..79aa290 100644
--- a/pom.xml
+++ b/pom.xml
@@ -271,7 +271,7 @@ generate mailto links. -->
     <springframework.version>2.0.2</springframework.version>
     <maven.version>2.0.5</maven.version>
     <ant.version>1.6.5</ant.version>
-    <commons-io.version>1.3.1</commons-io.version>
+    <commons-io.version>2.4</commons-io.version>
     <ccpp-api.version>1.0</ccpp-api.version>
     <junit.version>4.12</junit.version>
     <jmock.version>1.2.0</jmock.version>