[jboss-cvs] jboss-seam/src/main/org/jboss/seam/framework ...
Gavin King
gavin.king at jboss.com
Sun Oct 15 17:54:49 EDT 2006
User: gavin
Date: 06/10/15 17:54:49
Modified: src/main/org/jboss/seam/framework EntityHome.java
EntityQuery.java HibernateEntityHome.java
HibernateEntityQuery.java
Log:
default the em
Revision Changes Path
1.7 +5 -0 jboss-seam/src/main/org/jboss/seam/framework/EntityHome.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: EntityHome.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/framework/EntityHome.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- EntityHome.java 12 Oct 2006 08:32:38 -0000 1.6
+++ EntityHome.java 15 Oct 2006 21:54:49 -0000 1.7
@@ -2,6 +2,7 @@
import javax.persistence.EntityManager;
+import org.jboss.seam.Component;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Transactional;
import org.jboss.seam.core.FacesMessages;
@@ -73,6 +74,10 @@
public EntityManager getEntityManager()
{
+ if (entityManager==null)
+ {
+ entityManager = (EntityManager) Component.getInstance("entityManager");
+ }
return entityManager;
}
1.4 +5 -0 jboss-seam/src/main/org/jboss/seam/framework/EntityQuery.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: EntityQuery.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/framework/EntityQuery.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- EntityQuery.java 13 Oct 2006 23:28:04 -0000 1.3
+++ EntityQuery.java 15 Oct 2006 21:54:49 -0000 1.4
@@ -5,6 +5,7 @@
import javax.persistence.EntityManager;
+import org.jboss.seam.Component;
import org.jboss.seam.annotations.Transactional;
import org.jboss.seam.core.Expressions.ValueBinding;
@@ -76,6 +77,10 @@
public EntityManager getEntityManager()
{
+ if (entityManager==null)
+ {
+ entityManager = (EntityManager) Component.getInstance("entityManager");
+ }
return entityManager;
}
1.3 +5 -0 jboss-seam/src/main/org/jboss/seam/framework/HibernateEntityHome.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: HibernateEntityHome.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/framework/HibernateEntityHome.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- HibernateEntityHome.java 8 Oct 2006 19:35:48 -0000 1.2
+++ HibernateEntityHome.java 15 Oct 2006 21:54:49 -0000 1.3
@@ -3,6 +3,7 @@
import java.io.Serializable;
import org.hibernate.Session;
+import org.jboss.seam.Component;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Transactional;
import org.jboss.seam.core.FacesMessages;
@@ -68,6 +69,10 @@
public Session getSession()
{
+ if (session==null)
+ {
+ session = (Session) Component.getInstance("session");
+ }
return session;
}
1.4 +5 -0 jboss-seam/src/main/org/jboss/seam/framework/HibernateEntityQuery.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: HibernateEntityQuery.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/framework/HibernateEntityQuery.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- HibernateEntityQuery.java 13 Oct 2006 23:28:04 -0000 1.3
+++ HibernateEntityQuery.java 15 Oct 2006 21:54:49 -0000 1.4
@@ -3,6 +3,7 @@
import java.util.List;
import org.hibernate.Session;
+import org.jboss.seam.Component;
import org.jboss.seam.annotations.Transactional;
import org.jboss.seam.core.Expressions.ValueBinding;
@@ -77,6 +78,10 @@
public Session getSession()
{
+ if (session==null)
+ {
+ session = (Session) Component.getInstance("session");
+ }
return session;
}
More information about the jboss-cvs-commits
mailing list