You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrp4j-dev@portals.apache.org by es...@apache.org on 2007/07/27 07:05:01 UTC

svn commit: r560102 - /portals/wsrp4j/branches/wsrp4j-pluto11/src/java/org/apache/wsrp4j/producer/provider/pluto/driver/PortletPoolImpl.java

Author: esm
Date: Thu Jul 26 22:05:00 2007
New Revision: 560102

URL: http://svn.apache.org/viewvc?view=rev&rev=560102
Log:
Additional debugging.

Modified:
    portals/wsrp4j/branches/wsrp4j-pluto11/src/java/org/apache/wsrp4j/producer/provider/pluto/driver/PortletPoolImpl.java

Modified: portals/wsrp4j/branches/wsrp4j-pluto11/src/java/org/apache/wsrp4j/producer/provider/pluto/driver/PortletPoolImpl.java
URL: http://svn.apache.org/viewvc/portals/wsrp4j/branches/wsrp4j-pluto11/src/java/org/apache/wsrp4j/producer/provider/pluto/driver/PortletPoolImpl.java?view=diff&rev=560102&r1=560101&r2=560102
==============================================================================
--- portals/wsrp4j/branches/wsrp4j-pluto11/src/java/org/apache/wsrp4j/producer/provider/pluto/driver/PortletPoolImpl.java (original)
+++ portals/wsrp4j/branches/wsrp4j-pluto11/src/java/org/apache/wsrp4j/producer/provider/pluto/driver/PortletPoolImpl.java Thu Jul 26 22:05:00 2007
@@ -133,6 +133,7 @@
 
         this.handleGenerator = handleGenerator;
         this.portletRegistry = portletRegistry;
+        
 
         // restore registration objects from persistent store
 
@@ -168,8 +169,8 @@
      */
     private synchronized void init( ) throws Exception
     {
-        // super.init(servletConfig, properties);
-
+        LOG.info( "**** Initializing WSRP4J Portlet Pool ****" );
+        
         // TODO: get consumerConfiguredIDs from persistence
         Set consumerConfiguredIDs = new java.util.HashSet();
 
@@ -196,32 +197,12 @@
                 }
             }
         }
-
+        
         portletRegistry.addPortletRegistryListener( new PortletRegistryListenerImpl() );
-
-        /*
-         * while (portlets.hasNext()) { String id = (String)portlets.next();
-         * PortletEntity portletEntity =
-         * getPortletEntity(ObjectID.createFromString(id));
-         * 
-         * if (consumerConfiguredIDs.contains(id)) {
-         * 
-         * ConsumerConfiguredPortletImpl portlet = new
-         * ConsumerConfiguredPortletImpl();
-         * portlet.setPortletHandle(portletEntity.getId().toString());
-         * portlet.setParentHandle(null); //TODO: where would we store this?
-         * consumerConfiguredPortlets.put( portlet.getPortletHandle(), portlet);
-         *  } else {
-         *  // TODO: do not store producer offered portlets
-         * ProducerOfferedPortletImpl portlet = new
-         * ProducerOfferedPortletImpl();
-         * portlet.setPortletHandle(portletEntity.getId().toString());
-         * portlet.setRegistrationRequired(REGISTRATION_REQUIRED); //TODO: get
-         * setting from some config producerOfferedPortlets.put(
-         * portlet.getPortletHandle(), portlet);
-         *  } }
-         */
-
+        LOG.info( "Added listener to portlet registry [" + portletRegistry + "]" );
+        LOG.info( "Initialized [" + consumerConfiguredPortlets.size() + "] consumer configured portlets." );
+        LOG.info( "Initialized [" + producerOfferedPortlets.size() + "] producer offered portlets." );
+        LOG.info( "**** WSRP4J Portlet Pool Initialized ****" );
     }
 
     /**
@@ -523,18 +504,21 @@
 
         public synchronized void portletApplicationRegistered( PortletRegistryEvent e )
         {
+            LOG.debug( "Received portlet application registered event for  [" + e.getApplicationId() + "]" );
             PortletAppDD appDD = e.getPortletApplicationDescriptor();
             String appId = e.getApplicationId();
             for ( Iterator i = appDD.getPortlets().iterator(); i.hasNext(); )
             {
                 PortletDD portletDD = (PortletDD) i.next();
                 String portletId = appId + "/" + portletDD.getPortletName();
+                LOG.debug( "Registering portlet with id [" + portletId + "]" );
                 producerOfferedPortlets.put( portletId, createProducerOfferedPortlet( appId, portletDD ) );
             }
         }
 
         public synchronized void portletApplicationRemoved( PortletRegistryEvent e )
         {
+            LOG.debug( "Received portlet application removed event for  [" + e.getApplicationId() + "]" );
             PortletAppDD appDD = e.getPortletApplicationDescriptor();
             String appId = e.getApplicationId();
             for ( Iterator i = appDD.getPortlets().iterator(); i.hasNext(); )
@@ -543,6 +527,7 @@
                 String portletId = appId + "/" + portletDD.getPortletName();
                 if ( producerOfferedPortlets.containsKey( portletId ) )
                 {
+                    LOG.debug( "Unregistering producer offered portlet with id [" + portletId + "]" );
                     producerOfferedPortlets.remove( portletId );
                 }
 
@@ -550,6 +535,7 @@
                 {
                     // use destroy(), as it handles scoping issues
                     // TODO: deal with cloned children/parents?
+                    LOG.debug( "Unregistering cosumer configured portlet with id [" + portletId + "]" );
                     destroy( portletId );
                 }
             }