Author: chris.laprun(a)jboss.com
Date: 2007-01-17 13:37:31 -0500 (Wed, 17 Jan 2007)
New Revision: 6020
Modified:
trunk/build/ide/intellij/idea60/modules/workflow/workflow.iml
trunk/wsrp/build.xml
trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java
trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/WSRPConsumerImpl.java
trunk/wsrp/src/main/org/jboss/portal/wsrp/deployment/WSRPConsumerService.java
trunk/wsrp/src/main/org/jboss/portal/wsrp/deployment/WSRPDeployer.java
trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPProducerImpl.java
Log:
- JBPORTAL-1194: Reverted build of ProducerInfo on Consumer start to work around
deployment issues.
- JBPORTAL-1201: ProducerInfo.refresh now correctly refreshes POP list as well.
- Minor code clean-ups.
Modified: trunk/build/ide/intellij/idea60/modules/workflow/workflow.iml
===================================================================
--- trunk/build/ide/intellij/idea60/modules/workflow/workflow.iml 2007-01-17 15:37:41 UTC
(rev 6019)
+++ trunk/build/ide/intellij/idea60/modules/workflow/workflow.iml 2007-01-17 18:37:31 UTC
(rev 6020)
@@ -52,5 +52,178 @@
<option name="ACTIVE_VCS_NAME" value="svn" />
<option name="USE_PROJECT_VCS" value="false" />
</component>
+ <component name="copyright">
+ <Base>
+ <setting name="state" value="1" />
+ </Base>
+ <LanguageOptions name="$TEMPLATE$">
+ <option name="templateOptions">
+ <value>
+ <option name="block" value="true" />
+ <option name="separateBefore" value="true" />
+ <option name="separateAfter" value="true" />
+ <option name="prefixLines" value="true" />
+ <option name="lenBefore" value="80" />
+ <option name="lenAfter" value="80" />
+ <option name="box" value="true" />
+ <option name="filler" value=" " />
+ </value>
+ </option>
+ <option name="notice" value="JBoss, a division of Red
Hat Copyright &#36;today.year, Red Hat Middleware, LLC, and individual
contributors as indicated by the @authors tag. See the copyright.txt in
the distribution for a full listing of individual
contributors. This is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version. This software is
distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details. You
should have received a copy of the GNU Lesser General Public License along with
this software; if not, write to the Free Software Foundation, Inc., 51 Fr!
anklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF site:
http://www.fsf.org." />
+ <option name="keyword" value="Copyright" />
+ <option name="fileTypeOverride" value="4" />
+ <option name="relativeBefore" value="true" />
+ <option name="addBlankAfter" value="true" />
+ <option name="fileLocation" value="1" />
+ <option name="useAlternate" value="false" />
+ </LanguageOptions>
+ <LanguageOptions name="CSS">
+ <option name="templateOptions">
+ <value>
+ <option name="block" value="true" />
+ <option name="separateBefore" value="false" />
+ <option name="separateAfter" value="false" />
+ <option name="prefixLines" value="true" />
+ <option name="lenBefore" value="80" />
+ <option name="lenAfter" value="80" />
+ <option name="box" value="false" />
+ <option name="filler" value=" " />
+ </value>
+ </option>
+ <option name="notice" value="Copyright (c)
&#36;today.year, Your Corporation. All Rights Reserved." />
+ <option name="keyword" value="Copyright" />
+ <option name="fileTypeOverride" value="1" />
+ <option name="relativeBefore" value="true" />
+ <option name="addBlankAfter" value="true" />
+ <option name="fileLocation" value="1" />
+ <option name="useAlternate" value="false" />
+ </LanguageOptions>
+ <LanguageOptions name="HTML">
+ <option name="templateOptions">
+ <value>
+ <option name="block" value="true" />
+ <option name="separateBefore" value="false" />
+ <option name="separateAfter" value="false" />
+ <option name="prefixLines" value="true" />
+ <option name="lenBefore" value="80" />
+ <option name="lenAfter" value="80" />
+ <option name="box" value="false" />
+ <option name="filler" value=" " />
+ </value>
+ </option>
+ <option name="notice" value="Copyright (c)
&#36;today.year, Your Corporation. All Rights Reserved." />
+ <option name="keyword" value="Copyright" />
+ <option name="fileTypeOverride" value="1" />
+ <option name="relativeBefore" value="true" />
+ <option name="addBlankAfter" value="true" />
+ <option name="fileLocation" value="1" />
+ <option name="useAlternate" value="false" />
+ </LanguageOptions>
+ <LanguageOptions name="JAVA">
+ <option name="templateOptions">
+ <value>
+ <option name="block" value="true" />
+ <option name="separateBefore" value="false" />
+ <option name="separateAfter" value="false" />
+ <option name="prefixLines" value="true" />
+ <option name="lenBefore" value="80" />
+ <option name="lenAfter" value="80" />
+ <option name="box" value="false" />
+ <option name="filler" value=" " />
+ </value>
+ </option>
+ <option name="notice" value="Copyright (c)
&#36;today.year, Your Corporation. All Rights Reserved." />
+ <option name="keyword" value="Copyright" />
+ <option name="fileTypeOverride" value="2" />
+ <option name="relativeBefore" value="true" />
+ <option name="addBlankAfter" value="true" />
+ <option name="fileLocation" value="1" />
+ <option name="useAlternate" value="false" />
+ </LanguageOptions>
+ <LanguageOptions name="JSP">
+ <option name="templateOptions">
+ <value>
+ <option name="block" value="true" />
+ <option name="separateBefore" value="false" />
+ <option name="separateAfter" value="false" />
+ <option name="prefixLines" value="true" />
+ <option name="lenBefore" value="80" />
+ <option name="lenAfter" value="80" />
+ <option name="box" value="false" />
+ <option name="filler" value=" " />
+ </value>
+ </option>
+ <option name="notice" value="Copyright (c)
&#36;today.year, Your Corporation. All Rights Reserved." />
+ <option name="keyword" value="Copyright" />
+ <option name="fileTypeOverride" value="1" />
+ <option name="relativeBefore" value="true" />
+ <option name="addBlankAfter" value="true" />
+ <option name="fileLocation" value="1" />
+ <option name="useAlternate" value="false" />
+ </LanguageOptions>
+ <LanguageOptions name="JavaScript">
+ <option name="templateOptions">
+ <value>
+ <option name="block" value="true" />
+ <option name="separateBefore" value="false" />
+ <option name="separateAfter" value="false" />
+ <option name="prefixLines" value="true" />
+ <option name="lenBefore" value="80" />
+ <option name="lenAfter" value="80" />
+ <option name="box" value="false" />
+ <option name="filler" value=" " />
+ </value>
+ </option>
+ <option name="notice" value="Copyright (c)
&#36;today.year, Your Corporation. All Rights Reserved." />
+ <option name="keyword" value="Copyright" />
+ <option name="fileTypeOverride" value="1" />
+ <option name="relativeBefore" value="true" />
+ <option name="addBlankAfter" value="true" />
+ <option name="fileLocation" value="1" />
+ <option name="useAlternate" value="false" />
+ </LanguageOptions>
+ <LanguageOptions name="Properties">
+ <option name="templateOptions">
+ <value>
+ <option name="block" value="true" />
+ <option name="separateBefore" value="false" />
+ <option name="separateAfter" value="false" />
+ <option name="prefixLines" value="true" />
+ <option name="lenBefore" value="80" />
+ <option name="lenAfter" value="80" />
+ <option name="box" value="false" />
+ <option name="filler" value=" " />
+ </value>
+ </option>
+ <option name="notice" value="Copyright (c)
&#36;today.year, Your Corporation. All Rights Reserved." />
+ <option name="keyword" value="Copyright" />
+ <option name="fileTypeOverride" value="1" />
+ <option name="relativeBefore" value="true" />
+ <option name="addBlankAfter" value="true" />
+ <option name="fileLocation" value="1" />
+ <option name="useAlternate" value="false" />
+ </LanguageOptions>
+ <LanguageOptions name="XML">
+ <option name="templateOptions">
+ <value>
+ <option name="block" value="true" />
+ <option name="separateBefore" value="false" />
+ <option name="separateAfter" value="false" />
+ <option name="prefixLines" value="true" />
+ <option name="lenBefore" value="80" />
+ <option name="lenAfter" value="80" />
+ <option name="box" value="false" />
+ <option name="filler" value=" " />
+ </value>
+ </option>
+ <option name="notice" value="Copyright (c)
&#36;today.year, Your Corporation. All Rights Reserved." />
+ <option name="keyword" value="Copyright" />
+ <option name="fileTypeOverride" value="2" />
+ <option name="relativeBefore" value="true" />
+ <option name="addBlankAfter" value="true" />
+ <option name="fileLocation" value="1" />
+ <option name="useAlternate" value="false" />
+ </LanguageOptions>
+ </component>
</module>
Modified: trunk/wsrp/build.xml
===================================================================
--- trunk/wsrp/build.xml 2007-01-17 15:37:41 UTC (rev 6019)
+++ trunk/wsrp/build.xml 2007-01-17 18:37:31 UTC (rev 6020)
@@ -238,7 +238,7 @@
<jar jarfile="${build.lib}/portal-wsrp.jse">
<fileset dir="${build.resources}/portal-wsrp-war"/>
</jar>
- <copy todir="${build.resources}/portal-wsrp-sar">
+ <copy todir="${build.resources}/portal-wsrp-sar"
overwrite="true">
<fileset dir="${build.lib}"
includes="portal-wsrp-client.jar"/>
<fileset dir="${build.lib}"
includes="portal-wsrp-lib.jar"/>
<fileset dir="${build.lib}"
includes="portal-wsrp.jse"/>
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-17
15:37:41 UTC (rev 6019)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerInfo.java 2007-01-17
18:37:31 UTC (rev 6020)
@@ -120,27 +120,16 @@
this.registrationInfo = registrationInfo;
}
- public boolean requiresRegistration()
+ CookieProtocol getRequiresInitCookie()
{
- return registrationInfo != null &&
registrationInfo.requiresRegistration();
- }
-
- public CookieProtocol getRequiresInitCookie()
- {
return requiresInitCookie;
}
- public boolean isInitialized()
+ private boolean isInitialized()
{
return isInitialized;
}
- public void start() throws Exception
- {
- refresh(true);
- endpointConfigurationInfo.getServiceFactory().start();
- }
-
public boolean refresh(boolean forceRefresh) throws PortletInvokerException
{
ServiceDescription serviceDescription;
@@ -200,6 +189,10 @@
isInitialized = false;
}
}
+
+ // refresh the offered portlets
+ extractOfferedPortlets(serviceDescription);
+ isInitialized = true;
}
else
{
@@ -225,11 +218,6 @@
return isInitialized;
}
- public boolean needsRegistration()
- {
- return requiresRegistration() && !registrationInfo.isRegistrationValid();
- }
-
public String getId()
{
return producerId;
@@ -326,6 +314,8 @@
public Portlet getPortlet(String portletId) throws PortletInvokerException
{
+ refresh(false);
+
// if cache is still valid, use information from cached service description
if (useCache() && !isCacheExpired())
{
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/WSRPConsumerImpl.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/WSRPConsumerImpl.java 2007-01-17
15:37:41 UTC (rev 6019)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/WSRPConsumerImpl.java 2007-01-17
18:37:31 UTC (rev 6020)
@@ -504,9 +504,16 @@
protected void startService() throws Exception
{
- producerInfo.start();
+ super.startService();
+ getServiceFactory().start();
}
+ protected void stopService() throws Exception
+ {
+ getServiceFactory().stop();
+ super.stopService();
+ }
+
// Web services access
**********************************************************************************************
public ServiceFactory getServiceFactory()
@@ -519,23 +526,27 @@
producerInfo.getEndpointConfigurationInfo().setServiceFactory(serviceFactory);
}
- public WSRP_v1_ServiceDescription_PortType getServiceDescriptionService() throws
InvokerUnavailableException
+ public WSRP_v1_ServiceDescription_PortType getServiceDescriptionService() throws
PortletInvokerException
{
+ producerInfo.refresh(false);
return producerInfo.getEndpointConfigurationInfo().getServiceDescriptionService();
}
- public WSRP_v1_Markup_PortType getMarkupService() throws InvokerUnavailableException
+ public WSRP_v1_Markup_PortType getMarkupService() throws PortletInvokerException
{
+ producerInfo.refresh(false);
return producerInfo.getEndpointConfigurationInfo().getMarkupService();
}
- public WSRP_v1_PortletManagement_PortType getPortletManagementService() throws
InvokerUnavailableException
+ public WSRP_v1_PortletManagement_PortType getPortletManagementService() throws
PortletInvokerException
{
+ producerInfo.refresh(false);
return producerInfo.getEndpointConfigurationInfo().getPortletManagementService();
}
- public WSRP_v1_Registration_PortType getRegistrationService() throws
InvokerUnavailableException
+ public WSRP_v1_Registration_PortType getRegistrationService() throws
PortletInvokerException
{
+ producerInfo.refresh(false);
return producerInfo.getEndpointConfigurationInfo().getRegistrationService();
}
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/deployment/WSRPConsumerService.java
===================================================================
---
trunk/wsrp/src/main/org/jboss/portal/wsrp/deployment/WSRPConsumerService.java 2007-01-17
15:37:41 UTC (rev 6019)
+++
trunk/wsrp/src/main/org/jboss/portal/wsrp/deployment/WSRPConsumerService.java 2007-01-17
18:37:31 UTC (rev 6020)
@@ -73,11 +73,15 @@
protected void startService() throws Exception
{
+ super.startService();
federatingPortletInvoker.registerInvoker(this);
+ consumer.start();
}
protected void stopService() throws Exception
{
+ consumer.stop();
federatingPortletInvoker.unregisterInvoker(this);
+ super.stop();
}
}
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/deployment/WSRPDeployer.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/deployment/WSRPDeployer.java 2007-01-17
15:37:41 UTC (rev 6019)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/deployment/WSRPDeployer.java 2007-01-17
18:37:31 UTC (rev 6020)
@@ -40,8 +40,6 @@
*/
public class WSRPDeployer extends SubDeployerSupport implements WSRPDeployerMBean
{
-
-
/** . */
private static final String[] DEFAULT_ENHANCED_SUFFIXES = new
String[]{"800:-wsrp.xml"};
@@ -111,8 +109,6 @@
{
WSRPConsumerService service = (WSRPConsumerService)i.next();
service.setFederatingPortletInvoker(federatingPortletInvoker);
- service.getConsumer().getServiceFactory().start();
- service.getConsumer().start();
service.start();
}
catch (Exception e)
@@ -131,8 +127,6 @@
{
WSRPConsumerService service = (WSRPConsumerService)i.next();
service.stop();
- service.getConsumer().stop();
- service.getConsumer().getServiceFactory().stop();
}
catch (Exception e)
{
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPProducerImpl.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPProducerImpl.java 2007-01-17
15:37:41 UTC (rev 6019)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/WSRPProducerImpl.java 2007-01-17
18:37:31 UTC (rev 6020)
@@ -462,7 +462,6 @@
log.debug("Portlet " + portlet.getContext() + " remotable: " +
remotable);
if (remotable != null)
{
-
return remotable.booleanValue();
}
else