[jboss-svn-commits] JBL Code SVN: r30452 - in labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java: auction and 3 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Thu Dec 3 11:57:14 EST 2009
Author: whitingjr
Date: 2009-12-03 11:57:13 -0500 (Thu, 03 Dec 2009)
New Revision: 30452
Added:
labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/auction/
labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/auction/dao/
labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/auction/dao/ejb3/
labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/auction/dao/ejb3/persistence/
labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/auction/dao/ejb3/persistence/ItemDAOBeanMultiResource.java
labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/auction/dao/ejb3/persistence/UserDAOBeanMultiResource.java
Log:
Extended DAO classes to allow setting of entity manager for separate persistence units.
Added: labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/auction/dao/ejb3/persistence/ItemDAOBeanMultiResource.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/auction/dao/ejb3/persistence/ItemDAOBeanMultiResource.java (rev 0)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/auction/dao/ejb3/persistence/ItemDAOBeanMultiResource.java 2009-12-03 16:57:13 UTC (rev 30452)
@@ -0,0 +1,45 @@
+ /*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., 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 auction.dao.ejb3.persistence;
+
+import javax.persistence.PersistenceUnit;
+
+import auction.dao.ejb3.ItemDAOBean;
+
+public class ItemDAOBeanMultiResource extends ItemDAOBean
+{
+
+ @PersistenceUnit (unitName="caveatemptorA")
+ public void setEntityManagerA(javax.persistence.EntityManager entityManager)
+ {
+ this.em = entityManager;
+ }
+
+ @PersistenceUnit (unitName="caveatemptorB")
+ public void setEntityManagerB(javax.persistence.EntityManager entityManager)
+ {
+ this.em = entityManager;
+ }
+
+
+}
Added: labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/auction/dao/ejb3/persistence/UserDAOBeanMultiResource.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/auction/dao/ejb3/persistence/UserDAOBeanMultiResource.java (rev 0)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/java/auction/dao/ejb3/persistence/UserDAOBeanMultiResource.java 2009-12-03 16:57:13 UTC (rev 30452)
@@ -0,0 +1,44 @@
+ /*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., 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 auction.dao.ejb3.persistence;
+
+import javax.persistence.PersistenceUnit;
+
+import auction.dao.ejb3.UserDAOBean;
+
+public class UserDAOBeanMultiResource extends UserDAOBean
+{
+
+ @PersistenceUnit (unitName="caveatemptorA")
+ public void setEntityManagerA(javax.persistence.EntityManager entityManager)
+ {
+ this.em = entityManager;
+ }
+
+ @PersistenceUnit (unitName="caveatemptorB")
+ public void setEntityManagerB(javax.persistence.EntityManager entityManager)
+ {
+ this.em = entityManager;
+ }
+
+}
More information about the jboss-svn-commits
mailing list