Author: chris.laprun(a)jboss.com
Date: 2011-08-26 06:33:42 -0400 (Fri, 26 Aug 2011)
New Revision: 7238
Added:
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/src/main/resources/conf/wsrp-consumers-config.xml
Modified:
epp/portal/branches/EPP_5_2_Branch/pom.xml
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/WSRPServiceIntegration.java
Log:
- JBEPP-1018: Updated to WSRP 2.1.0-Beta05, now configuring consumers from InputStream
similarly to what's done for producer configuration, added default consumers
configuration file to extension component.
Modified: epp/portal/branches/EPP_5_2_Branch/pom.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/pom.xml 2011-08-26 10:27:04 UTC (rev 7237)
+++ epp/portal/branches/EPP_5_2_Branch/pom.xml 2011-08-26 10:33:42 UTC (rev 7238)
@@ -48,7 +48,7 @@
<org.gatein.wci.version>2.1.0-Beta06</org.gatein.wci.version>
<org.gatein.pc.version>2.3.0-Beta04</org.gatein.pc.version>
<org.picketlink.idm>1.3.0.Alpha03</org.picketlink.idm>
- <org.gatein.wsrp.version>2.1.0-Beta04</org.gatein.wsrp.version>
+ <org.gatein.wsrp.version>2.1.0-Beta05</org.gatein.wsrp.version>
<org.gatein.mop.version>1.1.0-Beta05</org.gatein.mop.version>
<org.gatein.mgmt.version>1.0.0-Beta02</org.gatein.mgmt.version>
<org.slf4j.version>1.5.8</org.slf4j.version>
Modified:
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/WSRPServiceIntegration.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/WSRPServiceIntegration.java 2011-08-26
10:27:04 UTC (rev 7237)
+++
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/WSRPServiceIntegration.java 2011-08-26
10:33:42 UTC (rev 7238)
@@ -89,11 +89,13 @@
private static final String PRODUCER_CONFIG_LOCATION =
"producerConfigLocation";
private static final String CONSUMERS_CONFIG_LOCATION =
"consumersConfigLocation";
- private final InputStream configurationIS;
+ private final InputStream producerConfigurationIS;
private final String producerConfigLocation;
private WSRPProducer producer;
- private ConsumerRegistry consumerRegistry;
+ private final InputStream consumersConfigurationIS;
+ private final String consumersConfigLocation;
+ private JCRConsumerRegistry consumerRegistry;
private ExoContainer container;
private final ExoKernelIntegration exoKernelIntegration;
private final boolean bypass;
@@ -107,7 +109,6 @@
// todo: we currently only allow the service to go through initialization if we are
running in the default portal
// as this service is not meant to work with extensions yet...
- String consumersConfigLocation;
if ("portal".equals(context.getName()))
{
if (params != null)
@@ -121,7 +122,8 @@
+ PRODUCER_CONFIG_LOCATION + "and " +
CONSUMERS_CONFIG_LOCATION);
}
- configurationIS = configurationManager.getInputStream(CLASSPATH +
producerConfigLocation);
+ producerConfigurationIS = configurationManager.getInputStream(CLASSPATH +
producerConfigLocation);
+ consumersConfigurationIS = configurationManager.getInputStream(CLASSPATH +
consumersConfigLocation);
container = context.getContainer();
@@ -136,7 +138,8 @@
producerConfigLocation = null;
consumersConfigLocation = null;
- configurationIS = null;
+ producerConfigurationIS = null;
+ consumersConfigurationIS = null;
exoKernelIntegration = null;
bypass = true;
}
@@ -146,16 +149,23 @@
{
if (!bypass)
{
- startProducer();
- startConsumers();
+ try
+ {
+ startProducer();
+ startConsumers();
- // listen for web app events so that we can inject services into WSRP admin UI
"cleanly"
- // todo: this service injection should really be done using CDI... :/
- ServletContainerFactory factory = DefaultServletContainerFactory.getInstance();
- ServletContainer servletContainer = factory.getServletContainer();
- servletContainer.addWebAppListener(this);
+ // listen for web app events so that we can inject services into WSRP admin
UI "cleanly"
+ // todo: this service injection should really be done using CDI... :/
+ ServletContainerFactory factory =
DefaultServletContainerFactory.getInstance();
+ ServletContainer servletContainer = factory.getServletContainer();
+ servletContainer.addWebAppListener(this);
- log.info("WSRP Service version '" +
WSRPConstants.WSRP_SERVICE_VERSION + "' started");
+ log.info("WSRP Service version '" +
WSRPConstants.WSRP_SERVICE_VERSION + "' STARTED");
+ }
+ catch (Exception e)
+ {
+ log.error("WSRP Service version '" +
WSRPConstants.WSRP_SERVICE_VERSION + "' FAILED to start", e);
+ }
}
}
@@ -169,7 +179,7 @@
persister.initializeBuilderFor(JCRProducerConfigurationService.mappingClasses);
producerConfigurationService = new JCRProducerConfigurationService(persister);
- producerConfigurationService.setDefaultConfigurationIS(configurationIS);
+ producerConfigurationService.setConfigurationIS(producerConfigurationIS);
producerConfigurationService.reloadConfiguration();
}
catch (Exception e)
@@ -271,6 +281,8 @@
exoKernelIntegration.getPortletApplicationRegistry().addListener(producer);
producer.start();
+
+ log.info("WSRP Producer started");
}
private void startConsumers()
@@ -295,6 +307,7 @@
consumerRegistry = new JCRConsumerRegistry(persister);
consumerRegistry.setFederatingPortletInvoker(federatingPortletInvoker);
consumerRegistry.setSessionEventBroadcaster(sessionEventBroadcaster);
+ consumerRegistry.setConfigurationIS(consumersConfigurationIS);
// create ConsumerStructureProvider and register it to listen to page events
POMSessionManager sessionManager =
(POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
@@ -321,9 +334,11 @@
}
catch (Exception e)
{
- throw new RuntimeException("Couldn't start WSRP consumers
registry.", e);
+ throw new RuntimeException("Couldn't start WSRP consumers registry from
configuration " + consumersConfigLocation, e);
}
container.registerComponentInstance(ConsumerRegistry.class, consumerRegistry);
+
+ log.info("WSRP Consumers started");
}
public void stop()
Added:
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/src/main/resources/conf/wsrp-consumers-config.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/src/main/resources/conf/wsrp-consumers-config.xml
(rev 0)
+++
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/src/main/resources/conf/wsrp-consumers-config.xml 2011-08-26
10:33:42 UTC (rev 7238)
@@ -0,0 +1,94 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+
+<!--
+ ~ JBoss, a division of Red Hat
+ ~ Copyright 2010, 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 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<deployments
xmlns="http://www.gatein.org/xml/ns/gatein_wsrp_consumer_1_0"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_wsrp_consume...
http://www.jboss.org/portal/xsd/gatein_wsrp_consumer_1_0.xsd">
+ <deployment>
+ <wsrp-producer id="selfv1" expiration-cache="500"
ws-timeout="50000">
+
<endpoint-wsdl-url>http://localhost:8080/wsrp-producer/v1/MarkupService?wsdl</endpoint-wsdl-url>
+ <registration-data/>
+ </wsrp-producer>
+ </deployment>
+ <deployment>
+ <wsrp-producer id="selfv2" expiration-cache="500"
ws-timeout="50000">
+
<endpoint-wsdl-url>http://localhost:8080/wsrp-producer/v2/MarkupService?wsdl</endpoint-wsdl-url>
+ <registration-data/>
+ </wsrp-producer>
+ </deployment>
+ <!--<deployment>
+ <wsrp-producer id="NetUnity" expiration-cache="300">
+
<
endpoint-wsdl-url>http://wsrp.netunitysoftware.com/WSRPTestService/WSR...
+ <registration-data/>
+ </wsrp-producer>
+ </deployment>-->
+ <!--<deployment>
+ <wsrp-producer id="NetUnityV2" expiration-cache="300">
+
<
endpoint-wsdl-url>http://www.netunitysoftware.com/wsrp2interop/WsrpPro...
+ <registration-data/>
+ </wsrp-producer>
+ </deployment>
+ <deployment>
+ <wsrp-producer id="NetUnityV1" expiration-cache="300">
+
<
endpoint-wsdl-url>http://www.netunitysoftware.com/wsrp2interop/WsrpPro...
+ <registration-data/>
+ </wsrp-producer>
+ </deployment>-->
+ <!--<deployment>
+ <wsrp-producer id="vignette" expiration-cache="300">
+
<endpoint-wsdl-url>http://wsrpdemo.vignette.com:8080/producer/wsdl</endpoint-wsdl-url>
+ <registration-data>
+ <property>
+ <name>com.vignette.wsrp.registration.username</name>
+ <lang>en</lang>
+ <value>test</value>
+ </property>
+ <property>
+ <name>com.vignette.wsrp.registration.password</name>
+ <lang>en</lang>
+ <value>test</value>
+ </property>
+ </registration-data>
+ </wsrp-producer>
+ </deployment>-->
+ <!--<deployment>
+ <wsrp-producer id="bea" expiration-cache="300">
+
<endpoint-wsdl-url>http://wsrp.bea.com:7001/producer/producer?WSDL</endpoint-wsdl-url>
+ <registration-data>
+ <property>
+ <name>{urn:bea:wlp:prop:reg:registration}consumerRole</name>
+ <lang>en</lang>
+ <value>insider</value>
+ </property>
+ </registration-data>
+ </wsrp-producer>
+ </deployment>-->
+ <!--<deployment>
+ <wsrp-producer id="oracle" expiration-cache="300">
+
<
endpoint-wsdl-url>http://portalstandards.oracle.com/portletapp/portlet...
+ <registration-data/>
+ </wsrp-producer>
+ </deployment>-->
+</deployments>
\ No newline at end of file
Property changes on:
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/src/main/resources/conf/wsrp-consumers-config.xml
___________________________________________________________________
Added: svn:executable
+ *