portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwat...@apache.org
Subject svn commit: r747457 - in /portals/jetspeed-2/portal/branches/JPA_BRANCH: applications/jetspeed/src/main/webapp/WEB-INF/ components/jetspeed-portal/src/main/java/org/apache/jetspeed/pipeline/valve/ components/jetspeed-portal/src/main/java/org/apache/jet...
Date Tue, 24 Feb 2009 17:43:29 GMT
Author: rwatler
Date: Tue Feb 24 17:43:28 2009
New Revision: 747457

URL: http://svn.apache.org/viewvc?rev=747457&view=rev
Log:
JPA/JTA Tomcat Portal Integration
-----------------------------------------
- commented out configuration modifications required to run portal using JPA in tomcat
- fixes to JPA implementation of registry
- addition of valves in portal pipelines to start and end conversational transactions for
JPA manager components


Added:
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/pipeline/valve/JPAConversationalTxnValve.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/pipeline/valve/impl/JPAConversationalTxnEndValveImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/pipeline/valve/impl/JPAConversationalTxnStartValveImpl.java
Modified:
    portals/jetspeed-2/portal/branches/JPA_BRANCH/applications/jetspeed/src/main/webapp/WEB-INF/jboss-web.xml
    portals/jetspeed-2/portal/branches/JPA_BRANCH/applications/jetspeed/src/main/webapp/WEB-INF/web.xml
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletentity/jpa/PortletEntityAccessComponentImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/jpa/PortletPreferencesProviderImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/descriptor/JetspeedDescriptorServiceImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/jpa/PortletApplicationDefinitionImpl.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/CustomPortletMode.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/CustomWindowState.java
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-portal-resources/src/main/resources/assembly/pipelines.xml
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-portal-resources/src/main/resources/conf/jetspeed/jetspeed.properties
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-portal-resources/src/main/resources/conf/jetspeed/spring-filter.properties
    portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-portal-resources/src/main/resources/conf/tomcat/context.xml

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/applications/jetspeed/src/main/webapp/WEB-INF/jboss-web.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/applications/jetspeed/src/main/webapp/WEB-INF/jboss-web.xml?rev=747457&r1=747456&r2=747457&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/applications/jetspeed/src/main/webapp/WEB-INF/jboss-web.xml
(original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/applications/jetspeed/src/main/webapp/WEB-INF/jboss-web.xml
Tue Feb 24 17:43:28 2009
@@ -27,6 +27,16 @@
     <res-type>javax.sql.DataSource</res-type>
     <jndi-name>java:/JetspeedDS</jndi-name>
   </resource-ref>
+
+  <!-- JPA JNDI XA DB Resource -->
+  <!--
+  <resource-ref>
+      <res-ref-name>jdbc/jetspeed-xa</res-ref-name>
+      <res-type>javax.sql.DataSource</res-type>
+      <jndi-name>java:/JetspeedXADS</jndi-name>
+  </resource-ref>
+  -->
+  
 </jboss-web>
 
 

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/applications/jetspeed/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/applications/jetspeed/src/main/webapp/WEB-INF/web.xml?rev=747457&r1=747456&r2=747457&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/applications/jetspeed/src/main/webapp/WEB-INF/web.xml
(original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/applications/jetspeed/src/main/webapp/WEB-INF/web.xml
Tue Feb 24 17:43:28 2009
@@ -267,6 +267,16 @@
       <res-type>javax.sql.DataSource</res-type>
       <res-auth>Container</res-auth>
   </resource-ref>
+
+  <!-- JPA JNDI XA DB Resource -->
+  <!--
+  <resource-ref>
+      <description>JPA XA DB Connection</description>
+      <res-ref-name>jdbc/jetspeed-xa</res-ref-name>
+      <res-type>javax.sql.DataSource</res-type>
+      <res-auth>Container</res-auth>
+  </resource-ref>
+  -->
   
   <!-- JNDI CommonJ WorkManager resource -->
   <!--

Added: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/pipeline/valve/JPAConversationalTxnValve.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/pipeline/valve/JPAConversationalTxnValve.java?rev=747457&view=auto
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/pipeline/valve/JPAConversationalTxnValve.java
(added)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/pipeline/valve/JPAConversationalTxnValve.java
Tue Feb 24 17:43:28 2009
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.pipeline.valve;
+
+/**
+ * JPAConversationalTxnValve
+ * 
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id:$
+ */
+public interface JPAConversationalTxnValve extends Valve
+{
+    public static final String JPA_CONVERSATIONAL_TXN_CONTEXTS_ATTR_KEY = JPAConversationalTxnValve.class.getName()+".contexts";
+}

Added: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/pipeline/valve/impl/JPAConversationalTxnEndValveImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/pipeline/valve/impl/JPAConversationalTxnEndValveImpl.java?rev=747457&view=auto
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/pipeline/valve/impl/JPAConversationalTxnEndValveImpl.java
(added)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/pipeline/valve/impl/JPAConversationalTxnEndValveImpl.java
Tue Feb 24 17:43:28 2009
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.pipeline.valve.impl;
+
+import java.util.Map;
+
+import org.apache.jetspeed.Jetspeed;
+import org.apache.jetspeed.pipeline.PipelineException;
+import org.apache.jetspeed.pipeline.valve.AbstractValve;
+import org.apache.jetspeed.pipeline.valve.JPAConversationalTxnValve;
+import org.apache.jetspeed.pipeline.valve.ValveContext;
+import org.apache.jetspeed.request.RequestContext;
+
+/**
+ * JPAConversationalTxnEndValveImpl
+ * 
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id:$
+ */
+public class JPAConversationalTxnEndValveImpl extends AbstractValve implements JPAConversationalTxnValve
+{
+    /**
+     * Default constructor used to create valve to destroy
+     * conversational transaction context beans.
+     */
+    public JPAConversationalTxnEndValveImpl()
+    {
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.pipeline.valve.AbstractValve#invoke(org.apache.jetspeed.request.RequestContext,
org.apache.jetspeed.pipeline.valve.ValveContext)
+     */
+    @SuppressWarnings("unchecked")
+    public void invoke(RequestContext request, ValveContext context) throws PipelineException
+    {
+        // get contexts from request and destroy
+        Map<String,Object> contexts = (Map<String,Object>)request.getAttribute(JPA_CONVERSATIONAL_TXN_CONTEXTS_ATTR_KEY);
+        if ((contexts != null) && !contexts.isEmpty())
+        {
+            for (Map.Entry<String,Object> contextsEntry : contexts.entrySet())
+            {
+                Jetspeed.getComponentManager().destroyPrototypeComponent(contextsEntry.getKey(),
contextsEntry.getValue());
+            }
+            request.setAttribute(JPA_CONVERSATIONAL_TXN_CONTEXTS_ATTR_KEY, null);
+        }
+        
+        // continue pipeline
+        context.invokeNext(request);
+    }
+}

Added: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/pipeline/valve/impl/JPAConversationalTxnStartValveImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/pipeline/valve/impl/JPAConversationalTxnStartValveImpl.java?rev=747457&view=auto
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/pipeline/valve/impl/JPAConversationalTxnStartValveImpl.java
(added)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-portal/src/main/java/org/apache/jetspeed/pipeline/valve/impl/JPAConversationalTxnStartValveImpl.java
Tue Feb 24 17:43:28 2009
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.pipeline.valve.impl;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.jetspeed.Jetspeed;
+import org.apache.jetspeed.pipeline.PipelineException;
+import org.apache.jetspeed.pipeline.valve.AbstractValve;
+import org.apache.jetspeed.pipeline.valve.JPAConversationalTxnValve;
+import org.apache.jetspeed.pipeline.valve.ValveContext;
+import org.apache.jetspeed.request.RequestContext;
+
+/**
+ * JPAConversationalTxnStartValveImpl
+ * 
+ * @author <a href="mailto:rwatler@apache.org">Randy Watler</a>
+ * @version $Id:$
+ */
+public class JPAConversationalTxnStartValveImpl extends AbstractValve implements JPAConversationalTxnValve
+{
+    private List<String> contextBeanNames;
+    
+    /**
+     * Default constructor used for place holder in pipelines not
+     * requiring conversational transaction manager contexts.
+     */
+    public JPAConversationalTxnStartValveImpl()
+    {
+    }
+    
+    /**
+     * Construct with list of conversational transaction manager context
+     * beans to create.
+     * 
+     * @param contextBeanNames list of context bean names.
+     */
+    public JPAConversationalTxnStartValveImpl(List<String> contextBeanNames)
+    {
+        this.contextBeanNames = contextBeanNames;
+    }
+    
+    /* (non-Javadoc)
+     * @see org.apache.jetspeed.pipeline.valve.AbstractValve#invoke(org.apache.jetspeed.request.RequestContext,
org.apache.jetspeed.pipeline.valve.ValveContext)
+     */
+    @SuppressWarnings("unchecked")
+    public void invoke(RequestContext request, ValveContext context) throws PipelineException
+    {
+        // create contexts and save in request
+        if ((contextBeanNames != null) && !contextBeanNames.isEmpty())
+        {
+            Map<String,Object> contexts = (Map<String,Object>)request.getAttribute(JPA_CONVERSATIONAL_TXN_CONTEXTS_ATTR_KEY);
+            if (contexts == null)
+            {
+                contexts = new HashMap<String,Object>();
+            }
+            for (String contextBeanName : contextBeanNames)
+            {
+                Object contextBean = Jetspeed.getComponentManager().createPrototypeComponent(contextBeanName);
+                contexts.put(contextBeanName, contextBean);
+            }
+            request.setAttribute(JPA_CONVERSATIONAL_TXN_CONTEXTS_ATTR_KEY, contexts);
+        }
+        
+        // continue pipeline
+        context.invokeNext(request);
+    }
+}

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletentity/jpa/PortletEntityAccessComponentImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletentity/jpa/PortletEntityAccessComponentImpl.java?rev=747457&r1=747456&r2=747457&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletentity/jpa/PortletEntityAccessComponentImpl.java
(original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletentity/jpa/PortletEntityAccessComponentImpl.java
Tue Feb 24 17:43:28 2009
@@ -148,7 +148,7 @@
         String portletName = portletDefinition.getPortletName();
         // perform query
         EntityManager entityManager = getEntityManager();
-        Query portletEntitiesQuery = entityManager.createNamedQuery("PORTLET_ENTITES");
+        Query portletEntitiesQuery = entityManager.createNamedQuery("PORTLET_ENTITIES");
         portletEntitiesQuery.setParameter("appName", appName);
         portletEntitiesQuery.setParameter("portletName", portletName);
         return portletEntitiesQuery.getResultList();
@@ -166,7 +166,7 @@
         String portletName = split[1];
         // perform query
         EntityManager entityManager = getEntityManager();
-        Query portletEntitiesQuery = entityManager.createNamedQuery("PORTLET_ENTITES");
+        Query portletEntitiesQuery = entityManager.createNamedQuery("PORTLET_ENTITIES");
         portletEntitiesQuery.setParameter("appName", appName);
         portletEntitiesQuery.setParameter("portletName", portletName);
         return portletEntitiesQuery.getResultList();

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/jpa/PortletPreferencesProviderImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/jpa/PortletPreferencesProviderImpl.java?rev=747457&r1=747456&r2=747457&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/jpa/PortletPreferencesProviderImpl.java
(original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/components/portletpreferences/jpa/PortletPreferencesProviderImpl.java
Tue Feb 24 17:43:28 2009
@@ -320,7 +320,7 @@
                 dbPref.getPreferenceValues().add(dbValue);
             }                       
             // persist new database preference
-            entityManager.persist(preference);
+            entityManager.persist(dbPref);
         }
         // explicitly flush entity manager after update
         entityManager.flush();

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/descriptor/JetspeedDescriptorServiceImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/descriptor/JetspeedDescriptorServiceImpl.java?rev=747457&r1=747456&r2=747457&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/descriptor/JetspeedDescriptorServiceImpl.java
(original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/descriptor/JetspeedDescriptorServiceImpl.java
Tue Feb 24 17:43:28 2009
@@ -55,9 +55,6 @@
 import org.apache.jetspeed.om.portlet.Supports;
 import org.apache.jetspeed.om.portlet.UserAttribute;
 import org.apache.jetspeed.om.portlet.UserAttributeRef;
-import org.apache.jetspeed.om.portlet.impl.CustomPortletModeImpl;
-import org.apache.jetspeed.om.portlet.impl.CustomWindowStateImpl;
-import org.apache.jetspeed.om.portlet.impl.PortletApplicationDefinitionImpl;
 import org.apache.jetspeed.om.portlet.jetspeed.jaxb.MetadataType;
 import org.apache.jetspeed.om.portlet.jetspeed.jaxb.Portlet;
 import org.apache.jetspeed.om.portlet.jetspeed.jaxb.PortletApp;
@@ -655,7 +652,7 @@
                     CustomPortletMode jcpm = app.getCustomPortletMode(cpm.getMappedName());
                     if (jcpm != null && app.getCustomPortletMode(cpm.getName()) ==
null)
                     {
-                        ((CustomPortletModeImpl)jcpm).setMappedName(cpm.getMappedName());
+                        ((org.apache.jetspeed.om.portlet.CustomPortletMode)jcpm).setMappedName(cpm.getMappedName());
                     }
                 }
             }
@@ -666,7 +663,7 @@
                     CustomWindowState jcws = app.getCustomWindowState(cws.getMappedName());
                     if (jcws != null && app.getCustomWindowState(cws.getName()) ==
null)
                     {
-                        ((CustomWindowStateImpl)jcws).setMappedName(cws.getMappedName());
+                        ((org.apache.jetspeed.om.portlet.CustomWindowState)jcws).setMappedName(cws.getMappedName());
                     }
                 }
             }

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/jpa/PortletApplicationDefinitionImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/jpa/PortletApplicationDefinitionImpl.java?rev=747457&r1=747456&r2=747457&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/jpa/PortletApplicationDefinitionImpl.java
(original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/components/jetspeed-registry/src/main/java/org/apache/jetspeed/om/portlet/jpa/PortletApplicationDefinitionImpl.java
Tue Feb 24 17:43:28 2009
@@ -419,7 +419,7 @@
         }
         if (rolesList == null)
         {
-            rolesList = new PortletDefinitionList<SecurityRole>(this, rolesList);
+            rolesList = new PortletDefinitionList<SecurityRole>(this, roles);
         }
         return rolesList;
     }

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/CustomPortletMode.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/CustomPortletMode.java?rev=747457&r1=747456&r2=747457&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/CustomPortletMode.java
(original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/CustomPortletMode.java
Tue Feb 24 17:43:28 2009
@@ -35,4 +35,6 @@
     
     PortletMode getCustomMode();
     PortletMode getMappedMode();
+    
+    void setMappedName(String mappedName);
 }

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/CustomWindowState.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/CustomWindowState.java?rev=747457&r1=747456&r2=747457&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/CustomWindowState.java
(original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-api/src/main/java/org/apache/jetspeed/om/portlet/CustomWindowState.java
Tue Feb 24 17:43:28 2009
@@ -35,4 +35,6 @@
     
     WindowState getCustomState();
     WindowState getMappedState();
+
+    void setMappedName(String mappedName);
 }

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-portal-resources/src/main/resources/assembly/pipelines.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-portal-resources/src/main/resources/assembly/pipelines.xml?rev=747457&r1=747456&r2=747457&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-portal-resources/src/main/resources/assembly/pipelines.xml
(original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-portal-resources/src/main/resources/assembly/pipelines.xml
Tue Feb 24 17:43:28 2009
@@ -435,6 +435,31 @@
     </constructor-arg>
   </bean>
 
+  <bean class="org.apache.jetspeed.pipeline.valve.impl.JPAConversationalTxnStartValveImpl">
+    <meta key="j2:cat" value="ojb and default"/>
+    <meta key="j2:alias" value="jpaConversationalTxnStartValve"/>
+    <!-- no JPA manager contexts -->
+  </bean>
+
+  <bean class="org.apache.jetspeed.pipeline.valve.impl.JPAConversationalTxnStartValveImpl">
+    <meta key="j2:cat" value="jpa and default"/>
+    <meta key="j2:alias" value="jpaConversationalTxnStartValve"/>
+    <constructor-arg index="0">
+      <list>
+        <!-- JPA manager context bean names -->
+        <value>capabilitiesManagerContext</value>
+        <value>pageManagerContext</value>
+        <value>profilerManagerContext</value>
+        <value>registryManagerContext</value>
+        <value>securityManagerContext</value>
+      </list>
+    </constructor-arg>
+  </bean>
+
+  <bean id="jpaConversationalTxnEndValve" class="org.apache.jetspeed.pipeline.valve.impl.JPAConversationalTxnEndValveImpl">
+    <meta key="j2:cat" value="default"/>
+  </bean>
+
   <bean id="databaseValidator"
     class="org.apache.jetspeed.healthcheck.validators.DatasourceAvailableHealthCheckValidator">
     <meta key="j2:cat" value="default" />
@@ -492,6 +517,7 @@
     </constructor-arg>
     <constructor-arg>
       <list>
+        <ref bean="jpaConversationalTxnStartValve" />
         <ref bean="capabilityValve" />
         <ref bean="portalURLValve" />
         <ref bean="securityValve" />
@@ -513,6 +539,7 @@
         <ref bean="DecorationValve" />
         <ref bean="headerAggregatorValvePortal" />
         <ref bean="aggregatorValve" />
+        <ref bean="jpaConversationalTxnEndValve" />
         <ref bean="cleanUpValve" />
       </list>
     </constructor-arg>
@@ -525,6 +552,7 @@
     </constructor-arg>
     <constructor-arg>
       <list>
+        <ref bean="jpaConversationalTxnStartValve" />
         <ref bean="capabilityValve" />
         <ref bean="portalURLValve" />
         <ref bean="securityValve" />
@@ -538,6 +566,7 @@
         <ref bean="DecorationValve" />
         <ref bean="headerAggregatorValvePortal" />
         <ref bean="aggregatorValve" />
+        <ref bean="jpaConversationalTxnEndValve" />
         <ref bean="cleanUpValve" />
       </list>
     </constructor-arg>
@@ -550,9 +579,11 @@
     </constructor-arg>
     <constructor-arg>
       <list>
+        <ref bean="jpaConversationalTxnStartValve" />
         <ref bean="capabilityValve" />
         <ref bean="localizationValve" />
         <ref bean="loginViewValve" />
+        <ref bean="jpaConversationalTxnEndValve" />
       </list>
     </constructor-arg>
   </bean>
@@ -564,11 +595,13 @@
     </constructor-arg>
     <constructor-arg>
       <list>
+        <ref bean="jpaConversationalTxnStartValve" />
         <ref bean="localizationValve" />
         <ref bean="capabilityValve" />
         <ref bean="portalURLValve" />
         <ref bean="containerValve" />
         <ref bean="actionValve" />
+        <ref bean="jpaConversationalTxnEndValve" />
       </list>
     </constructor-arg>
   </bean>
@@ -580,6 +613,7 @@
     </constructor-arg>
     <constructor-arg>
       <list>
+        <ref bean="jpaConversationalTxnStartValve" />
         <ref bean="securityValve" />
         <ref bean="localizationValve" />
         <ref bean="capabilityValve" />
@@ -587,6 +621,7 @@
         <ref bean="profilerValve" />
         <ref bean="containerValve" />
         <ref bean="desktopActionValve" />
+        <ref bean="jpaConversationalTxnEndValve" />
       </list>
     </constructor-arg>
   </bean>
@@ -599,6 +634,7 @@
     </constructor-arg>
     <constructor-arg>
       <list>
+        <ref bean="jpaConversationalTxnStartValve" />
         <ref bean="desktopEncoderRedirectValve" />
         <ref bean="portalURLValve" />
         <ref bean="capabilityValve" />
@@ -608,6 +644,7 @@
         <ref bean="containerValve" />
         <ref bean="resourceValve" />
         <ref bean="portletValveTitleInHeader" />
+        <ref bean="jpaConversationalTxnEndValve" />
       </list>
     </constructor-arg>
   </bean>
@@ -619,6 +656,7 @@
     </constructor-arg>
     <constructor-arg>
       <list>
+        <ref bean="jpaConversationalTxnStartValve" />
         <ref bean="portalURLValve" />
         <ref bean="capabilityValve" />
         <ref bean="securityValve" />
@@ -626,6 +664,7 @@
         <ref bean="profilerValve" />
         <ref bean="containerValve" />
         <ref bean="portletValveTitleInHeader" />
+        <ref bean="jpaConversationalTxnEndValve" />
       </list>
     </constructor-arg>
   </bean>
@@ -637,6 +676,7 @@
     </constructor-arg>
     <constructor-arg>
       <list>
+        <ref bean="jpaConversationalTxnStartValve" />
         <ref bean="capabilityValve" />
         <ref bean="portalURLValve" />
         <ref bean="securityValve" />
@@ -645,6 +685,7 @@
         <ref bean="containerValve" />
         <!--  this is the standard Jetspeed API entry point -->
         <ref bean="layoutValve" />
+        <ref bean="jpaConversationalTxnEndValve" />
       </list>
     </constructor-arg>
   </bean>
@@ -656,6 +697,7 @@
     </constructor-arg>
     <constructor-arg>
       <list>
+        <ref bean="jpaConversationalTxnStartValve" />
         <ref bean="capabilityValve" />
         <ref bean="portalURLValve" />
         <ref bean="securityValve" />
@@ -663,6 +705,7 @@
         <ref bean="profilerValve" />
         <ref bean="containerValve" />
         <ref bean="AJAXValve" />
+        <ref bean="jpaConversationalTxnEndValve" />
       </list>
     </constructor-arg>
   </bean>
@@ -674,6 +717,7 @@
     </constructor-arg>
     <constructor-arg>
       <list>
+        <ref bean="jpaConversationalTxnStartValve" />
         <ref bean="portalURLValve" />
         <ref bean="securityValve" />
         <ref bean="localizationValve" />
@@ -681,6 +725,7 @@
         <ref bean="containerValve" />
         <ref bean="fileServerValve" />
         <ref bean="portletValve" />
+        <ref bean="jpaConversationalTxnEndValve" />
       </list>
     </constructor-arg>
   </bean>
@@ -692,6 +737,7 @@
     </constructor-arg>
     <constructor-arg>
       <list>
+        <ref bean="jpaConversationalTxnStartValve" />
         <ref bean="capabilityValve" />
         <ref bean="portalURLValve" />
         <ref bean="securityValve" />
@@ -699,6 +745,7 @@
         <ref bean="profilerValve" />
         <ref bean="headerAggregatorValveDesktop" />
         <ref bean="desktopValve" />
+        <ref bean="jpaConversationalTxnEndValve" />
       </list>
     </constructor-arg>
   </bean>
@@ -710,6 +757,7 @@
     </constructor-arg>
     <constructor-arg>
       <list>
+        <ref bean="jpaConversationalTxnStartValve" />
         <ref bean="capabilityValve" />
         <ref bean="portalURLValve" />
         <ref bean="securityValve" />
@@ -717,6 +765,7 @@
         <ref bean="profilerValve" />
         <ref bean="headerAggregatorValveDesktop" />
         <ref bean="desktopValve" />
+        <ref bean="jpaConversationalTxnEndValve" />
       </list>
     </constructor-arg>
   </bean>

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-portal-resources/src/main/resources/conf/jetspeed/jetspeed.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-portal-resources/src/main/resources/conf/jetspeed/jetspeed.properties?rev=747457&r1=747456&r2=747457&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-portal-resources/src/main/resources/conf/jetspeed/jetspeed.properties
(original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-portal-resources/src/main/resources/conf/jetspeed/jetspeed.properties
Tue Feb 24 17:43:28 2009
@@ -356,3 +356,14 @@
 # Registration default profiling rules assigned during registration or new user creation
 # comma separated list
 registration.rules.default = 
+
+#-------------------------------------------------------------------------
+# J P A / A T O M I K O S
+#-------------------------------------------------------------------------
+# transaction log file properties
+com.atomikos.icatch.log_base_dir=${applicationRoot}/logs
+com.atomikos.icatch.tm_unique_name=jetspeed-tm
+com.atomikos.icatch.log_base_name=jetspeed-tm-txn
+# logging file properties
+com.atomikos.icatch.output_dir=${applicationRoot}/logs
+com.atomikos.icatch.console_file_name=jetspeed-tm.log

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-portal-resources/src/main/resources/conf/jetspeed/spring-filter.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-portal-resources/src/main/resources/conf/jetspeed/spring-filter.properties?rev=747457&r1=747456&r2=747457&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-portal-resources/src/main/resources/conf/jetspeed/spring-filter.properties
(original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-portal-resources/src/main/resources/conf/jetspeed/spring-filter.properties
Tue Feb 24 17:43:28 2009
@@ -21,11 +21,14 @@
 #
 # ------------------------------------------------------------------------
 
-# available filters for JetspeedDS (defined in boot/datasource.xml):
+# available filters for OJB JetspeedDS (defined in boot/datasource.xml):
 #   jndiDS (default), jdbcDS, schemaAwareDS, ojbConnectionRepositoryDS
+# note: only jndiDS is available for JPA JetspeedDS and JetspeedXADS pair
 
-# default filter 
+# OJB default filter 
 default=default,ojb
+# JPA default filter 
+#default=default,jpa
 
 basePortal=${default},jndiDS,xmlPageManager
 portal=${basePortal},dbSecurity

Modified: portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-portal-resources/src/main/resources/conf/tomcat/context.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-portal-resources/src/main/resources/conf/tomcat/context.xml?rev=747457&r1=747456&r2=747457&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-portal-resources/src/main/resources/conf/tomcat/context.xml
(original)
+++ portals/jetspeed-2/portal/branches/JPA_BRANCH/jetspeed-portal-resources/src/main/resources/conf/tomcat/context.xml
Tue Feb 24 17:43:28 2009
@@ -24,13 +24,46 @@
          useContextClassLoader="true"
          debug="0"/>
 
-
-	<Resource name="jdbc/jetspeed" auth="Container"
+  <Resource name="jdbc/jetspeed" auth="Container"
             factory="org.apache.commons.dbcp.BasicDataSourceFactory"
-	    type="javax.sql.DataSource" username="${org.apache.jetspeed.production.database.user}"
password="${org.apache.jetspeed.production.database.password}"
-	    driverClassName="${org.apache.jetspeed.production.database.driver}" url="${org.apache.jetspeed.production.database.url}"
+            type="javax.sql.DataSource"
+            username="${org.apache.jetspeed.production.database.user}"
+            password="${org.apache.jetspeed.production.database.password}"
+            driverClassName="${org.apache.jetspeed.production.database.driver}"
+            url="${org.apache.jetspeed.production.database.url}"
             maxActive="100" maxIdle="30" maxWait="10000"/> 
 
-	<Valve className="org.apache.catalina.authenticator.FormAuthenticator" characterEncoding="UTF-8"/>
+  <!-- JPA/Atomikos XA DB Resource -->
+  <!--
+  <Resource name="jdbc/jetspeed-xa" auth="Container"
+            factory="com.atomikos.tomcat.BeanFactory"
+            type="com.atomikos.jdbc.AtomikosDataSourceBean"
+            uniqueResourceName="jdbc/jetspeed-xa"
+            xaDataSourceClassName="${org.apache.jetspeed.production.database.xatype}"
+            xaProperties.user="${org.apache.jetspeed.production.database.user}"
+            xaProperties.password="${org.apache.jetspeed.production.database.password}"
+            xaProperties.url="${org.apache.jetspeed.production.database.url}"
+            maxPoolSize="100" minPoolSize="30" borrowConnectionTimeout="10"/>
+  -->
+
+  <!-- JPA/Atomikos NON-XA DB Resource -->
+  <!--
+  <Resource name="jdbc/jetspeed-xa" auth="Container"
+            factory="org.apache.naming.factory.BeanFactory"
+            type="com.atomikos.jdbc.nonxa.AtomikosNonXADataSourceBean"
+            uniqueResourceName="jdbc/jetspeed-xa"
+            driverClassName="${org.apache.jetspeed.production.database.driver}"
+            user="${org.apache.jetspeed.production.database.user}"
+            password="${org.apache.jetspeed.production.database.password}"
+            url="${org.apache.jetspeed.production.database.url}"
+            maxPoolSize="100" minPoolSize="30" borrowConnectionTimeout="10"/>
+  -->
+
+  <!-- Atomikos User Transaction Factory -->
+  <!--
+  <Transaction factory="com.atomikos.icatch.jta.UserTransactionFactory"/>
+  -->
+
+  <Valve className="org.apache.catalina.authenticator.FormAuthenticator" characterEncoding="UTF-8"/>
 
 </Context>



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message