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

Gavin King gavin.king at jboss.com
Tue Feb 13 14:32:03 EST 2007


  User: gavin   
  Date: 07/02/13 14:32:03

  Modified:    src/main/org/jboss/seam/init  Initialization.java
  Log:
  second not to self: teach Shane how to use @Install
  
  Revision  Changes    Path
  1.149     +16 -5     jboss-seam/src/main/org/jboss/seam/init/Initialization.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Initialization.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/init/Initialization.java,v
  retrieving revision 1.148
  retrieving revision 1.149
  diff -u -b -r1.148 -r1.149
  --- Initialization.java	13 Feb 2007 15:07:28 -0000	1.148
  +++ Initialization.java	13 Feb 2007 19:32:03 -0000	1.149
  @@ -56,7 +56,7 @@
   /**
    * @author Gavin King
    * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
  - * @version $Revision: 1.148 $
  + * @version $Revision: 1.149 $
    */
   public class Initialization
   {
  @@ -784,17 +784,28 @@
      }
   
      /**
  -    * This actually creates a proper component and should only be called when
  +    * This actually creates a real Component and should only be called when
       * we want to install a component
       */
      protected void addComponent(ComponentDescriptor descriptor, Context context)
      {
         String name = descriptor.getName();
         String componentName = name + COMPONENT_SUFFIX;
  -      Component component = new Component(descriptor.getComponentClass(), name, descriptor
  -               .getScope(), descriptor.getJndiName());
  +      try
  +      {
  +         Component component = new Component(
  +               descriptor.getComponentClass(), 
  +               name, 
  +               descriptor.getScope(), 
  +               descriptor.getJndiName()
  +            );
         context.set(componentName, component);
      }
  +      catch (Throwable e)
  +      {
  +         throw new RuntimeException("Could not create Component: " + name, e);
  +      }
  +   }
   
      private static String toCamelCase(String hyphenated, boolean initialUpper)
      {
  
  
  



More information about the jboss-cvs-commits mailing list