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

Gavin King gavin.king at jboss.com
Tue Oct 24 07:50:10 EDT 2006


  User: gavin   
  Date: 06/10/24 07:50:10

  Modified:    src/main/org/jboss/seam  Component.java
  Log:
  better exception
  
  Revision  Changes    Path
  1.195     +5 -1      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.194
  retrieving revision 1.195
  diff -u -b -r1.194 -r1.195
  --- Component.java	16 Oct 2006 13:23:48 -0000	1.194
  +++ Component.java	24 Oct 2006 11:50:10 -0000	1.195
  @@ -111,7 +111,7 @@
    *
    * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
    * @author Gavin King
  - * @version $Revision: 1.194 $
  + * @version $Revision: 1.195 $
    */
   @Scope(ScopeType.APPLICATION)
   public class Component
  @@ -1433,6 +1433,10 @@
   
      public static Component forName(String name)
      {
  +      if ( !Contexts.isApplicationContextActive() )
  +      {
  +         throw new IllegalStateException("No application context active");
  +      }
         return (Component) Contexts.getApplicationContext().get( name + ".component" );
      }
   
  
  
  



More information about the jboss-cvs-commits mailing list