Author: chris.laprun(a)jboss.com
Date: 2007-02-12 15:34:50 -0500 (Mon, 12 Feb 2007)
New Revision: 6227
Modified:
trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java
Log:
- Optimization: avoid having to retrieve the service description when there is no need
to.
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java 2007-02-12
20:33:30 UTC (rev 6226)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java 2007-02-12
20:34:50 UTC (rev 6227)
@@ -199,7 +199,7 @@
log.debug("Registration not required");
setRegistrationInfo(RegistrationInfo.REGISTRATION_NOT_NEEDED);
setServiceDescriptionRequest(getUnregisteredServiceDescriptionRequest());
- extractOfferedPortlets(getServiceDescription());
+ extractOfferedPortlets(serviceDescription);
isInitialized = true;
}
@@ -314,14 +314,14 @@
public Portlet getPortlet(String portletId) throws PortletInvokerException
{
- refresh(false);
+ boolean justRefreshed = refresh(false);
- // if cache is still valid, use information from cached service description
- if (useCache() && !isCacheExpired())
+ // if cache is still valid or we just refreshed, use information from cached
service description
+ if (justRefreshed || (useCache() && !isCacheExpired()))
{
log.debug("getPortlet from cached service description");
- return (Portlet)getPortletMap().get(portletId);
+ return (Portlet)popsMap.get(portletId);
}
else // otherwise, retrieve just the information for the appropriate portlet
{
Show replies by date