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

Gavin King gavin.king at jboss.com
Mon Nov 20 19:44:01 EST 2006


  User: gavin   
  Date: 06/11/20 19:44:01

  Modified:    src/main/org/jboss/seam/core   EntityManagerFactory.java
                        Filter.java
  Log:
  default names
  
  Revision  Changes    Path
  1.4       +8 -2      jboss-seam/src/main/org/jboss/seam/core/EntityManagerFactory.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: EntityManagerFactory.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/core/EntityManagerFactory.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- EntityManagerFactory.java	8 Nov 2006 07:09:16 -0000	1.3
  +++ EntityManagerFactory.java	21 Nov 2006 00:44:01 -0000	1.4
  @@ -1,4 +1,4 @@
  -//$Id: EntityManagerFactory.java,v 1.3 2006/11/08 07:09:16 gavin Exp $
  +//$Id: EntityManagerFactory.java,v 1.4 2006/11/21 00:44:01 gavin Exp $
   package org.jboss.seam.core;
   
   import static org.jboss.seam.InterceptionType.NEVER;
  @@ -10,6 +10,7 @@
   import javax.persistence.Persistence;
   
   import org.hibernate.cfg.Environment;
  +import org.jboss.seam.Component;
   import org.jboss.seam.ScopeType;
   import org.jboss.seam.annotations.Create;
   import org.jboss.seam.annotations.Destroy;
  @@ -42,8 +43,13 @@
      }
      
      @Create
  -   public void startup() throws Exception
  +   public void startup(Component component) throws Exception
      {
  +      if (persistenceUnitName==null)
  +      {
  +         persistenceUnitName = component.getName();
  +      }
  +      
         Map properties = new HashMap();
         Hashtable<String, String> jndiProperties = Naming.getInitialContextProperties();
         if ( jndiProperties!=null )
  
  
  
  1.3       +13 -0     jboss-seam/src/main/org/jboss/seam/core/Filter.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Filter.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/core/Filter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- Filter.java	25 Oct 2006 15:14:35 -0000	1.2
  +++ Filter.java	21 Nov 2006 00:44:01 -0000	1.3
  @@ -2,8 +2,10 @@
   
   import java.util.Map;
   
  +import org.jboss.seam.Component;
   import org.jboss.seam.InterceptionType;
   import org.jboss.seam.ScopeType;
  +import org.jboss.seam.annotations.Create;
   import org.jboss.seam.annotations.Intercept;
   import org.jboss.seam.annotations.Scope;
   import org.jboss.seam.core.Expressions.ValueBinding;
  @@ -24,6 +26,16 @@
      private String name;
      private Map<String, ValueBinding> parameters;
      
  +   @Create
  +   public void create(Component component)
  +   {
  +      //default the filter name to the component name
  +      if (name==null)
  +      {
  +         name = component.getName();
  +      }
  +   }
  +   
      /**
       * The filter parameters.
       * 
  @@ -47,6 +59,7 @@
      {
         return name;
      }
  +   
      public void setName(String name)
      {
         this.name = name;
  
  
  



More information about the jboss-cvs-commits mailing list