[jboss-cvs] jboss-seam/src/main/org/jboss/seam ...

Gavin King gavin.king at jboss.com
Tue Dec 12 23:54:19 EST 2006


  User: gavin   
  Date: 06/12/12 23:54:19

  Modified:    src/main/org/jboss/seam   Component.java Seam.java
  Log:
  maintain referential integrity for entity beans in conversation context
  
  Revision  Changes    Path
  1.218     +2 -2      jboss-seam/src/main/org/jboss/seam/Component.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Component.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/Component.java,v
  retrieving revision 1.217
  retrieving revision 1.218
  diff -u -b -r1.217 -r1.218
  --- Component.java	6 Dec 2006 07:36:58 -0000	1.217
  +++ Component.java	13 Dec 2006 04:54:19 -0000	1.218
  @@ -121,7 +121,7 @@
    *
    * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
    * @author Gavin King
  - * @version $Revision: 1.217 $
  + * @version $Revision: 1.218 $
    */
   @Scope(ScopeType.APPLICATION)
   @SuppressWarnings("deprecation")
  @@ -771,7 +771,7 @@
         {
            addInterceptor( new Interceptor( new TransactionInterceptor(), this ) );
         }
  -      if ( getScope()!=STATELESS && getScope()!=EVENT )
  +      if ( getScope()==CONVERSATION )
         {
            addInterceptor( new Interceptor( new ManagedEntityIdentityInterceptor(), this ) );
         }
  
  
  
  1.26      +18 -1     jboss-seam/src/main/org/jboss/seam/Seam.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Seam.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/Seam.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -b -r1.25 -r1.26
  --- Seam.java	1 Nov 2006 01:52:08 -0000	1.25
  +++ Seam.java	13 Dec 2006 04:54:19 -0000	1.26
  @@ -1,4 +1,4 @@
  -//$Id: Seam.java,v 1.25 2006/11/01 01:52:08 gavin Exp $
  +//$Id: Seam.java,v 1.26 2006/12/13 04:54:19 gavin Exp $
   package org.jboss.seam;
   
   import static org.jboss.seam.ComponentType.ENTITY_BEAN;
  @@ -125,6 +125,23 @@
         return null;
      }
      
  +   /**
  +    * Is the class a container-generated proxy class for an 
  +    * entity bean?
  +    */
  +   public static boolean isEntityClass(Class<?> clazz)
  +   {
  +      while ( clazz!=null && !Object.class.equals(clazz) )
  +      {
  +         if ( clazz.isAnnotationPresent(Entity.class) )
  +         {
  +            return true;
  +         }
  +         clazz = clazz.getSuperclass();
  +      }
  +      return false;
  +   }
  +   
      public static String getEjbName(Class<?> clazz)
      {
         switch ( getComponentType(clazz) )
  
  
  



More information about the jboss-cvs-commits mailing list