Author: chris.laprun(a)jboss.com
Date: 2009-07-23 12:05:57 -0400 (Thu, 23 Jul 2009)
New Revision: 13598
Added:
modules/wsrp/trunk/service/src/main/resources/conf/producer/hibernate/
modules/wsrp/trunk/service/src/main/resources/conf/producer/hibernate/domain.hbm.xml
modules/wsrp/trunk/service/src/main/resources/conf/producer/hibernate/ehcache.xml
modules/wsrp/trunk/service/src/main/resources/conf/producer/hibernate/hibernate.cfg.xml
Removed:
modules/wsrp/trunk/service/src/main/resources/conf/hibernate/consumer/
Modified:
modules/wsrp/trunk/core/src/main/java/org/jboss/portal/wsrp/WSRPConstants.java
modules/wsrp/trunk/service/pom.xml
Log:
- JBPORTAL-2186:
+ Forgot to add conf directory, including producer and hibernate configuration.
+ Changed final name of service to wsrp-producer.
+ Use proper WSRP producer object name in WSRPConstants.
+ Removed useless consumer configuration.
Modified: modules/wsrp/trunk/core/src/main/java/org/jboss/portal/wsrp/WSRPConstants.java
===================================================================
---
modules/wsrp/trunk/core/src/main/java/org/jboss/portal/wsrp/WSRPConstants.java 2009-07-23
13:14:28 UTC (rev 13597)
+++
modules/wsrp/trunk/core/src/main/java/org/jboss/portal/wsrp/WSRPConstants.java 2009-07-23
16:05:57 UTC (rev 13598)
@@ -42,7 +42,7 @@
/** JMX object name for the Portal web app registry */
public static final String WEB_APP_REGISTRY_OBJECT_NAME =
"portal:service=WebAppRegistry";
/** JMX object name for the WSRP Producer */
- public static final String WSRP_PRODUCER_OBJECT_NAME =
"portal.wsrp:service=WSRPProducer";
+ public static final String WSRP_PRODUCER_OBJECT_NAME =
"portletcontainer.wsrp:service=WSRPProducer";
// Window State Names
***********************************************************************************************
Modified: modules/wsrp/trunk/service/pom.xml
===================================================================
--- modules/wsrp/trunk/service/pom.xml 2009-07-23 13:14:28 UTC (rev 13597)
+++ modules/wsrp/trunk/service/pom.xml 2009-07-23 16:05:57 UTC (rev 13598)
@@ -35,7 +35,7 @@
<name>JBoss Portal WSRP Service</name>
<build>
- <finalName>portal-wsrp</finalName>
+ <finalName>wsrp-producer</finalName>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
Added:
modules/wsrp/trunk/service/src/main/resources/conf/producer/hibernate/domain.hbm.xml
===================================================================
--- modules/wsrp/trunk/service/src/main/resources/conf/producer/hibernate/domain.hbm.xml
(rev 0)
+++
modules/wsrp/trunk/service/src/main/resources/conf/producer/hibernate/domain.hbm.xml 2009-07-23
16:05:57 UTC (rev 13598)
@@ -0,0 +1,279 @@
+<?xml version="1.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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE hibernate-mapping PUBLIC
+ "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class
+ name="org.jboss.portal.wsrp.state.PersistentPortletState"
+ table="JBP_PORTLET_STATE">
+ <!--<cache usage="@portal.hibernate.cache.usage(a)"/>-->
+ <cache usage="transactional"/>
+ <id
+ name="key"
+ column="PK"
+ access="field">
+ <generator class="native">
+ <param name="sequence">portlet_seq</param>
+ </generator>
+ </id>
+ <property
+ name="portletId"
+ column="PORTLET_ID"
+ not-null="true"
+ unique="false"/>
+ <many-to-one
+ name="relatedRegistration"
+ column="REGISTRATION_ID"
+ class="org.jboss.portal.wsrp.state.PersistentRegistration"
+ not-null="false"/>
+ <property
+ name="creationTime"
+ column="REGISTRATION_TIME"
+ not-null="false"
+ unique="false"/>
+ <property
+ name="terminationTime"
+ column="TERMINATION_TIME"
+ not-null="false"
+ unique="false"/>
+ <map
+ name="entries"
+ sort="unsorted"
+ inverse="false"
+ cascade="all-delete-orphan"
+ fetch="join">
+ <!--<cache usage="@portal.hibernate.cache.usage(a)"/>-->
+ <cache usage="transactional"/>
+ <key column="ENTRY_KEY"/>
+ <index
+ column="NAME"
+ type="java.lang.String"/>
+ <one-to-many
class="org.jboss.portal.wsrp.state.PersistentPortletStateEntry"/>
+ </map>
+ <set
+ name="children"
+ inverse="true"
+ cascade="save-update"
+ fetch="select"
+ lazy="extra">
+ <!--<cache usage="@portal.hibernate.cache.usage(a)"/>-->
+ <cache usage="transactional"/>
+ <key column="PARENT_PK"/>
+ <one-to-many
class="org.jboss.portal.wsrp.state.PersistentPortletState"/>
+ </set>
+ <many-to-one
+ name="parent"
+ column="PARENT_PK"
+ class="org.jboss.portal.wsrp.state.PersistentPortletState"
+ cascade="none"
+ fetch="select"/>
+ </class>
+
+ <class
+ name="org.jboss.portal.wsrp.state.PersistentPortletStateEntry"
+ table="JBP_PORTLET_STATE_ENTRY">
+ <!--<cache usage="@portal.hibernate.cache.usage(a)"/>-->
+ <cache usage="transactional"/>
+ <id
+ name="key"
+ column="PK"
+ type="java.lang.Long">
+ <generator class="native">
+ <param name="sequence">portlet_seq</param>
+ </generator>
+ </id>
+ <array
+ name="strings"
+ table="JBP_PORTLET_STATE_ENTRY_VALUE"
+ cascade="all"
+ fetch="join">
+ <!--<cache usage="@portal.hibernate.cache.usage(a)"/>-->
+ <cache usage="transactional"/>
+ <key column="PK"/>
+ <index column="IDX"/>
+ <element
+ column="jbp_value"
+ type="java.lang.String"
+ not-null="false"
+ unique="false"/>
+ </array>
+ <property
+ name="name"
+ column="NAME"
+ type="java.lang.String"
+ update="false"
+ insert="true"
+ not-null="false"/>
+ <property
+ name="type"
+ column="TYPE"
+ type="int"
+ not-null="true"
+ unique="false"/>
+ <property
+ name="readOnly"
+ column="READ_ONLY"
+ type="boolean"
+ not-null="true"
+ unique="false"/>
+ </class>
+
+ <class
+ name="org.jboss.portal.wsrp.state.PersistentConsumerGroup"
+ table="JBP_PORTLET_GROUP">
+ <!--<cache usage="@portal.hibernate.cache.usage(a)"/>-->
+ <cache usage="transactional"/>
+ <id
+ name="key"
+ column="PK"
+ type="java.lang.Long">
+ <generator class="native">
+ <param name="sequence">portlet_seq</param>
+ </generator>
+ </id>
+ <property
+ name="persistentName"
+ column="ID"
+ type="java.lang.String"
+ not-null="true"
+ unique="true"/>
+ <property
+ name="persistentStatus"
+ column="STATUS"
+ type="org.jboss.portal.wsrp.state.RegistrationStatusUserType"/>
+ <map
+ name="relatedConsumers"
+ inverse="true">
+ <!--<cache usage="@portal.hibernate.cache.usage(a)"/>-->
+ <cache usage="transactional"/>
+ <key column="GROUP_PK"/>
+ <map-key
+ type="string"
+ column="ID"/>
+ <one-to-many
class="org.jboss.portal.wsrp.state.PersistentConsumer"/>
+ </map>
+ </class>
+ <class
+ name="org.jboss.portal.wsrp.state.PersistentConsumer"
+ table="JBP_PORTLET_CONSUMER">
+ <!--<cache usage="@portal.hibernate.cache.usage(a)"/>-->
+ <cache usage="transactional"/>
+ <id
+ name="key"
+ column="PK"
+ type="java.lang.Long">
+ <generator class="native">
+ <param name="sequence">portlet_seq</param>
+ </generator>
+ </id>
+ <property
+ name="persistentId"
+ column="ID"
+ type="java.lang.String"
+ not-null="true"
+ unique="true"/>
+ <property
+ name="persistentName"
+ column="NAME"
+ type="java.lang.String"/>
+ <property
+ name="persistentAgent"
+ column="AGENT"
+ type="java.lang.String"/>
+ <property
+ name="persistentStatus"
+ column="STATUS"
+ type="org.jboss.portal.wsrp.state.RegistrationStatusUserType"/>
+ <many-to-one
+ name="relatedGroup"
+ column="GROUP_PK"
+ class="org.jboss.portal.wsrp.state.PersistentConsumerGroup"/>
+ <set
+ name="relatedRegistrations"
+ inverse="true">
+ <!--<cache usage="@portal.hibernate.cache.usage(a)"/>-->
+ <cache usage="transactional"/>
+ <key column="CONSUMER_PK"/>
+ <one-to-many
class="org.jboss.portal.wsrp.state.PersistentRegistration"/>
+ </set>
+ </class>
+ <class
+ name="org.jboss.portal.wsrp.state.PersistentRegistration"
+ table="JBP_PORTLET_REG">
+ <!--<cache usage="@portal.hibernate.cache.usage(a)"/>-->
+ <cache usage="transactional"/>
+ <id
+ name="key"
+ column="PK"
+ type="java.lang.Long">
+ <generator class="native">
+ <param name="sequence">portlet_seq</param>
+ </generator>
+ </id>
+ <map
+ name="persistentProperties"
+ table="JBP_PORTLET_REG_PROPERTIES"
+ sort="unsorted"
+ inverse="false"
+ cascade="all-delete-orphan"
+ fetch="join">
+ <!--<cache usage="@portal.hibernate.cache.usage(a)"/>-->
+ <cache usage="transactional"/>
+ <key column="REGISTRATION_PK"/>
+ <map-key
+ type="org.jboss.portal.jems.hibernate.QNameUserType"
+ column="QNAME"/>
+ <element
+ type="string"
+ column="VALUE"/>
+ </map>
+ <property
+ name="persistentHandle"
+ column="HANDLE"
+ type="java.lang.String"/>
+ <property
+ name="persistentStatus"
+ column="STATUS"
+ type="org.jboss.portal.wsrp.state.RegistrationStatusUserType"/>
+ <many-to-one
+ name="relatedConsumer"
+ column="CONSUMER_PK"
+ class="org.jboss.portal.wsrp.state.PersistentConsumer"
+ not-null="true"
+ update="false"/>
+ <set
+ name="relatedPortletStates"
+ inverse="true"
+ cascade="save-update"
+ fetch="select"
+ lazy="extra">
+ <!--<cache usage="@portal.hibernate.cache.usage(a)"/>-->
+ <cache usage="transactional"/>
+ <key column="REGISTRATION_ID"/>
+ <one-to-many
class="org.jboss.portal.wsrp.state.PersistentPortletState"/>
+ </set>
+ </class>
+</hibernate-mapping>
Added: modules/wsrp/trunk/service/src/main/resources/conf/producer/hibernate/ehcache.xml
===================================================================
--- modules/wsrp/trunk/service/src/main/resources/conf/producer/hibernate/ehcache.xml
(rev 0)
+++
modules/wsrp/trunk/service/src/main/resources/conf/producer/hibernate/ehcache.xml 2009-07-23
16:05:57 UTC (rev 13598)
@@ -0,0 +1,61 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<ehcache>
+
+ <!-- Sets the path to the directory where cache .data files are created.
+
+If the path is a Java System Property it is replaced by
+its value in the running VM.
+
+The following properties are translated:
+user.home - User's home directory
+user.dir - User's current working directory
+java.io.tmpdir - Default temp file path -->
+ <diskStore path="java.io.tmpdir/portlet"/>
+
+
+ <!--Default Cache configuration. These will applied to caches programmatically
created through
+ the CacheManager.
+
+ The following attributes are required for defaultCache:
+
+ maxInMemory - Sets the maximum number of objects that will be created in memory
+ eternal - Sets whether elements are eternal. If eternal, timeouts are
ignored and the element
+ is never expired.
+ timeToIdleSeconds - Sets the time to idle for an element before it expires. Is only
used
+ if the element is not eternal. Idle time is now - last accessed
time
+ timeToLiveSeconds - Sets the time to live for an element before it expires. Is only
used
+ if the element is not eternal. TTL is now - creation time
+ overflowToDisk - Sets whether elements can overflow to disk when the in-memory
cache
+ has reached the maxInMemory limit.
+
+ -->
+ <defaultCache
+ maxElementsInMemory="10000"
+ eternal="false"
+ timeToIdleSeconds="1800"
+ timeToLiveSeconds="1800"
+ overflowToDisk="false"
+ />
+</ehcache>
Property changes on:
modules/wsrp/trunk/service/src/main/resources/conf/producer/hibernate/ehcache.xml
___________________________________________________________________
Name: svn:executable
+ *
Added:
modules/wsrp/trunk/service/src/main/resources/conf/producer/hibernate/hibernate.cfg.xml
===================================================================
---
modules/wsrp/trunk/service/src/main/resources/conf/producer/hibernate/hibernate.cfg.xml
(rev 0)
+++
modules/wsrp/trunk/service/src/main/resources/conf/producer/hibernate/hibernate.cfg.xml 2009-07-23
16:05:57 UTC (rev 13598)
@@ -0,0 +1,63 @@
+<?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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+<hibernate-configuration>
+ <session-factory>
+ <!--<property
name="connection.datasource">java:@portal.datasource.name@</property>-->
+ <property
name="connection.datasource">java:WSRPProducerDS</property>
+ <!--<property
name="show_sql">@portal.sql.show(a)</property>-->
+ <property
name="cache.use_second_level_cache">true</property>
+ <property name="cache.use_query_cache">false</property>
+
+ <!--
+ | Uncomment in clustered mode : use transactional replicated cache
+ @portal.single.xml.close@
+ <property
name="cache.provider_class">org.jboss.hibernate.jbc.cacheprovider.JmxBoundTreeCacheProvider</property>
+ <property
name="treecache.mbean.object_name">portal:service=TreeCache,type=hibernate</property>
+ @portal.single.xml.open@
+ -->
+
+ <!--
+ | Comment in clustered mode
+ @portal.clustered.xml.close@
+ <property
name="cache.provider_configuration_file_resource_path">conf/hibernate/portlet/ehcache.xml</property>
+ <property
name="cache.provider_class">org.hibernate.cache.EhCacheProvider</property>
+ @portal.clustered.xml.open@
+ -->
+
+ <property
name="cache.provider_configuration_file_resource_path">conf/producer/hibernate/ehcache.xml</property>
+ <property
name="cache.provider_class">org.hibernate.cache.EhCacheProvider</property>
+
+ <!-- Force the dialect instead of using autodetection -->
+ <!--
+ <property
name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
+ -->
+
+ <!-- Mapping files -->
+ <mapping resource="conf/producer/hibernate/domain.hbm.xml"/>
+ </session-factory>
+</hibernate-configuration>
\ No newline at end of file