Author: chris.laprun(a)jboss.com
Date: 2007-05-31 02:02:24 -0400 (Thu, 31 May 2007)
New Revision: 7368
Added:
trunk/test/src/main/org/jboss/portal/test/framework/AbstractPortalTestCase.java
trunk/wsrp/src/main/org/jboss/portal/test/wsrp/consumer/ConsumerRegistryTestCase.java
trunk/wsrp/src/resources/tests/test-consumer-jar/
trunk/wsrp/src/resources/tests/test-consumer-jar/org/
trunk/wsrp/src/resources/tests/test-consumer-jar/org/jboss/
trunk/wsrp/src/resources/tests/test-consumer-jar/org/jboss/portal/
trunk/wsrp/src/resources/tests/test-consumer-jar/org/jboss/portal/test/
trunk/wsrp/src/resources/tests/test-consumer-jar/org/jboss/portal/test/wsrp/
trunk/wsrp/src/resources/tests/test-consumer-jar/org/jboss/portal/test/wsrp/consumer/
trunk/wsrp/src/resources/tests/test-consumer-jar/org/jboss/portal/test/wsrp/consumer/persistent-jboss-beans.xml
Modified:
trunk/core/src/main/org/jboss/portal/test/core/PortalBaseTestCase.java
trunk/core/src/main/org/jboss/portal/test/core/model/portal/AbstractPortalObjectContainerTestCase.java
trunk/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectContainerTestCase.java
trunk/wsrp/build.xml
Log:
- Extracted AbstractPortalTestCase from PortalBaseTestCase and put it in test module so
that classes from modules outside core can access it.
- First commit of ConsumerRegistryTestCase. Doesn't work properly: not calling setUp
for some reason resulting in not being able to initiate transactions...
- Added test-consumer-jar dir to host persistent-jboss-beans.xml for
ConsumerRegistryTestCase.
- Updated (and fixed) build.xml.
Modified: trunk/core/src/main/org/jboss/portal/test/core/PortalBaseTestCase.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/test/core/PortalBaseTestCase.java 2007-05-30
22:22:20 UTC (rev 7367)
+++ trunk/core/src/main/org/jboss/portal/test/core/PortalBaseTestCase.java 2007-05-31
06:02:24 UTC (rev 7368)
@@ -29,25 +29,14 @@
*/
package org.jboss.portal.test.core;
-import junit.framework.TestCase;
-import org.apache.log4j.Appender;
-import org.apache.log4j.ConsoleAppender;
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
-import org.apache.log4j.SimpleLayout;
import org.jboss.portal.security.RoleSecurityBinding;
import org.jboss.portal.security.SecurityConstants;
-import org.jboss.portal.test.framework.TestRuntimeContext;
-import org.jboss.portal.test.framework.embedded.DataSourceSupport;
-import org.jboss.portal.test.framework.embedded.HibernateSupport;
+import org.jboss.portal.test.framework.AbstractPortalTestCase;
import org.jboss.security.SecurityAssociation;
import org.jboss.security.SimpleGroup;
import org.jboss.security.SimplePrincipal;
-import org.jboss.security.jacc.DelegatingPolicy;
import javax.security.auth.Subject;
-import javax.security.jacc.PolicyContext;
-import java.security.Policy;
import java.security.Principal;
import java.security.acl.Group;
import java.util.HashSet;
@@ -60,51 +49,8 @@
* @version $Revision$
* @since Apr 7, 2006
*/
-public abstract class PortalBaseTestCase extends TestCase
+public abstract class PortalBaseTestCase extends AbstractPortalTestCase
{
-
- /** . */
- protected TestRuntimeContext runtimeContext;
-
- /** . */
- protected DataSourceSupport.Config dataSourceConfigParameter;
-
- /** . */
- protected HibernateSupport hibernate;
-
- static
- {
- Appender appender = new ConsoleAppender(new SimpleLayout());
- Logger.getRoot().addAppender(appender);
- Logger.getRoot().setLevel(Level.DEBUG);
- Logger.getLogger("org.hibernate").setLevel(Level.ERROR);
- }
-
- public HibernateSupport getHibernate()
- {
- return hibernate;
- }
-
- public DataSourceSupport.Config getDataSourceConfigParameter()
- {
- return dataSourceConfigParameter;
- }
-
- public void setDataSourceConfigParameter(DataSourceSupport.Config
dataSourceConfigParameter)
- {
- this.dataSourceConfigParameter = dataSourceConfigParameter;
- }
-
- public void setHibernate(HibernateSupport hibernate)
- {
- this.hibernate = hibernate;
- }
-
- public String getName()
- {
- return super.getName() + ",ds=" + dataSourceConfigParameter.getName();
- }
-
protected Set getDefaultSecurityConstraints()
{
Set constraints = new HashSet();
@@ -124,34 +70,6 @@
// Setup custom policy
}
- protected void setUp() throws Exception
- {
- runtimeContext = new TestRuntimeContext(getConfigLocation());
- runtimeContext.addBean("TestBean", this);
- runtimeContext.addBean("DataSourceConfig", dataSourceConfigParameter);
- runtimeContext.addBean("HibernateConfig",
HibernateSupport.getConfig(dataSourceConfigParameter.getName()));
- runtimeContext.start();
-
- //
- PolicyContext.setContextID("ctxid");
- }
-
- protected void tearDown() throws Exception
- {
- /**
- * Need to delete the context information set in the policy provider
- * for this test as it will affect the next test that is being run.
- * The alternative is that each test sets its own context id.
- */
- DelegatingPolicy p = (DelegatingPolicy)Policy.getPolicy();
- p.delete("ctxid");
- p.refresh();
- runtimeContext.stop();
- }
-
- /** Override to provide the location of the microcontainer xml */
- protected abstract String getConfigLocation();
-
protected void setUpSubjectForRole(String username, String[] roleNames) throws
Exception
{
Group roleGroup = new SimpleGroup("Roles");
Modified:
trunk/core/src/main/org/jboss/portal/test/core/model/portal/AbstractPortalObjectContainerTestCase.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/test/core/model/portal/AbstractPortalObjectContainerTestCase.java 2007-05-30
22:22:20 UTC (rev 7367)
+++
trunk/core/src/main/org/jboss/portal/test/core/model/portal/AbstractPortalObjectContainerTestCase.java 2007-05-31
06:02:24 UTC (rev 7368)
@@ -22,20 +22,15 @@
******************************************************************************/
package org.jboss.portal.test.core.model.portal;
-import org.jboss.portal.test.core.PortalBaseTestCase;
-import org.jboss.portal.test.framework.embedded.DataSourceSupport;
-import org.jboss.portal.core.model.portal.PortalObjectContainer;
-import org.jboss.portal.common.test.TestParametrization;
+import org.jboss.portal.common.junit.TransactionAssert;
import org.jboss.portal.common.test.TestParameterValue;
+import org.jboss.portal.common.test.TestParametrization;
import org.jboss.portal.common.test.junit.JUnitAdapter;
-import org.jboss.portal.common.test.junit.POJOJUnitTest;
-import org.jboss.portal.common.junit.TransactionAssert;
+import org.jboss.portal.core.model.portal.PortalObjectContainer;
import org.jboss.portal.security.spi.auth.PortalAuthorizationManager;
import org.jboss.portal.security.spi.auth.PortalAuthorizationManagerFactory;
-import junit.framework.TestSuite;
+import org.jboss.portal.test.core.PortalBaseTestCase;
-import java.net.URL;
-
/**
* Portal Object Container Test Cases based on the microcontainer architecture
*
@@ -52,18 +47,6 @@
/** . */
protected PortalAuthorizationManagerFactory authorizationManagerFactory;
- public static TestSuite suite(Class testClass) throws Exception
- {
- TestParametrization parametrization = JUnitAdapter.getParametrization();
- URL configsURL =
Thread.currentThread().getContextClassLoader().getResource("datasources.xml");
- parametrization.setParameterValue("DataSourceConfig",
DataSourceSupport.Config.fromXML2(configsURL));
- POJOJUnitTest abc = new POJOJUnitTest(testClass);
- JUnitAdapter adapter = new JUnitAdapter(abc, parametrization);
- TestSuite suite = new TestSuite();
- suite.addTest(adapter);
- return suite;
- }
-
public String getName()
{
TestParametrization parametrization = JUnitAdapter.getParametrization();
Modified:
trunk/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectContainerTestCase.java
===================================================================
---
trunk/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectContainerTestCase.java 2007-05-30
22:22:20 UTC (rev 7367)
+++
trunk/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectContainerTestCase.java 2007-05-31
06:02:24 UTC (rev 7368)
@@ -23,25 +23,26 @@
package org.jboss.portal.test.core.model.portal;
import junit.framework.TestSuite;
-import org.jboss.portal.core.model.portal.PortalContainer;
+import org.jboss.portal.Mode;
+import org.jboss.portal.WindowState;
+import org.jboss.portal.common.junit.TransactionAssert;
+import org.jboss.portal.common.util.CollectionBuilder;
+import org.jboss.portal.core.model.content.ContentType;
+import org.jboss.portal.core.model.content.spi.handler.ContentState;
import org.jboss.portal.core.model.portal.Page;
import org.jboss.portal.core.model.portal.Portal;
+import org.jboss.portal.core.model.portal.PortalContainer;
import org.jboss.portal.core.model.portal.PortalObject;
-import org.jboss.portal.core.model.portal.Window;
import org.jboss.portal.core.model.portal.PortalObjectId;
import org.jboss.portal.core.model.portal.PortalObjectPath;
-import org.jboss.portal.core.model.content.ContentType;
-import org.jboss.portal.core.model.content.spi.handler.ContentState;
+import org.jboss.portal.core.model.portal.Window;
import org.jboss.portal.test.core.model.content.SimpleContent;
-import org.jboss.portal.common.junit.TransactionAssert;
-import org.jboss.portal.common.util.CollectionBuilder;
-import org.jboss.portal.WindowState;
-import org.jboss.portal.Mode;
+import org.jboss.portal.test.framework.AbstractPortalTestCase;
+import java.util.ArrayList;
import java.util.Collections;
+import java.util.Comparator;
import java.util.List;
-import java.util.ArrayList;
-import java.util.Comparator;
/**
* Portal Object Container Test Cases based on the microcontainer architecture
@@ -55,7 +56,7 @@
public static TestSuite suite() throws Exception
{
- return
AbstractPortalObjectContainerTestCase.suite(PortalObjectContainerTestCase.class);
+ return AbstractPortalTestCase.suite(PortalObjectContainerTestCase.class);
}
/** todo same with a transaction wrapping the start method */
@@ -199,7 +200,7 @@
public void testPortalNode() throws Exception
{
-
+
}
public void testRecreate() throws Exception
@@ -229,8 +230,8 @@
}
/**
+ * @throws Exception
* @todo test contentState / get/set property
- * @throws Exception
*/
public void testCopy() throws Exception
{
Added: trunk/test/src/main/org/jboss/portal/test/framework/AbstractPortalTestCase.java
===================================================================
--- trunk/test/src/main/org/jboss/portal/test/framework/AbstractPortalTestCase.java
(rev 0)
+++
trunk/test/src/main/org/jboss/portal/test/framework/AbstractPortalTestCase.java 2007-05-31
06:02:24 UTC (rev 7368)
@@ -0,0 +1,133 @@
+/******************************************************************************
+ * 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.framework;
+
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+import org.apache.log4j.Appender;
+import org.apache.log4j.ConsoleAppender;
+import org.apache.log4j.Level;
+import org.apache.log4j.Logger;
+import org.apache.log4j.SimpleLayout;
+import org.jboss.portal.common.test.TestParametrization;
+import org.jboss.portal.common.test.junit.JUnitAdapter;
+import org.jboss.portal.common.test.junit.POJOJUnitTest;
+import org.jboss.portal.test.framework.embedded.DataSourceSupport;
+import org.jboss.portal.test.framework.embedded.HibernateSupport;
+import org.jboss.security.jacc.DelegatingPolicy;
+
+import javax.security.jacc.PolicyContext;
+import java.net.URL;
+import java.security.Policy;
+
+/**
+ * @author <a href="mailto:Anil.Saldhana@jboss.org">Anil
Saldhana</a>
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
+ * @version $Revision$
+ * @since 2.6
+ */
+public abstract class AbstractPortalTestCase extends TestCase
+{
+ static
+ {
+ Appender appender = new ConsoleAppender(new SimpleLayout());
+ Logger.getRoot().addAppender(appender);
+ Logger.getRoot().setLevel(Level.DEBUG);
+ Logger.getLogger("org.hibernate").setLevel(Level.ERROR);
+ }
+
+ /** . */
+ protected TestRuntimeContext runtimeContext;
+ /** . */
+ protected DataSourceSupport.Config dataSourceConfigParameter;
+ /** . */
+ protected HibernateSupport hibernate;
+
+ public HibernateSupport getHibernate()
+ {
+ return hibernate;
+ }
+
+ public DataSourceSupport.Config getDataSourceConfigParameter()
+ {
+ return dataSourceConfigParameter;
+ }
+
+ public void setDataSourceConfigParameter(DataSourceSupport.Config
dataSourceConfigParameter)
+ {
+ this.dataSourceConfigParameter = dataSourceConfigParameter;
+ }
+
+ public void setHibernate(HibernateSupport hibernate)
+ {
+ this.hibernate = hibernate;
+ }
+
+ public String getName()
+ {
+ return super.getName() + ",ds=" + dataSourceConfigParameter.getName();
+ }
+
+ protected void setUp() throws Exception
+ {
+ runtimeContext = new TestRuntimeContext(getConfigLocation());
+ runtimeContext.addBean("TestBean", this);
+ runtimeContext.addBean("DataSourceConfig", dataSourceConfigParameter);
+ runtimeContext.addBean("HibernateConfig",
HibernateSupport.getConfig(dataSourceConfigParameter.getName()));
+ runtimeContext.start();
+
+ //
+ PolicyContext.setContextID("ctxid");
+
+ System.out.println("AbstractPortalTestCase.setUp");
+ }
+
+ protected void tearDown() throws Exception
+ {
+ /**
+ * Need to delete the context information set in the policy provider
+ * for this test as it will affect the next test that is being run.
+ * The alternative is that each test sets its own context id.
+ */
+ DelegatingPolicy p = (DelegatingPolicy)Policy.getPolicy();
+ p.delete("ctxid");
+ p.refresh();
+ runtimeContext.stop();
+ }
+
+ /** Override to provide the location of the microcontainer xml */
+ protected abstract String getConfigLocation();
+
+ public static TestSuite suite(Class testClass) throws Exception
+ {
+ TestParametrization parametrization = JUnitAdapter.getParametrization();
+ URL configsURL =
Thread.currentThread().getContextClassLoader().getResource("datasources.xml");
+ parametrization.setParameterValue("DataSourceConfig",
DataSourceSupport.Config.fromXML2(configsURL));
+ POJOJUnitTest abc = new POJOJUnitTest(testClass);
+ JUnitAdapter adapter = new JUnitAdapter(abc, parametrization);
+ TestSuite suite = new TestSuite();
+ suite.addTest(adapter);
+ return suite;
+ }
+}
Property changes on:
trunk/test/src/main/org/jboss/portal/test/framework/AbstractPortalTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Modified: trunk/wsrp/build.xml
===================================================================
--- trunk/wsrp/build.xml 2007-05-30 22:22:20 UTC (rev 7367)
+++ trunk/wsrp/build.xml 2007-05-31 06:02:24 UTC (rev 7368)
@@ -434,10 +434,11 @@
<target name="package-consumer-test" description="Generates
Consumer-specific test artifacts" depends="compile">
<jar jarfile="${build.lib.test}/test-consumer-lib.jar">
- <fileset dir="${build.classes}/">
- <include name="org/jboss/portal/test/wsrp/framework/**"/>
- <include
name="org/jboss/portal/test/wsrp/consumer/*.class"/>
- </fileset>
+ <fileset dir="${build.resources.test}/test-consumer-jar"/>
+ <fileset dir="${build.classes}/">
+ <include name="org/jboss/portal/test/wsrp/framework/**"/>
+ <include
name="org/jboss/portal/test/wsrp/consumer/*.class"/>
+ </fileset>
</jar>
</target>
@@ -769,7 +770,7 @@
<test todir="${test.reports}"
name="org.jboss.portal.test.wsrp.consumer.RegistrationInfoTestCase"/>
<!--<zest todir="${test.reports}"
name="org.jboss.portal.test.wsrp.consumer.ConsumerRegistryTestCase"
outfile="TEST-ConsumerRegistryTestCase">
- <parameter name="ConfigLocation"
value="org/jboss/portal/test/wsrp/consumer/transient-jboss-beans.xml"/>
+ <parameter name="Config"
value="persistent-jboss-beans.xml"/>
</zest>-->
</x-test>
<x-sysproperty>
@@ -782,6 +783,8 @@
<x-classpath>
<fileset dir="${build.lib}"
includes="portal-wsrp-lib.jar"/>
<fileset dir="${build.lib.test}"
includes="test-consumer-lib.jar"/>
+ <pathelement location="${jboss.portal-test.root}/etc"/>
+ <!-- Needed to access datasources.xml -->
<path refid="jboss.microcontainer.classpath"/>
<path refid="library.classpath"/>
<path refid="dependentmodule.classpath"/>
Added:
trunk/wsrp/src/main/org/jboss/portal/test/wsrp/consumer/ConsumerRegistryTestCase.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/test/wsrp/consumer/ConsumerRegistryTestCase.java
(rev 0)
+++
trunk/wsrp/src/main/org/jboss/portal/test/wsrp/consumer/ConsumerRegistryTestCase.java 2007-05-31
06:02:24 UTC (rev 7368)
@@ -0,0 +1,132 @@
+/******************************************************************************
+ * 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.consumer;
+
+import junit.framework.TestSuite;
+import org.jboss.portal.common.junit.TransactionAssert;
+import org.jboss.portal.common.test.TestParameterValue;
+import org.jboss.portal.common.test.TestParametrization;
+import org.jboss.portal.common.test.junit.JUnitAdapter;
+import org.jboss.portal.test.framework.AbstractPortalTestCase;
+import org.jboss.portal.wsrp.WSRPConsumer;
+import org.jboss.portal.wsrp.consumer.ConsumerException;
+import org.jboss.portal.wsrp.consumer.ConsumerRegistry;
+import org.jboss.portal.wsrp.consumer.EndpointConfigurationInfo;
+import org.jboss.portal.wsrp.consumer.ProducerInfo;
+
+import java.util.Collection;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris
Laprun</a>
+ * @version $Revision$
+ * @since 2.6
+ */
+public class ConsumerRegistryTestCase extends AbstractPortalTestCase
+{
+ private ConsumerRegistry registry;
+
+ public static TestSuite suite() throws Exception
+ {
+ return AbstractPortalTestCase.suite(ConsumerRegistryTestCase.class);
+ }
+
+ protected String getConfigLocation()
+ {
+ TestParametrization parametrization = JUnitAdapter.getParametrization();
+ TestParameterValue paramValue =
parametrization.getParameterValue("Config");
+ return "org/jboss/portal/test/wsrp/consumer/" + paramValue.get();
+ }
+
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ System.out.println("ConsumerRegistryTestCase.setUp");
+ }
+
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+ }
+
+ public ConsumerRegistry getRegistry()
+ {
+ return registry;
+ }
+
+ public void setRegistry(ConsumerRegistry registry)
+ {
+ this.registry = registry;
+ }
+
+ public void testCRUD()
+ {
+ TransactionAssert.beginTransaction();
+ String id = "test";
+ WSRPConsumer consumer = registry.createConsumer(id, null);
+ assertNotNull(consumer);
+ assertEquals(id, consumer.getProducerId());
+ ProducerInfo info = consumer.getProducerInfo();
+ assertNotNull(info);
+ assertEquals(consumer.getProducerId(), info.getId());
+ EndpointConfigurationInfo endpoint = info.getEndpointConfigurationInfo();
+ assertNotNull(endpoint);
+ assertEquals(EndpointConfigurationInfo.UNSET,
endpoint.getServiceDescriptionURL());
+ assertEquals(EndpointConfigurationInfo.UNSET, endpoint.getMarkupURL());
+ assertNull(info.getRegistrationInfo());
+ TransactionAssert.commitTransaction();
+
+ TransactionAssert.beginTransaction();
+ try
+ {
+ registry.createConsumer(id, null);
+ fail("Shouldn't be possible to create a consumer with an existing
id");
+ }
+ catch (ConsumerException expected)
+ {
+ }
+ TransactionAssert.commitTransaction();
+
+ TransactionAssert.beginTransaction();
+ consumer = registry.getConsumer(id);
+ assertNotNull(consumer);
+ assertEquals(id, consumer.getProducerId());
+ info = consumer.getProducerInfo();
+ assertNotNull(info);
+ assertEquals(consumer.getProducerId(), info.getId());
+ endpoint = info.getEndpointConfigurationInfo();
+ assertNotNull(endpoint);
+ assertEquals(EndpointConfigurationInfo.UNSET,
endpoint.getServiceDescriptionURL());
+ assertEquals(EndpointConfigurationInfo.UNSET, endpoint.getMarkupURL());
+ assertNull(info.getRegistrationInfo());
+
+ assertNull(registry.getConsumer("inexistent"));
+ Collection consumers = registry.getConfiguredConsumers();
+ assertNotNull(consumers);
+ assertEquals(1, consumers.size());
+ assertTrue(consumers.contains(consumer));
+ TransactionAssert.commitTransaction();
+
+ }
+}
Property changes on:
trunk/wsrp/src/main/org/jboss/portal/test/wsrp/consumer/ConsumerRegistryTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added:
trunk/wsrp/src/resources/tests/test-consumer-jar/org/jboss/portal/test/wsrp/consumer/persistent-jboss-beans.xml
===================================================================
---
trunk/wsrp/src/resources/tests/test-consumer-jar/org/jboss/portal/test/wsrp/consumer/persistent-jboss-beans.xml
(rev 0)
+++
trunk/wsrp/src/resources/tests/test-consumer-jar/org/jboss/portal/test/wsrp/consumer/persistent-jboss-beans.xml 2007-05-31
06:02:24 UTC (rev 7368)
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<deployment
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd"
+ xmlns="urn:jboss:bean-deployer">
+
+ <bean name="DataSourceConfig"
class="org.jboss.portal.test.framework.embedded.DataSourceSupport$Config">
+ <constructor factoryMethod="getBean">
+ <factory bean="BeanFactory"/>
+ <parameter>DataSourceConfig</parameter>
+ </constructor>
+ </bean>
+
+ <bean name="HibernateConfig"
class="org.jboss.portal.test.framework.embedded.HibernateSupport$Config">
+ <constructor factoryMethod="getBean">
+ <factory bean="BeanFactory"/>
+ <parameter>HibernateConfig</parameter>
+ </constructor>
+ </bean>
+
+ <bean name="JNDISupport"
class="org.jboss.portal.test.framework.embedded.JNDISupport">
+ </bean>
+
+ <bean name="TransactionManagerSupport"
class="org.jboss.portal.test.framework.embedded.TransactionManagerSupport">
+ </bean>
+
+ <bean name="ConnectionManagerSupport"
class="org.jboss.portal.test.framework.embedded.ConnectionManagerSupport">
+ <property name="transactionManager"><inject
bean="TransactionManagerSupport"
property="transactionManager"/></property>
+ </bean>
+
+ <bean name="DataSourceSupport"
class="org.jboss.portal.test.framework.embedded.DataSourceSupport">
+ <property name="transactionManager"><inject
bean="TransactionManagerSupport"
property="transactionManager"/></property>
+ <property name="connectionManagerReference"><inject
bean="ConnectionManagerSupport"
+
property="connectionManagerReference"/></property>
+ <property name="config"><inject
bean="DataSourceConfig"/></property>
+ </bean>
+
+ <bean name="HibernateSupport"
class="org.jboss.portal.test.framework.embedded.HibernateSupport">
+ <property name="config"><inject
bean="HibernateConfig"/></property>
+ <property name="mappings">
+ <list elementClass="java.lang.String">
+ <value>conf/consumer/hibernate/domain.hbm.xml</value>
+ </list>
+ </property>
+ <property name="jNDIName">java:/SessionFactory</property>
+ </bean>
+
+ <bean name="FederatingPortletInvoker"
+
class="org.jboss.portal.portlet.federation.impl.FederatingPortletInvokerService"/>
+ <bean name="PortalEventListenerRegistry"
class="org.jboss.portal.core.event.PortalEventListenerRegistryImpl"/>
+
+ <bean name="ConsumerRegistry"
class="org.jboss.portal.wsrp.consumer.ConsumerRegistryService">
+ <property
name="sessionFactoryJNDIName">java:/SessionFactory</property>
+ <property name="federatingPortletInvoker">
+ <inject bean="FederatingPortletInvoker"
property="federatingPortletInvoker"/>
+ </property>
+ <property name="portalEventListenerRegistry">
+ <inject bean="PortalEventListenerRegistry"
property="portalEventListenerRegistry"/>
+ </property>
+ </bean>
+
+ <bean name="TestBean"
class="org.jboss.portal.test.wsrp.consumer.ConsumerRegistryTestCase">
+ <constructor factoryMethod="getBean">
+ <factory bean="BeanFactory"/>
+ <parameter>TestBean</parameter>
+ </constructor>
+ <property name="hibernate"><inject
bean="HibernateSupport"/></property>
+ <property name="registry"><inject
bean="ConsumerRegistry"/></property>
+ </bean>
+</deployment>