gatein SVN: r1733 - portal/trunk/docs/reference-guide/en/modules/configuration.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-02-16 06:02:56 -0500 (Tue, 16 Feb 2010)
New Revision: 1733
Modified:
portal/trunk/docs/reference-guide/en/modules/configuration/Database_Configuration.xml
Log:
Updated documentation on how to change the database
Modified: portal/trunk/docs/reference-guide/en/modules/configuration/Database_Configuration.xml
===================================================================
--- portal/trunk/docs/reference-guide/en/modules/configuration/Database_Configuration.xml 2010-02-16 09:57:13 UTC (rev 1732)
+++ portal/trunk/docs/reference-guide/en/modules/configuration/Database_Configuration.xml 2010-02-16 11:02:56 UTC (rev 1733)
@@ -1,182 +1,109 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "../../Reference_Guide.ent">
+%BOOK_ENTITIES;
]>
<section id="sect-Reference_Guide-Database_Configuration">
- <title>Database Configuration</title>
- <section id="sect-Reference_Guide-Database_Configuration-Overview">
- <title>Overview</title>
- <para>
- &PRODUCT; has two different database dependencies. One is the Hibernate service configuration, which depends on the the Hibernate and c3p0 projects. The other database dependency is Java content repository (JCR) service, which depends on the native JDBC API and it can integrate with any existing datasource implementation.
- </para>
- <para>
- When you change the database configuration for the first time, GateIn will automatically generate the proper schema (assuming that the database user has the appropriate permissions).
- </para>
- <para>
- GateIn assumes the default encoding for your database is <literal>latin1</literal> . You will need to change this parameter for your database in order to work properly.
- </para>
- </section>
-
- <section id="sect-Reference_Guide-Database_Configuration-DB_and_datasource_configuration">
- <title>DB and datasource configuration</title>
- <para>
- You can find the database configuration in the portal/WEB-INF/conf/database/database-configuration.xml file (located in your application server's web application directory).
- </para>
-
-<programlisting role="XML"><?xml version="1.0" encoding="ISO-8859-1"?>
-<configuration>
- [...]
- <component>
- <key>org.exoplatform.services.database.HibernateService</key>
- <jmx-name>database:type=HibernateService</jmx-name>
- <type>org.exoplatform.services.database.impl.HibernateServiceImpl</type>
- <init-params>
- <properties-param>
- <name>hibernate.properties</name>
- <description>Default Hibernate Service</description>
- <property name="hibernate.show_sql" value="false"/>
- <property name="hibernate.cglib.use_reflection_optimizer" value="true"/>
- <property name="hibernate.connection.url" value="jdbc:hsqldb:file:../temp/data/exodb"/>
- <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver"/>
- <property name="hibernate.connection.autocommit" value="true"/>
- <property name="hibernate.connection.username" value="sa"/>
- <property name="hibernate.connection.password" value=""/>
- <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
- <property name="hibernate.c3p0.min_size" value="5"/>
- <property name="hibernate.c3p0.max_size" value="20"/>
- <property name="hibernate.c3p0.timeout" value="1800"/>
- <property name="hibernate.c3p0.max_statements" value="50"/>
- </properties-param>
- </init-params>
- </component>
- <external-component-plugins>
- <target-component>org.exoplatform.services.naming.InitialContextInitializer</target-component>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcexo</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
- <property name="url" value="jdbc:hsqldb:file:../temp/data/exodb"/>
- <property name="username" value="sa"/>
- <property name="password" value=""/>
- </properties-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
- [...]
-</configuration>
+ <title>Database Configuration</title>
+
+ <section id="sect-Reference_Guide-Database_Configuration-Overview">
+ <title>Overview</title>
+
+ <para>&PRODUCT; has two different database dependencies. One is the
+ identity service configuration, which depends on the Hibernate. The other
+ database dependency is Java content repository (JCR) service, which
+ depends on the native JDBC API and it can integrate with any existing
+ datasource implementation.</para>
+
+ <para>When you change the database configuration for the first time,
+ GateIn will automatically generate the proper schema (assuming that the
+ database user has the appropriate permissions).</para>
+
+ <para>GateIn assumes the default encoding for your database is
+ <literal>latin1</literal> . You will need to change this parameter for
+ your database in order to work properly.</para>
+ </section>
+
+ <section id="sect-Reference_Guide-Database_Configuration-JCR_database_configuration">
+ <title>Configuring the database for JCR</title>
+
+ <para>To configure the databaseused by JCR you will need to edit the
+ file:<programlisting>gatein.ear/02portal.war/WEB-INF/conf/jcr/jcr-configuration.xml</programlisting></para>
+
+ <para>And edit the values of driverClassName, url, username and password
+ with the values for your JDBC connection (Please refer to your database
+ JDBC driver documentation).</para>
+
+ <programlisting role="XML"><properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
+ <property name="url" value="jdbc:hsqldb:file:${gatein.db.data.dir}/data/jdbcjcr${container.name.suffix}"/>
+ property name="username" value="sa"/>
+ <property name="password" value=""/>
+</properties-param>
</programlisting>
- <para>
- The first component configuration is for the Hibernate service. You can enter any additional properties in a <literal>hibernate.properties</literal> file, but &PRODUCT; will override <literal>hibernate.properties</literal> with values read in from this configuration file.
- </para>
- <para>
- The second component configuration is for the JCR datasource. The <literal>InitialContextInitializer</literal> component will load the factory class, use the factory object to create a datasource, and bind that datasource in the JNDI tree with the value of the "bind-name" parameter. If you want to change the bind-name, for example "<parameter>jdbcexo</parameter>" to "<parameter>myjdbc</parameter>", you also need to change JCR repository configuration in order that the service picks up the right datasource.
- </para>
- <para>
- Make sure you update the database connection properties and dialect for both of these component configurations.
- </para>
- </section>
-
- <section id="sect-Reference_Guide-Database_Configuration-JCR_database_configuration">
- <title>JCR database configuration</title>
- <para>
- There are two JCR configuration files that must be changed to support a different database. In both files, <emphasis>edit the dialect (and the data source name if necessary)</emphasis> .
- </para>
- <para>
- The first file is <filename>02portal.war:/WEB-INF/conf/jcr/jcr-configuration.xml</filename> :
- </para>
-
-<programlisting>[...]
- <component>
- <key>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</key>
- <type>org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl</type>
- <init-params>
- <value-param>
- <name>conf-path</name>
- <description>JCR configuration file</description>
- <value>war:/conf/jcr/repository-configuration.xml</value>
- </value-param>
- <properties-param>
- <name>working-conf</name>
- <description>working-conf</description>
- <property name="persisterClassName" value="org.exoplatform.services.jcr.impl.config.JDBCConfigurationPersister"/>
- <property name="sourceName" value="jdbcexo"/>
- <property name="dialect" value="hsqldb"/>
- </properties-param>
- </init-params>
- </component>
-[...]
-</programlisting>
- <para>
- The second file is <filename>02portal.war:/WEB-INF/conf/jcr/repository-configuration.xml</filename> :
- </para>
-
-<programlisting role="XML"> ...]
- <workspaces>
- <workspace name="system" auto-init-root-nodetype="nt:unstructured"
- auto-init-permissions="*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" >
- <!-- for system storage -->
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
- <properties>
- <property name="sourceName" value="jdbcexo"/>
- <property name="dialect" value="hsql"/>
- <!-- property name="db-type" value="mysql"/ -->
- <property name="multi-db" value="false"/>
- <property name="update-storage" value="true"/>
- <property name="max-buffer-size" value="204800"/>
- <property name="swap-directory" value="../temp/swap/system"/>
- </properties>
-[...]
- </workspace>
- <workspace name="collaboration" auto-init-root-nodetype="nt:unstructured"
- auto-init-permissions="any read;*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" >
- <!-- for system storage -->
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
- <properties>
- <property name="sourceName" value="jdbcexo"/>
- <property name="dialect" value="hsqldb"/>
- <property name="multi-db" value="false"/>
- <property name="update-storage" value="true"/>
- <property name="max-buffer-size" value="204800"/>
- <property name="swap-directory" value="../temp/swap/collaboration"/>
- </properties>
-[...]
- </workspace>
- <workspace name="backup" auto-init-root-nodetype="nt:unstructured"
- auto-init-permissions="any read;*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" >
- <!-- for system storage -->
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
- <properties>
- <property name="sourceName" value="jdbcexo"/>
- <property name="dialect" value="mysql"/>
- <!-- property name="db-type" value="mysql"/ -->
- <property name="multi-db" value="false"/>
- <property name="update-storage" value="true"/>
- <property name="max-buffer-size" value="204800"/>
- <property name="swap-directory" value="../temp/swap/backup"/>
- </properties>
- </workspace>
-[...]
- </workspaces>
-[...]
-</programlisting>
- </section>
-</section>
+ <para>In that case, the name of the database is
+ "jdbcjcr${container.name.suffix}", ${container.name.suffix} should be part
+ of the database name, as it is dynamically replaced by the name of the
+ portal extension (for instance gatein-sample-portal.ear defines
+ "sample-portal" as container name and the default portal defines "portal"
+ as container name). </para>
+ <para>In the case of HSQL the databases are created automatically, for any
+ other database you will need to create a database named jdbcjcr_portal
+ (and "jdbcjcr_sample-portal" if you kept gatein-sample-portal.ear in
+ $JBOSS_HOME/server/default/deploy. Note that some database wont accept '-'
+ in a database name and you will have to delete
+ $JBOSS_HOME/server/default/deploy/gatein-sample-portal.ear)</para>
+ <para>Make sure the user has rights to create tables on jdbcjcr_portal and
+ to update them as during the first startup they will be automatically
+ created.</para>
+
+ <para>Also add the JDBC driver into the classpath, for instance in
+ $JBOSS_HOME/server/default/lib (or $TOMCAT_HOME/lib if you are running on
+ Tomcat)</para>
+
+ <para>MySQL example:</para>
+
+ <para>Let's configure our JCR to store data in MySQL, let's pretend we
+ have a user named "gateinuser" with a password "gateinpassword". We would
+ create a database "mygateindb_portal" (Remember that _portal is required)
+ and assign him the rights to create tables.</para>
+
+ <para>Then we need to add the MySQL JDBC connector in the classpath and
+ finally edit gatein.ear/02portal.war/WEB-INF/conf/jcr/jcr-configuration
+ with:<programlisting><properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+ <property name="url" value="jdbc:mysql://localhost:3306/mygateindb${container.name.suffix}"/>
+ <property name="username" value="gateinuser"/>
+ <property name="password" value="gateinpassword"/>
+</properties-param></programlisting></para>
+ </section>
+
+ <section>
+ <title>Configuring the database for the default identity store</title>
+
+ <para>By default users are stored in database. To change the database to
+ store users, you will need to edit the file:</para>
+
+ <para><programlisting>gatein.ear/02portal.war/WEB-INF/conf/organization/idm-configuration.xml</programlisting>You
+ will find the same configuration as in
+ jcr-configuration.xml:<programlisting><properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
+ <property name="url" value="jdbc:hsqldb:file:${gatein.db.data.dir}/data/jdbcidm${container.name.suffix}"/>
+ property name="username" value="sa"/>
+ <property name="password" value=""/>
+</properties-param></programlisting></para>
+
+ <para>It is recommended to use a different database than the one used by
+ JCR.</para>
+ </section>
+</section>
14 years, 10 months
gatein SVN: r1731 - maven/packager/tags.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-02-16 04:57:04 -0500 (Tue, 16 Feb 2010)
New Revision: 1731
Added:
maven/packager/tags/1.0.0-Beta08/
Log:
[maven-scm] copy for tag 1.0.0-Beta08
Copied: maven/packager/tags/1.0.0-Beta08 (from rev 1730, maven/packager/trunk)
14 years, 10 months
gatein SVN: r1729 - maven/packager/trunk/src/main/javascript/eXo/server.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-02-16 04:55:57 -0500 (Tue, 16 Feb 2010)
New Revision: 1729
Modified:
maven/packager/trunk/src/main/javascript/eXo/server/JbossEar.js
Log:
Explode 02portal.war
Modified: maven/packager/trunk/src/main/javascript/eXo/server/JbossEar.js
===================================================================
--- maven/packager/trunk/src/main/javascript/eXo/server/JbossEar.js 2010-02-16 01:07:52 UTC (rev 1728)
+++ maven/packager/trunk/src/main/javascript/eXo/server/JbossEar.js 2010-02-16 09:55:57 UTC (rev 1729)
@@ -78,7 +78,7 @@
// product.removeDependency(new Project("quartz", "quartz", "jar",
// "1.5.0-RC2"));
- this.EXO_KERNEL_VER = "2.2.0-Beta05";
+ this.EXO_KERNEL_VER = "2.2.0-CR2";
product.addDependencies(new Project("org.jboss.mc-int", "jboss-mc-int-common", "jar", "2.2.0.Alpha2"));
product.addDependencies(new Project("org.jboss.mc-int", "jboss-mc-int-servlet", "jar", "2.2.0.Alpha2"));
product.addDependencies(new Project("org.exoplatform.kernel", "exo.kernel.mc-int", "jar", this.EXO_KERNEL_VER));
@@ -121,16 +121,18 @@
ServerUtil.createEarApplicationXmlForJboss(this.deployWebappDir, product);
ServerUtil.addClasspathForWar(this.deployLibDir);
- // Use jboss PrefixSorter deployer
+ // Use JBoss PrefixSorter deployer
// Explode and rename eXoResources.war
var eXoResourcesFileName = this.deployWebappDir + "/eXoResources.war";
var neweXoResourcesDirectoryName = this.deployWebappDir + "/01eXoResources.war";
eXo.core.IOUtil.unzip(eXoResourcesFileName, neweXoResourcesDirectoryName);
eXo.core.IOUtil.remove(eXoResourcesFileName);
- var portalFile = new java.io.File(this.deployWebappDir + "/" + product.portalwar);
- var newPortalFile = new java.io.File(this.deployWebappDir + "/02portal.war");
- portalFile.renameTo(newPortalFile);
+ // Explode and rename portal.war
+ var portalFileName = this.deployWebappDir + "/" + product.portalwar;
+ var newPortalDirectoryName = this.deployWebappDir + "/02portal.war";
+ eXo.core.IOUtil.unzip(portalFileName, newPortalDirectoryName);
+ eXo.core.IOUtil.remove(portalFileName);
product.portalwar = "02portal.war";
//Move all jars in /lib
14 years, 10 months
gatein SVN: r1728 - portal/trunk/packaging/module/src/main/javascript.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-02-15 20:07:52 -0500 (Mon, 15 Feb 2010)
New Revision: 1728
Modified:
portal/trunk/packaging/module/src/main/javascript/portal.packaging.module.js
Log:
- Renamed WSRP integration service to gatein.portal.component.wsrp instead of exo.portal.component.wsrp.
Got actually done in the previous commit, just fixing the packaging script here.
Modified: portal/trunk/packaging/module/src/main/javascript/portal.packaging.module.js
===================================================================
--- portal/trunk/packaging/module/src/main/javascript/portal.packaging.module.js 2010-02-16 01:05:42 UTC (rev 1727)
+++ portal/trunk/packaging/module/src/main/javascript/portal.packaging.module.js 2010-02-16 01:07:52 UTC (rev 1728)
@@ -78,7 +78,7 @@
addDependency(new Project("org.jboss", "jboss-common-core", "jar", "2.2.9.GA"));
- module.component.wsrp = new Project("org.exoplatform.portal", "exo.portal.component.wsrp", "jar", module.version)
+ module.component.wsrp = new Project("org.exoplatform.portal", "gatein.portal.component.wsrp", "jar", module.version)
.addDependency(new Project("org.gatein.wsrp", "wsrp-producer", "war", wsrpVersion))
.addDependency(new Project("org.gatein.wsrp", "wsrp-admin-gui", "war", wsrpVersion))
.addDependency(new Project("org.gatein.wsrp", "wsrp-producer-lib", "jar",wsrpVersion))
14 years, 10 months
gatein SVN: r1727 - components/wsrp/trunk/admin-gui/src/main/webapp/styles.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-02-15 20:05:42 -0500 (Mon, 15 Feb 2010)
New Revision: 1727
Modified:
components/wsrp/trunk/admin-gui/src/main/webapp/styles/style.css
Log:
- Fixed swatch style for inactive producers.
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/styles/style.css
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/styles/style.css 2010-02-16 01:04:32 UTC (rev 1726)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/styles/style.css 2010-02-16 01:05:42 UTC (rev 1727)
@@ -299,7 +299,7 @@
background: #dcf0d0;
}
-.wsrp-consumers-ui .registration-prop-table.inactive, .wsrp-consumers-ui span.inactive {
+.wsrp-consumers-ui .registration-prop-table.inactive {
border: 1px solid #EBD1B8;
}
14 years, 10 months
gatein SVN: r1726 - in portal/trunk: examples/extension/config/src/main/java/conf and 1 other directory.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-02-15 20:04:32 -0500 (Mon, 15 Feb 2010)
New Revision: 1726
Modified:
portal/trunk/component/wsrp/pom.xml
portal/trunk/examples/extension/config/src/main/java/conf/configuration.xml
Log:
- Disable WSRP in examples (though it doesn't seem to be working for some reason) :(
Modified: portal/trunk/component/wsrp/pom.xml
===================================================================
--- portal/trunk/component/wsrp/pom.xml 2010-02-16 01:02:53 UTC (rev 1725)
+++ portal/trunk/component/wsrp/pom.xml 2010-02-16 01:04:32 UTC (rev 1726)
@@ -29,7 +29,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
- <artifactId>exo.portal.component.wsrp</artifactId>
+ <artifactId>gatein.portal.component.wsrp</artifactId>
<packaging>jar</packaging>
<version>3.0.0-CR01-SNAPSHOT</version>
<name>GateIn Portal Component WSRP integration</name>
Modified: portal/trunk/examples/extension/config/src/main/java/conf/configuration.xml
===================================================================
--- portal/trunk/examples/extension/config/src/main/java/conf/configuration.xml 2010-02-16 01:02:53 UTC (rev 1725)
+++ portal/trunk/examples/extension/config/src/main/java/conf/configuration.xml 2010-02-16 01:04:32 UTC (rev 1726)
@@ -69,9 +69,10 @@
<value>
<string>web</string>
</value>
+ <!-- Do not start WSRP in extensions for now...
<value profiles="jboss">
<string>wsrp-producer</string>
- </value>
+ </value>-->
<value>
<string>sample-ext</string>
</value>
14 years, 10 months
gatein SVN: r1725 - portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-02-15 20:02:53 -0500 (Mon, 15 Feb 2010)
New Revision: 1725
Modified:
portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/ExoKernelIntegration.java
Log:
- Prevent multiple instantiation of the WSRP service. Only allow instantiation in the default portal context for now.
Modified: portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/ExoKernelIntegration.java
===================================================================
--- portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/ExoKernelIntegration.java 2010-02-15 23:39:56 UTC (rev 1724)
+++ portal/trunk/component/wsrp/src/main/java/org/gatein/portal/wsrp/ExoKernelIntegration.java 2010-02-16 01:02:53 UTC (rev 1725)
@@ -41,8 +41,6 @@
import org.gatein.registration.RegistrationManager;
import org.gatein.registration.RegistrationPersistenceManager;
import org.gatein.registration.impl.RegistrationManagerImpl;
-import org.gatein.registration.policies.DefaultRegistrationPolicy;
-import org.gatein.registration.policies.DefaultRegistrationPropertyValidator;
import org.gatein.wsrp.api.SessionEvent;
import org.gatein.wsrp.api.SessionEventBroadcaster;
import org.gatein.wsrp.api.SessionEventListener;
@@ -76,6 +74,7 @@
private ConsumerRegistry consumerRegistry;
private static final String REMOTE_INVOKERS_INVOKER_ID = "remote";
private ExoContainer container;
+ private final boolean bypass;
public ExoKernelIntegration(ExoContainerContext context, InitParams params, ConfigurationManager configurationManager,
org.exoplatform.portal.pc.ExoKernelIntegration pc) throws Exception
@@ -83,26 +82,40 @@
// IMPORTANT: even though PC ExoKernelIntegration is not used anywhere in the code, it's still needed for pico
// to properly make sure that this service is started after the PC one. Yes, Pico is crap. :/
- if (params != null)
+ // 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...
+ if ("portal".equals(context.getName()))
{
- producerConfigLocation = params.getValueParam(PRODUCER_CONFIG_LOCATION).getValue();
- consumersConfigLocation = params.getValueParam(CONSUMERS_CONFIG_LOCATION).getValue();
+ if (params != null)
+ {
+ producerConfigLocation = params.getValueParam(PRODUCER_CONFIG_LOCATION).getValue();
+ consumersConfigLocation = params.getValueParam(CONSUMERS_CONFIG_LOCATION).getValue();
+ }
+ else
+ {
+ throw new IllegalArgumentException("Improperly configured service: missing values for "
+ + PRODUCER_CONFIG_LOCATION + "and " + CONSUMERS_CONFIG_LOCATION);
+ }
+
+ configurationIS = configurationManager.getInputStream(CLASSPATH + producerConfigLocation);
+
+ container = context.getContainer();
+
+ bypass = false;
}
else
{
- throw new IllegalArgumentException("Improperly configured service: missing values for "
- + PRODUCER_CONFIG_LOCATION + "and " + CONSUMERS_CONFIG_LOCATION);
+ throw new IllegalStateException("The WSRP service can only be started in the default portal context.");
}
-
- configurationIS = configurationManager.getInputStream(CLASSPATH + producerConfigLocation);
-
- container = context.getContainer();
}
public void start()
{
- startProducer();
- startConsumers();
+ if (!bypass)
+ {
+ startProducer();
+ startConsumers();
+ }
}
private void startProducer()
@@ -133,12 +146,6 @@
RegistrationManager registrationManager = new RegistrationManagerImpl();
registrationManager.setPersistenceManager(registrationPersistenceManager);
- // todo: the multiple instantiation of WSRP service causes the registration policy to not be properly initialized
- // so we end up forcing its instantiation here.
- DefaultRegistrationPolicy registrationPolicy = new DefaultRegistrationPolicy();
- registrationPolicy.setValidator(new DefaultRegistrationPropertyValidator());
- registrationManager.setPolicy(registrationPolicy);
-
// retrieve container portlet invoker from eXo kernel
ContainerPortletInvoker containerPortletInvoker =
(ContainerPortletInvoker)container.getComponentInstanceOfType(ContainerPortletInvoker.class);
14 years, 10 months