Author: chris.laprun(a)jboss.com
Date: 2007-02-19 23:32:43 -0500 (Mon, 19 Feb 2007)
New Revision: 6351
Added:
trunk/wsrp/src/main/org/jboss/portal/test/wsrp/deployment/MockConsumerRegistry.java
trunk/wsrp/src/resources/portal-wsrp-sar/conf/producer/
trunk/wsrp/src/resources/portal-wsrp-sar/conf/producer/config.xml
Removed:
trunk/wsrp/src/resources/portal-wsrp-sar/conf/config.xml
Modified:
trunk/wsrp/build.xml
trunk/wsrp/src/main/org/jboss/portal/test/wsrp/deployment/DeploymentTestCase.java
trunk/wsrp/src/main/org/jboss/portal/wsrp/deployment/WSRPDeployer.java
trunk/wsrp/src/main/org/jboss/portal/wsrp/deployment/WSRPDeployerMBean.java
trunk/wsrp/src/main/org/jboss/portal/wsrp/deployment/WSRPDeploymentFactory.java
trunk/wsrp/src/main/org/jboss/portal/wsrp/portlet/consumers/ConsumersRegistry.java
trunk/wsrp/src/main/org/jboss/portal/wsrp/portlet/consumers/ConsumersRegistryService.java
trunk/wsrp/src/resources/portal-wsrp-sar/META-INF/jboss-service.xml
trunk/wsrp/src/resources/portal-wsrp-sar/default-wsrp.xml
trunk/wsrp/src/resources/tests/test-deployment-lib-jar/test-wsrp.xml
Log:
- Changed -wsrp.xml format to facilitate processing of producer info with respect to
existence in the database.
- Updated test cases.
- Moved location of producer configuration file in preparation of adding more
configuration files for hibernate.
Modified: trunk/wsrp/build.xml
===================================================================
--- trunk/wsrp/build.xml 2007-02-19 21:49:56 UTC (rev 6350)
+++ trunk/wsrp/build.xml 2007-02-20 04:32:43 UTC (rev 6351)
@@ -122,6 +122,7 @@
<path refid="jboss.jbossxb.classpath"/>
<path refid="apache.httpclient.classpath"/>
<path refid="apache.logging.classpath"/>
+ <path refid="hibernate.hibernate.classpath"/>
</path>
@@ -342,6 +343,7 @@
<fileset
dir="${build.resources.test}/test-deployment-lib-jar"/>
<fileset dir="${build.classes}/">
<include name="org/jboss/portal/test/wsrp/deployment/**"/>
+ <include
name="org/jboss/portal/test/wsrp/framework/support/**"/>
</fileset>
</jar>
</target>
Modified:
trunk/wsrp/src/main/org/jboss/portal/test/wsrp/deployment/DeploymentTestCase.java
===================================================================
---
trunk/wsrp/src/main/org/jboss/portal/test/wsrp/deployment/DeploymentTestCase.java 2007-02-19
21:49:56 UTC (rev 6350)
+++
trunk/wsrp/src/main/org/jboss/portal/test/wsrp/deployment/DeploymentTestCase.java 2007-02-20
04:32:43 UTC (rev 6351)
@@ -55,7 +55,7 @@
URL wsrpXMLLocation =
Thread.currentThread().getContextClassLoader().getResource("test-wsrp.xml");
assertNotNull(wsrpXMLLocation);
Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
- ObjectModelFactory factory = new WSRPDeploymentFactory();
+ ObjectModelFactory factory = new WSRPDeploymentFactory(new
MockConsumerRegistry());
Object o = unmarshaller.unmarshal(wsrpXMLLocation.openStream(), factory, null);
assertNotNull(o);
assertTrue(o instanceof WSRPDeployment);
Added:
trunk/wsrp/src/main/org/jboss/portal/test/wsrp/deployment/MockConsumerRegistry.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/test/wsrp/deployment/MockConsumerRegistry.java
(rev 0)
+++
trunk/wsrp/src/main/org/jboss/portal/test/wsrp/deployment/MockConsumerRegistry.java 2007-02-20
04:32:43 UTC (rev 6351)
@@ -0,0 +1,66 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2007, 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. *
+ ******************************************************************************/
+
+package org.jboss.portal.test.wsrp.deployment;
+
+import org.jboss.portal.portlet.federation.FederatingPortletInvoker;
+import org.jboss.portal.test.wsrp.framework.support.MockWSRPConsumer;
+import org.jboss.portal.wsrp.WSRPConsumer;
+import org.jboss.portal.wsrp.portlet.consumers.ConsumersRegistry;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
+ * @version $Revision$
+ * @since 2.6
+ */
+public class MockConsumerRegistry implements ConsumersRegistry
+{
+ private Map consumers = new HashMap(3);
+
+
+ public MockConsumerRegistry()
+ {
+ consumers.put("inDB", new MockWSRPConsumer());
+ consumers.put("inDB2", new MockWSRPConsumer());
+ }
+
+ public Collection getConfiguredConsumers()
+ {
+ return consumers.values();
+ }
+
+ public WSRPConsumer getConsumer(String id)
+ {
+ return (WSRPConsumer)consumers.get(id);
+ }
+
+ public FederatingPortletInvoker getFederatingPortletInvoker()
+ {
+ return null;
+ }
+
+}
Property changes on:
trunk/wsrp/src/main/org/jboss/portal/test/wsrp/deployment/MockConsumerRegistry.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/deployment/WSRPDeployer.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/deployment/WSRPDeployer.java 2007-02-19
21:49:56 UTC (rev 6350)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/deployment/WSRPDeployer.java 2007-02-20
04:32:43 UTC (rev 6351)
@@ -26,7 +26,7 @@
import org.jboss.deployment.DeploymentInfo;
import org.jboss.deployment.SubDeployerSupport;
import org.jboss.portal.common.util.URLTools;
-import org.jboss.portal.portlet.federation.FederatingPortletInvoker;
+import org.jboss.portal.wsrp.portlet.consumers.ConsumersRegistry;
import org.jboss.xb.binding.ObjectModelFactory;
import org.jboss.xb.binding.Unmarshaller;
import org.jboss.xb.binding.UnmarshallerFactory;
@@ -48,8 +48,7 @@
setEnhancedSuffixes(DEFAULT_ENHANCED_SUFFIXES);
}
- /** . */
- private FederatingPortletInvoker federatingPortletInvoker;
+ private ConsumersRegistry consumerRegistry;
/** . */
private URL deployedDefaultWSRPURL;
@@ -57,14 +56,14 @@
/** . */
private String defaultWSRPLocation;
- public FederatingPortletInvoker getFederatingPortletInvoker()
+ public ConsumersRegistry getConsumerRegistry()
{
- return federatingPortletInvoker;
+ return consumerRegistry;
}
- public void setFederatingPortletInvoker(FederatingPortletInvoker
federatingPortletInvoker)
+ public void setConsumerRegistry(ConsumersRegistry consumerRegistry)
{
- this.federatingPortletInvoker = federatingPortletInvoker;
+ this.consumerRegistry = consumerRegistry;
}
public String getDefaultWSRPLocation()
@@ -84,7 +83,7 @@
try
{
Unmarshaller unmarshaller =
UnmarshallerFactory.newInstance().newUnmarshaller();
- ObjectModelFactory factory = new WSRPDeploymentFactory();
+ ObjectModelFactory factory = new WSRPDeploymentFactory(consumerRegistry);
WSRPDeployment deployment =
(WSRPDeployment)unmarshaller.unmarshal(di.localUrl.openStream(), factory, null);
di.metaData = deployment;
}
@@ -108,7 +107,7 @@
try
{
WSRPConsumerService service = (WSRPConsumerService)i.next();
- service.setFederatingPortletInvoker(federatingPortletInvoker);
+
service.setFederatingPortletInvoker(consumerRegistry.getFederatingPortletInvoker());
service.start();
}
catch (Exception e)
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/deployment/WSRPDeployerMBean.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/deployment/WSRPDeployerMBean.java 2007-02-19
21:49:56 UTC (rev 6350)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/deployment/WSRPDeployerMBean.java 2007-02-20
04:32:43 UTC (rev 6351)
@@ -23,7 +23,7 @@
package org.jboss.portal.wsrp.deployment;
import org.jboss.deployment.SubDeployerExtMBean;
-import org.jboss.portal.portlet.federation.FederatingPortletInvoker;
+import org.jboss.portal.wsrp.portlet.consumers.ConsumersRegistry;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -31,11 +31,11 @@
*/
public interface WSRPDeployerMBean extends SubDeployerExtMBean
{
- FederatingPortletInvoker getFederatingPortletInvoker();
+ String getDefaultWSRPLocation();
- void setFederatingPortletInvoker(FederatingPortletInvoker federatingPortletInvoker);
+ void setDefaultWSRPLocation(String defaultWSRPLocation);
- String getDefaultWSRPLocation();
+ ConsumersRegistry getConsumerRegistry();
- void setDefaultWSRPLocation(String defaultWSRPLocation);
+ void setConsumerRegistry(ConsumersRegistry consumerRegistry);
}
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/deployment/WSRPDeploymentFactory.java
===================================================================
---
trunk/wsrp/src/main/org/jboss/portal/wsrp/deployment/WSRPDeploymentFactory.java 2007-02-19
21:49:56 UTC (rev 6350)
+++
trunk/wsrp/src/main/org/jboss/portal/wsrp/deployment/WSRPDeploymentFactory.java 2007-02-20
04:32:43 UTC (rev 6351)
@@ -23,10 +23,13 @@
package org.jboss.portal.wsrp.deployment;
import org.jboss.logging.Logger;
+import org.jboss.portal.common.util.ParameterValidation;
+import org.jboss.portal.wsrp.WSRPConsumer;
import org.jboss.portal.wsrp.consumer.EndpointConfigurationInfo;
import org.jboss.portal.wsrp.consumer.ProducerInfo;
import org.jboss.portal.wsrp.consumer.RegistrationInfo;
import org.jboss.portal.wsrp.consumer.WSRPConsumerImpl;
+import org.jboss.portal.wsrp.portlet.consumers.ConsumersRegistry;
import org.jboss.portal.wsrp.services.AbstractJNDIServiceFactory;
import org.jboss.portal.wsrp.services.PerEndpointSOAPInvokerServiceFactory;
import org.jboss.portal.wsrp.services.RemoteSOAPInvokerServiceFactory;
@@ -46,6 +49,9 @@
public class WSRPDeploymentFactory implements ObjectModelFactory
{
private final Logger log = Logger.getLogger(getClass());
+
+ private ConsumersRegistry consumerRegistry;
+
private static final boolean DEBUG = false;
/** . */
@@ -80,6 +86,12 @@
"wsrp-client/service/PortletManagementService");
}
+
+ public WSRPDeploymentFactory(ConsumersRegistry consumerRegistry)
+ {
+ this.consumerRegistry = consumerRegistry;
+ }
+
public Object newRoot(Object root, UnmarshallingContext nav, String nsURI, String
localName, Attributes attrs)
{
return new WSRPDeployment();
@@ -95,9 +107,39 @@
{
if (WSRP_PRODUCER.equals(localName))
{
+ String id = attrs.getValue("id");
+ ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(id, "producer
identifier", "Configuring a producer");
+
+ // check that the consumer doesn't exist in the database first
+ WSRPConsumer consumer = consumerRegistry.getConsumer(id);
+ if (consumer != null)
+ {
+ // consumer already exists, do not further process this producer and use the
DB configuration instead
+ return null;
+ }
+
+ // consumer didn't exist in the database, so create one and configure it
WSRPConsumerService service = new WSRPConsumerService();
- WSRPConsumerImpl consumer = new WSRPConsumerImpl();
+ consumer = new WSRPConsumerImpl();
+ ProducerInfo info = consumer.getProducerInfo();
+ info.setId(id);
+
+ String expirationCache = attrs.getValue("expiration-cache");
+ if (expirationCache != null)
+ {
+ try
+ {
+ Integer expirationCacheSeconds = new Integer(expirationCache);
+ info.setExpirationCacheSeconds(expirationCacheSeconds);
+ }
+ catch (NumberFormatException e)
+ {
+ System.out.println("Ignoring bad expiration cache value " +
expirationCache);
+ }
+ }
+
service.setConsumer(consumer);
+
return service;
}
else
@@ -162,33 +204,6 @@
return null;
}
- public void setValue(WSRPConsumerService service, UnmarshallingContext nav, String
nsURI, String localName,
- String value)
- {
- if (DEBUG)
- {
- System.out.println("setvalue service " + localName);
- }
-
- ProducerInfo prodInfo = service.getConsumer().getProducerInfo();
- if ("producer-id".equals(localName))
- {
- prodInfo.setId(value);
- }
- else if ("expiration-cache".equals(localName))
- {
- try
- {
- Integer expirationCacheMillis = new Integer(value);
- prodInfo.setExpirationCacheSeconds(expirationCacheMillis);
- }
- catch (NumberFormatException e)
- {
- System.out.println("Ignore bad expiration cache value " + value);
- }
- }
- }
-
public void setValue(PerEndpointSOAPInvokerServiceFactory serviceFactory,
UnmarshallingContext nav, String nsURI,
String localName, String value)
{
Modified:
trunk/wsrp/src/main/org/jboss/portal/wsrp/portlet/consumers/ConsumersRegistry.java
===================================================================
---
trunk/wsrp/src/main/org/jboss/portal/wsrp/portlet/consumers/ConsumersRegistry.java 2007-02-19
21:49:56 UTC (rev 6350)
+++
trunk/wsrp/src/main/org/jboss/portal/wsrp/portlet/consumers/ConsumersRegistry.java 2007-02-20
04:32:43 UTC (rev 6351)
@@ -22,9 +22,10 @@
package org.jboss.portal.wsrp.portlet.consumers;
+import org.jboss.portal.portlet.federation.FederatingPortletInvoker;
import org.jboss.portal.wsrp.WSRPConsumer;
-import java.util.List;
+import java.util.Collection;
/**
* @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
@@ -33,7 +34,10 @@
*/
public interface ConsumersRegistry
{
- List getConfiguredConsumers();
+ Collection getConfiguredConsumers();
WSRPConsumer getConsumer(String id);
+
+ FederatingPortletInvoker getFederatingPortletInvoker();
+
}
Modified:
trunk/wsrp/src/main/org/jboss/portal/wsrp/portlet/consumers/ConsumersRegistryService.java
===================================================================
---
trunk/wsrp/src/main/org/jboss/portal/wsrp/portlet/consumers/ConsumersRegistryService.java 2007-02-19
21:49:56 UTC (rev 6350)
+++
trunk/wsrp/src/main/org/jboss/portal/wsrp/portlet/consumers/ConsumersRegistryService.java 2007-02-20
04:32:43 UTC (rev 6351)
@@ -23,11 +23,12 @@
package org.jboss.portal.wsrp.portlet.consumers;
+import org.hibernate.SessionFactory;
import org.jboss.portal.common.util.ParameterValidation;
-import org.jboss.portal.portlet.federation.FederatingPortletInvoker;
-import org.jboss.portal.portlet.federation.FederatedPortletInvoker;
import org.jboss.portal.jems.as.system.AbstractJBossService;
import org.jboss.portal.portlet.PortletInvoker;
+import org.jboss.portal.portlet.federation.FederatedPortletInvoker;
+import org.jboss.portal.portlet.federation.FederatingPortletInvoker;
import org.jboss.portal.wsrp.WSRPConsumer;
import java.util.ArrayList;
@@ -35,6 +36,7 @@
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
+import java.util.SortedMap;
/**
* @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
@@ -46,6 +48,12 @@
/** Gives access to the Portal's portlet invokers */
private FederatingPortletInvoker federatingPortletInvoker;
+ private SortedMap consumers;
+
+ private SessionFactory sessionFactory;
+
+ private String sessionFactoryJNDIName;
+
public FederatingPortletInvoker getFederatingPortletInvoker()
{
return federatingPortletInvoker;
@@ -56,8 +64,52 @@
this.federatingPortletInvoker = federatingPortletInvoker;
}
- public List getConfiguredConsumers()
+ public String getSessionFactoryJNDIName()
{
+ return sessionFactoryJNDIName;
+ }
+
+ public void setSessionFactoryJNDIName(String sessionFactoryJNDIName)
+ {
+ this.sessionFactoryJNDIName = sessionFactoryJNDIName;
+ }
+
+ /*protected void startService() throws Exception
+ {
+ sessionFactory = (SessionFactory)new
InitialContext().lookup(sessionFactoryJNDIName);
+
+ // load the configured consumers
+ consumers = new TreeMap();
+ Session session = sessionFactory.getCurrentSession();
+ Iterator producerInfos = session.createQuery("from ProducerInfo pi order by
pi.id").iterate();
+ ProducerInfo producerInfo;
+ WSRPConsumer consumer;
+ while (producerInfos.hasNext())
+ {
+ producerInfo = (ProducerInfo)producerInfos.next();
+ consumer = new WSRPConsumerImpl();
+ consumer.setProducerInfo(producerInfo);
+ consumers.put(producerInfo.getId(), consumer);
+ if(producerInfo.isActive())
+ {
+ WSRPConsumerService service = new WSRPConsumerService();
+ service.setConsumer(consumer);
+ service.setFederatingPortletInvoker(federatingPortletInvoker);
+ service.start();
+ }
+ }
+ }
+
+ protected void stopService() throws Exception
+ {
+ sessionFactory = null;
+ consumers.clear();
+ consumers = null;
+ }*/
+
+ public Collection getConfiguredConsumers()
+ {
+// return Collections.unmodifiableCollection(consumers.values());
Collection invokers = federatingPortletInvoker.getFederatedInvokers();
if (invokers.isEmpty())
{
@@ -81,12 +133,17 @@
public WSRPConsumer getConsumer(String id)
{
ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(id, "consumer
id", null);
+ // return (WSRPConsumer) consumers.get(id);
return getConsumerFrom(federatingPortletInvoker.getFederatedInvoker(id));
}
- private WSRPConsumer getConsumerFrom(FederatedPortletInvoker
- service)
+ private WSRPConsumer getConsumerFrom(FederatedPortletInvoker service)
{
+ if (service == null)
+ {
+ return null;
+ }
+
PortletInvoker invoker = service.getPortletInvoker();
if (invoker instanceof WSRPConsumer)
{
Modified: trunk/wsrp/src/resources/portal-wsrp-sar/META-INF/jboss-service.xml
===================================================================
--- trunk/wsrp/src/resources/portal-wsrp-sar/META-INF/jboss-service.xml 2007-02-19
21:49:56 UTC (rev 6350)
+++ trunk/wsrp/src/resources/portal-wsrp-sar/META-INF/jboss-service.xml 2007-02-20
04:32:43 UTC (rev 6351)
@@ -105,20 +105,38 @@
name="portal.wsrp:service=ProducerConfiguration"
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
- <attribute name="ConfigLocation">conf/config.xml</attribute>
+ <attribute
name="ConfigLocation">conf/producer/config.xml</attribute>
</mbean>
<!-- Deployer for *-wsrp.xml files. Deploys default-wsrp.xml which contains the
'self' consumer -->
<mbean code="org.jboss.portal.wsrp.deployment.WSRPDeployer"
name="portal.wsrp:service=WSRPDeployer">
<attribute
name="DefaultWSRPLocation">default-wsrp.xml</attribute>
- <depends optional-attribute-name="FederatingPortletInvoker"
proxy-type="attribute">portal:service=PortletInvoker,type=Federating</depends>
+ <depends optional-attribute-name="ConsumerRegistry"
+
proxy-type="attribute">portal.wsrp:service=ConsumersRegistry</depends>
</mbean>
+ <!--<mbean
+ code="org.jboss.portal.jems.hibernate.SessionFactoryBinder"
+ name="portal:service=Hibernate,type=WSRPConsumer"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+
<depends>jboss.jca:service=DataSourceBinding,name=@portal.datasource.name@</depends>
+ --><!-- Uncomment in clustered mode : hibernate depends on its tree cache
service @portal.single.xml.close@
+ <depends>portal:service=TreeCacheProvider,type=hibernate</depends>
+ @portal.single.xml.open@ --><!--
+ <attribute name="DoChecking">true</attribute>
+ <attribute
name="ConfigLocation">conf/consumer/hibernate/hibernate.cfg.xml</attribute>
+ <attribute
name="JNDIName">java:/portal/PortletSessionFactory</attribute>
+ </mbean>-->
+
<!-- Consumers registry for WSRP consumer configuration portlet -->
<mbean
code="org.jboss.portal.wsrp.portlet.consumers.ConsumersRegistryService"
name="portal.wsrp:service=ConsumersRegistry"
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
+ <!--<depends>portal:service=Hibernate,type=WSRPConsumer</depends>
+ <attribute
name="SessionFactoryJNDIName">java:/portal/PortletSessionFactory</attribute>-->
<depends optional-attribute-name="FederatingPortletInvoker"
proxy-type="attribute">portal:service=PortletInvoker,type=Federating</depends>
</mbean>
</server>
Deleted: trunk/wsrp/src/resources/portal-wsrp-sar/conf/config.xml
===================================================================
--- trunk/wsrp/src/resources/portal-wsrp-sar/conf/config.xml 2007-02-19 21:49:56 UTC (rev
6350)
+++ trunk/wsrp/src/resources/portal-wsrp-sar/conf/config.xml 2007-02-20 04:32:43 UTC (rev
6351)
@@ -1,29 +0,0 @@
-<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ~ JBoss, a division of Red Hat ~
- ~ Copyright 2006, 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. ~
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-
-<producer-configuration>
- <registration-configuration
fullServiceDescriptionRequiresRegistration="true">
-
<registration-property-validator>org.jboss.portal.registration.policies.DefaultRegistrationPropertyValidator</registration-property-validator>
- </registration-configuration>
-</producer-configuration>
-
Copied: trunk/wsrp/src/resources/portal-wsrp-sar/conf/producer/config.xml (from rev 6343,
trunk/wsrp/src/resources/portal-wsrp-sar/conf/config.xml)
===================================================================
--- trunk/wsrp/src/resources/portal-wsrp-sar/conf/producer/config.xml
(rev 0)
+++ trunk/wsrp/src/resources/portal-wsrp-sar/conf/producer/config.xml 2007-02-20 04:32:43
UTC (rev 6351)
@@ -0,0 +1,29 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<producer-configuration>
+ <registration-configuration
fullServiceDescriptionRequiresRegistration="true">
+
<registration-property-validator>org.jboss.portal.registration.policies.DefaultRegistrationPropertyValidator</registration-property-validator>
+ </registration-configuration>
+</producer-configuration>
+
Modified: trunk/wsrp/src/resources/portal-wsrp-sar/default-wsrp.xml
===================================================================
--- trunk/wsrp/src/resources/portal-wsrp-sar/default-wsrp.xml 2007-02-19 21:49:56 UTC (rev
6350)
+++ trunk/wsrp/src/resources/portal-wsrp-sar/default-wsrp.xml 2007-02-20 04:32:43 UTC (rev
6351)
@@ -28,9 +28,7 @@
<deployments>
<deployment>
- <wsrp-producer>
- <producer-id>self</producer-id>
- <expiration-cache>120</expiration-cache>
+ <wsrp-producer id="self" expiration-cache="120">
<!--
we need to use the individual endpoint configuration because the configuration
via wsdl forces an
immediate attempt to access the web service description which is not available
yet at this point of deployment
@@ -45,17 +43,13 @@
</wsrp-producer>
</deployment>
<!--<deployment>
- <wsrp-producer>
- <producer-id>NetUnity</producer-id>
- <expiration-cache>120</expiration-cache>
+ <wsrp-producer id="NetUnity" expiration-cache="120">
<
endpoint-wsdl-url>http://wsrp.netunitysoftware.com/WSRPTestService/WSR...
<registration-data/>
</wsrp-producer>
</deployment>-->
<!--<deployment>
- <wsrp-producer>
- <producer-id>vignette</producer-id>
- <expiration-cache>120</expiration-cache>
+ <wsrp-producer id="vignette" expiration-cache="120">
<endpoint-wsdl-url>http://wsrpdemo.vignette.com:8080/producer/wsdl</endpoint-wsdl-url>
<registration-data>
<property>
@@ -72,9 +66,7 @@
</wsrp-producer>
</deployment>-->
<!--<deployment>
- <wsrp-producer>
- <producer-id>bea</producer-id>
- <expiration-cache>120</expiration-cache>
+ <wsrp-producer id="bea" expiration-cache="120">
<endpoint-wsdl-url>http://wsrp.bea.com:7001/producer/producer?WSDL</endpoint-wsdl-url>
<registration-data>
<property>
@@ -86,9 +78,7 @@
</wsrp-producer>
</deployment>-->
<!--<deployment>
- <wsrp-producer>
- <producer-id>oracle</producer-id>
- <expiration-cache>120</expiration-cache>
+ <wsrp-producer id="oracle" expiration-cache="120">
<
endpoint-wsdl-url>http://portalstandards.oracle.com/portletapp/portlet...
<registration-data/>
</wsrp-producer>
Modified: trunk/wsrp/src/resources/tests/test-deployment-lib-jar/test-wsrp.xml
===================================================================
--- trunk/wsrp/src/resources/tests/test-deployment-lib-jar/test-wsrp.xml 2007-02-19
21:49:56 UTC (rev 6350)
+++ trunk/wsrp/src/resources/tests/test-deployment-lib-jar/test-wsrp.xml 2007-02-20
04:32:43 UTC (rev 6351)
@@ -23,8 +23,7 @@
<deployments>
<deployment>
- <wsrp-producer>
- <producer-id>endpoint1</producer-id>
+ <wsrp-producer id="inDB">
<endpoint-config>
<service-description-url>service-description-1</service-description-url>
<markup-url>markup-1</markup-url>
@@ -34,9 +33,18 @@
</wsrp-producer>
</deployment>
<deployment>
- <wsrp-producer>
- <producer-id>endpoint2</producer-id>
+ <wsrp-producer id="endpoint1">
<endpoint-config>
+
<service-description-url>service-description-1</service-description-url>
+ <markup-url>markup-1</markup-url>
+ <registration-url>registration-1</registration-url>
+
<portlet-management-url>portlet-management-1</portlet-management-url>
+ </endpoint-config>
+ </wsrp-producer>
+ </deployment>
+ <deployment>
+ <wsrp-producer id="endpoint2">
+ <endpoint-config>
<service-description-url>service-description-2</service-description-url>
<markup-url>markup-2</markup-url>
<registration-url>registration-2</registration-url>
@@ -45,9 +53,17 @@
</wsrp-producer>
</deployment>
<deployment>
- <wsrp-producer>
- <producer-id>producer1</producer-id>
- <expiration-cache>120</expiration-cache>
+ <wsrp-producer id="inDB2">
+ <endpoint-config>
+
<service-description-url>service-description-2</service-description-url>
+ <markup-url>markup-2</markup-url>
+ <registration-url>registration-2</registration-url>
+
<portlet-management-url>portlet-management-2</portlet-management-url>
+ </endpoint-config>
+ </wsrp-producer>
+ </deployment>
+ <deployment>
+ <wsrp-producer id="producer1" expiration-cache='120'>
<endpoint-wsdl-url>http://wsrp.bea.com:7001/producer/producer?WSDL</endpoint-wsdl-url>
<registration-data>
<consumer-name>JBoss Portal 2.4 Test</consumer-name>
@@ -65,17 +81,14 @@
</wsrp-producer>
</deployment>
<deployment>
- <wsrp-producer>
- <producer-id>producer2</producer-id>
+ <wsrp-producer id="producer2">
<endpoint-config>
<service-description-url>service-description-3</service-description-url>
<markup-url>markup-3</markup-url>
<registration-url>registration-3</registration-url>
<portlet-management-url>portlet-management-3</portlet-management-url>
</endpoint-config>
- <registration-data>
- <consumer-name>JBoss Portal 2.4 Test</consumer-name>
- </registration-data>
+ <registration-data/>
</wsrp-producer>
</deployment>
</deployments>
\ No newline at end of file