[portal-commits] JBoss Portal SVN: r5965 - trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer

portal-commits at lists.jboss.org portal-commits at lists.jboss.org
Mon Jan 8 17:46:02 EST 2007


Author: chris.laprun at jboss.com
Date: 2007-01-08 17:46:01 -0500 (Mon, 08 Jan 2007)
New Revision: 5965

Modified:
   trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java
Log:
- Fixed incorrect behavior in refreshIfNeeded (thanks Matt).

Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java	2007-01-08 15:29:00 UTC (rev 5964)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java	2007-01-08 22:46:01 UTC (rev 5965)
@@ -192,25 +192,27 @@
                isInitialized = false;
             }
          }
+         else
+         {
+            log.debug("Registration not required");
+            setRegistrationInfo(RegistrationInfo.REGISTRATION_NOT_NEEDED);
+            setServiceDescriptionRequest(getUnregisteredServiceDescriptionRequest());
+            extractOfferedPortlets(getServiceDescription());
+            isInitialized = true;
+         }
 
          //todo: could extract more information here...
 
-         log.debug("Registration not required");
-         setRegistrationInfo(RegistrationInfo.REGISTRATION_NOT_NEEDED);
-         setServiceDescriptionRequest(getUnregisteredServiceDescriptionRequest());
-         extractOfferedPortlets(getServiceDescription());
-         isInitialized = true;
+         if (isInitialized)
+         {
+            resetCacheTimerIfNeeded();
+         }
+         else
+         {
+            log.warn("Producer is NOT initialized.");
+         }
       }
 
-      if (isInitialized)
-      {
-         resetCacheTimerIfNeeded();
-      }
-      else
-      {
-         log.warn("Producer is NOT initialized.");
-      }
-
       return isInitialized;
    }
 
@@ -448,26 +450,6 @@
       }
    }
 
-   /**
-    * @return
-    * @throws PortletInvokerException
-    * @since 2.6
-    */
-   private ServiceDescription getMinimalServiceDescription() throws PortletInvokerException
-   {
-      ServiceDescription serviceDescription;
-      try
-      {
-         serviceDescription = endpointConfigurationInfo.getServiceDescriptionService().getServiceDescription(getUnregisteredServiceDescriptionRequest());
-      }
-      catch (Exception e)
-      {
-         throw new PortletInvokerException("Couldn't access service description for producer '"
-            + producerId + "'", e);
-      }
-      return serviceDescription;
-   }
-
    private void setServiceDescriptionRequest(GetServiceDescription request)
    {
       serviceDescriptionRequest = request;




More information about the portal-commits mailing list