Package org.jboss.seam

Examples of org.jboss.seam.Component


{
   private static final long serialVersionUID = 6833040683938889232L;
   @AroundInvoke
   public Object aroundInvoke(InvocationContext ctx) throws Exception
   {
      Component comp = getComponent();
      String name = comp.getName();
      Object target = ctx.getTarget();
      Method method = ctx.getMethod();
      Object[] parameters = ctx.getParameters();
      Context outerMethodContext = Lifecycle.beginMethod();
      try
View Full Code Here


      return tasks;
   }
  
   protected static void runTasks()
   {
      Component component = Component.forName(StatusMessages.COMPONENT_NAME);
      if( component != null && !component.getScope().isContextActive() )
      {
         return;
      }
      //Attempting to get the instance anyway for backwards compatibility with some potential hack situations.
      StatusMessages statusMessages = instance();
View Full Code Here

      }
   }
  
   public static StatusMessages instance()
   {
      Component component = Component.forName(StatusMessages.COMPONENT_NAME);
      if(component != null && !component.getScope().isContextActive())
      {
         throw new IllegalStateException("No active "+component.getScope().name()+" context");
      }
      //Attempting to get the instance anyway for backwards compatibility with some potential hack situations.
      return (StatusMessages) Component.getInstance(COMPONENT_NAME);
   }
View Full Code Here

      addToControlFromResourceBundleOrDefault(id, toSeverity(severity), key, defaultMessageTemplate, params);
   }
  
   public static FacesMessages instance()
   {
      Component component = Component.forName(StatusMessages.COMPONENT_NAME);
      if(component != null && !component.getScope().isContextActive())
      {
         throw new IllegalStateException("No active "+component.getScope().name()+" context");
      }
      //Attempting to get the instance anyway for backwards compatibility with some potential hack situations.
      return (FacesMessages) Component.getInstance(StatusMessages.COMPONENT_NAME);
   }
View Full Code Here

           Enumeration e = request.getParameterNames();
           while (e.hasMoreElements())
           {
              String componentName = ((String) e.nextElement()).trim();
             
              Component component = Component.forName(componentName);
              if (component == null)
              {                
                 try
                 {
                    Class c = Reflections.classForName(componentName);
View Full Code Here

      Lifecycle.startDestroying();
      try
      {
         for ( String name: context.getNames() )
         {
            Component component = Component.forName(name);
            log.debug("destroying: " + name);
            if ( component!=null )
            {
               Object object = context.get(name);
               if (object!=null) //in a portal environment, this is possible
               {
                  if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.preDestroy." + name);
                  component.destroy(object);
               }
            }
         }
      }
      finally
View Full Code Here

      for ( String name: context.getNames() )
      {
         Object object = context.get(name);
         if ( object!=null && (object instanceof Component) )
         {
            Component component = (Component) object;
            if ( component.isStartup() && component.getScope()==scopeType )
            {
               startup(component);
            }
         }
      }
View Full Code Here

   {
      if ( component.isStartup() )
      {
         for ( String dependency: component.getDependencies() )
         {
            Component dependentComponent = Component.forName(dependency);
            if (dependentComponent!=null)
            {
               startup(dependentComponent);
            }
         }
View Full Code Here

         {
            log.debug("redeploying components");
            Seam.clearComponentNameCache();
            for (String name : init.getHotDeployableComponents())
            {
               Component component = Component.forName(name);
               if (component != null)
               {
                  ScopeType scope = component.getScope();
                  if (scope != ScopeType.STATELESS && scope.isContextActive())
                  {
                     scope.getContext().remove(name);
                  }
                  init.removeObserverMethods(component);
View Full Code Here

   {
      String name = descriptor.getName();
      String componentName = name + COMPONENT_SUFFIX;
      try
      {
         Component component = new Component(
               descriptor.getComponentClass(),
               name,
               descriptor.getScope(),
               descriptor.isStartup(),
               descriptor.getStartupDependencies(),
               descriptor.getJndiName()
            );
         context.set(componentName, component);
         if ( hotDeploymentStrategy != null && hotDeploymentStrategy.isEnabled() && hotDeploymentStrategy.isFromHotDeployClassLoader( descriptor.getComponentClass() ) )
         {
            Init.instance().addHotDeployableComponent( component.getName() );
         }
      }
      catch (Throwable e)
      {
         throw new RuntimeException("Could not create Component: " + name, e);
View Full Code Here

TOP

Related Classes of org.jboss.seam.Component

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.