Author: julien(a)jboss.com
Date: 2007-02-07 08:46:53 -0500 (Wed, 07 Feb 2007)
New Revision: 6182
Added:
trunk/wsrp/src/resources/tests/test-wsrp-producer-sar/producer-config.xml
Modified:
trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfigurationFactory.java
trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerConfigurationServiceImpl.java
trunk/wsrp/src/resources/tests/test-wsrp-producer-sar/META-INF/jboss-service.xml
Log:
fixing wsrp test execution
Modified:
trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfigurationFactory.java
===================================================================
---
trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfigurationFactory.java 2007-02-07
01:38:37 UTC (rev 6181)
+++
trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/ProducerConfigurationFactory.java 2007-02-07
13:46:53 UTC (rev 6182)
@@ -59,7 +59,8 @@
{
return new ProducerConfigurationImpl();
}
- throw new IllegalArgumentException("The processed file doesn't seem to
have the proper format");
+ throw new IllegalArgumentException("The processed file doesn't seem to
have the proper format, " +
+ "was expecting producer-configuration, instead got " + localName);
}
public Object newChild(ProducerConfigurationImpl producerConfiguration,
UnmarshallingContext nav, String nsURI, String localName, Attributes attrs)
Modified:
trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerConfigurationServiceImpl.java
===================================================================
---
trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerConfigurationServiceImpl.java 2007-02-07
01:38:37 UTC (rev 6181)
+++
trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/config/impl/ProducerConfigurationServiceImpl.java 2007-02-07
13:46:53 UTC (rev 6182)
@@ -86,6 +86,7 @@
throw new Exception("The config " + configURL + " does not
exist");
}
+ log.debug("About to parse producer configuration " + configURL);
Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
ObjectModelFactory factory = new ProducerConfigurationFactory();
configuration =
(ProducerConfiguration)unmarshaller.unmarshal(configURL.openStream(), factory, null);
Modified:
trunk/wsrp/src/resources/tests/test-wsrp-producer-sar/META-INF/jboss-service.xml
===================================================================
---
trunk/wsrp/src/resources/tests/test-wsrp-producer-sar/META-INF/jboss-service.xml 2007-02-07
01:38:37 UTC (rev 6181)
+++
trunk/wsrp/src/resources/tests/test-wsrp-producer-sar/META-INF/jboss-service.xml 2007-02-07
13:46:53 UTC (rev 6182)
@@ -164,17 +164,11 @@
proxy-type="attribute">portal:service=WebAppRegistry</depends>
</mbean>
- <!-- WSRP Producer implementation -->
- <mbean
- code="org.jboss.portal.wsrp.producer.WSRPProducerImpl"
- name="portal.wsrp:service=WSRPProducer"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <!-- Use DefaultRegistrationPolicy for registration -->
+ <mbean
code="org.jboss.portal.registration.policies.DefaultRegistrationPolicy"
+ name="portal.wsrp:service=RegistrationPolicy" xmbean-dd=""
+
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
- <depends optional-attribute-name="Invoker"
-
proxy-type="attribute">portal:service=PortletInvoker,type=Stateful</depends>
- <attribute name="RemotableByDefault">true</attribute>
- <depends optional-attribute-name="RegistrationManager"
proxy-type="attribute">portal.wsrp:service=RegistrationManager</depends>
</mbean>
<!-- Registration manager -->
@@ -186,13 +180,31 @@
<depends optional-attribute-name="PersistenceManager"
proxy-type="attribute">portal.wsrp:service=PersistenceManager</depends>
</mbean>
- <!-- Use DefaultRegistrationPolicy for registration -->
- <mbean
code="org.jboss.portal.registration.policies.DefaultRegistrationPolicy"
- name="portal.wsrp:service=RegistrationPolicy" xmbean-dd=""
+ <!-- Producer configuration service -->
+ <mbean
code="org.jboss.portal.wsrp.producer.config.impl.ProducerConfigurationServiceImpl"
+ name="portal.wsrp:service=ProducerConfiguration"
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
+ <!-- User producer-config.xml instead of conf/config.xml because the
configuration service will
+ retrieve the wrong configuration file. As the test-wsrp-producer.sar embeds
portal-server.sar
+ it is the config file of the portal-server.sar that will be retrieved -->
+ <attribute
name="ConfigLocation">producer-config.xml</attribute>
</mbean>
+ <!-- WSRP Producer implementation -->
+ <mbean
+ code="org.jboss.portal.wsrp.producer.WSRPProducerImpl"
+ name="portal.wsrp:service=WSRPProducer"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends optional-attribute-name="Invoker"
+
proxy-type="attribute">portal:service=PortletInvoker,type=Stateful</depends>
+ <attribute name="RemotableByDefault">true</attribute>
+ <depends optional-attribute-name="RegistrationManager"
proxy-type="attribute">portal.wsrp:service=RegistrationManager</depends>
+ <depends optional-attribute-name="ProducerConfigurationService"
proxy-type="attribute">portal.wsrp:service=ProducerConfiguration</depends>
+ </mbean>
+
<!-- Persistence manager for registrations -->
<mbean
code="org.jboss.portal.registration.impl.RegistrationPersistenceManagerImpl"
name="portal.wsrp:service=PersistenceManager" xmbean-dd=""
Added: trunk/wsrp/src/resources/tests/test-wsrp-producer-sar/producer-config.xml
===================================================================
--- trunk/wsrp/src/resources/tests/test-wsrp-producer-sar/producer-config.xml
(rev 0)
+++ trunk/wsrp/src/resources/tests/test-wsrp-producer-sar/producer-config.xml 2007-02-07
13:46:53 UTC (rev 6182)
@@ -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>
+