Package org.jboss.seam

Examples of org.jboss.seam.Component$MapInitialValue


   }
  
   //TODO: copy/paste from JavaBean interceptor
   Object readResolve()
   {
      Component comp = null;
      try
      {
         comp = getComponent();
      }
      catch (IllegalStateException ise) {
         //this can occur when tomcat deserializes persistent sessions
      }
     
      try
      {
         if (comp==null)
         {
            ProxyObject proxy = Component.createProxyFactory(
                  ComponentType.STATEFUL_SESSION_BEAN,
                  beanClass,
                  Component.getBusinessInterfaces(beanClass)
               ).newInstance();
            proxy.setHandler(this);
            return proxy;
         }
         else
         {
            return comp.wrap(bean, this);
         }
      }
      catch (Exception e)
      {
         throw new RuntimeException(e);
View Full Code Here


      log.info("redeploying");
      ServletLifecycle.beginReinitialization(request);
      Init init = Init.instance();
      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);
            }
         }
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.getJndiName()
            );
         context.set(componentName, component);
         if ( redeployStrategy.isFromHotDeployClassLoader( descriptor.getComponentClass() ) )
         {
            Init.instance().addHotDeployableComponent( component.getName() );
         }
      }
      catch (Throwable e)
      {
         throw new RuntimeException("Could not create Component: " + name, e);
View Full Code Here

   }
  
   // TODO: copy/paste from ClientSide interceptor
   Object readResolve()
   {
      Component comp = null;
      try
      {
         comp = getComponent();
      }
      catch (IllegalStateException ise) {
         //this can occur when tomcat deserializes persistent sessions
      }
     
      try
      {
         if (comp==null)
         {
            ProxyObject proxy = Component.createProxyFactory(
                  ComponentType.JAVA_BEAN,
                  beanClass,
                  Component.getBusinessInterfaces(beanClass)
               ).newInstance();
            proxy.setHandler(this);
            return proxy;
         }
         else
         {
            return comp.wrap(bean, this);
         }
      }
      catch (Exception e)
      {
         throw new RuntimeException(e);
View Full Code Here

   {
      if (type != null)
      {
         return type;
      }
      Component component = getComponent();
      if (component == null)
      {
         return null;
      }
      if (component.hasUnwrapMethod())
      {
         return component.getUnwrapMethod().getReturnType();
      }
      return component.getBeanClass();
   }
View Full Code Here

   }

   public List<Class> getSeamInterfaces()
   {
      List<Class> interfaces = new ArrayList<Class>();
      Component component = getComponent();
      // Attempt to piece together all of the possible interfaces to apply
      // to our proxy.
      if ( component != null && component.isInterceptionEnabled() )
      {
         if (component.getType().isSessionBean())
         {
            interfaces.addAll(component.getBusinessInterfaces());
         }
         else
         {
            interfaces.add(HttpSessionActivationListener.class);
            interfaces.add(Mutable.class);
View Full Code Here

            Lifecycle.mockApplication();
            unmockApplication = true;
         }
         try
         {
            Component component = Component.forName(name);
            if (component == null)
            {
               throw new IllegalStateException("Cannot find targetClass for seam component: "
                        + name + ".  Make sure Seam is being configured before Spring.");
            }
View Full Code Here

                return null;
            }
        }

        private ClassLoader loaderForComponent(String name) {
            Component component = (Component) Component.getInstance(name + ".component");
            if (component == null) {
                log.debug("Couldn't find component for " + name);
                return null;
            }
           
            return component.getBeanClass().getClassLoader();
        }
View Full Code Here

      else
      {
         reentrant = true;
         try
         {
            Component component = getComponent();
            boolean enforceRequired = !component.isLifecycleMethod( invocation.getMethod() );
            component.inject( invocation.getTarget(), enforceRequired );
            Object result = invocation.proceed();           
            component.outject( invocation.getTarget(), enforceRequired );
            component.disinject( invocation.getTarget() );
            return result;
           
         }
         finally
         {
View Full Code Here

{
   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

TOP

Related Classes of org.jboss.seam.Component$MapInitialValue

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.