geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From viol...@apache.org
Subject svn commit: r1148159 - in /geronimo/daytrader/trunk/javaee6/modules: entities/src/main/resources/META-INF/ web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/ejb3/ web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/ejb3/
Date Tue, 19 Jul 2011 04:53:57 GMT
Author: violalu
Date: Tue Jul 19 04:53:56 2011
New Revision: 1148159

URL: http://svn.apache.org/viewvc?rev=1148159&view=rev
Log:
update persistence.xml and persistentcontext

Modified:
    geronimo/daytrader/trunk/javaee6/modules/entities/src/main/resources/META-INF/persistence.xml
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/ejb3/TradeSLSBBean.java
    geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/ejb3/PingServlet2Entity.java

Modified: geronimo/daytrader/trunk/javaee6/modules/entities/src/main/resources/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/javaee6/modules/entities/src/main/resources/META-INF/persistence.xml?rev=1148159&r1=1148158&r2=1148159&view=diff
==============================================================================
--- geronimo/daytrader/trunk/javaee6/modules/entities/src/main/resources/META-INF/persistence.xml
(original)
+++ geronimo/daytrader/trunk/javaee6/modules/entities/src/main/resources/META-INF/persistence.xml
Tue Jul 19 04:53:56 2011
@@ -17,7 +17,7 @@
 -->
 <persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">
 
-    <persistence-unit transaction-type="RESOURCE_LOCAL" name="daytrader">
+    <persistence-unit transaction-type="JTA" name="daytrader">
         <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
         <jta-data-source>jdbc/TradeDataSource</jta-data-source>  
         <non-jta-data-source>jdbc/NoTxTradeDataSource</non-jta-data-source> 
@@ -30,8 +30,10 @@
         <exclude-unlisted-classes>true</exclude-unlisted-classes>
         
         <properties>
-            <property name="openjpa.DynamicEnhancementAgent" value="false"/>
+            <property name="openjpa.jdbc.DBDictionary" value="derby" /> 
             <property name="openjpa.BrokerImpl" value="non-finalizing" />
+            <!-- To enable OpenJPA to generate foreign key constraints, comment out this
line -->
+            <!-- <property name="openjpa.jdbc.MappingDefaults" value="ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=restrict"/>
-->
             <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
             <property name="openjpa.Sequence" value="table(Table=OPENJPASEQ, Increment=100)"/>
 

Modified: geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/ejb3/TradeSLSBBean.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/ejb3/TradeSLSBBean.java?rev=1148159&r1=1148158&r2=1148159&view=diff
==============================================================================
--- geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/ejb3/TradeSLSBBean.java
(original)
+++ geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/ejb3/TradeSLSBBean.java
Tue Jul 19 04:53:56 2011
@@ -68,7 +68,7 @@ public class TradeSLSBBean implements Tr
     @Resource(name = "jms/TradeBrokerQueue")
     private Queue tradeBrokerQueue;
 
-    @PersistenceContext
+    @PersistenceContext(unitName = "daytrader")
     private EntityManager entityManager;
 
     /** Creates a new instance of TradeSLSBBean */

Modified: geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/ejb3/PingServlet2Entity.java
URL: http://svn.apache.org/viewvc/geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/ejb3/PingServlet2Entity.java?rev=1148159&r1=1148158&r2=1148159&view=diff
==============================================================================
--- geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/ejb3/PingServlet2Entity.java
(original)
+++ geronimo/daytrader/trunk/javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/prims/ejb3/PingServlet2Entity.java
Tue Jul 19 04:53:56 2011
@@ -47,7 +47,7 @@ public class PingServlet2Entity extends 
     
     private @EJB QuoteDataBean quote;
 
-    @PersistenceContext
+    @PersistenceContext(unitName = "daytrader")
     private EntityManager em;
 
     public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException,
IOException {



Mime
View raw message