Examples of StandaloneLifeCycle


Examples of org.apache.webbeans.lifecycle.StandaloneLifeCycle

      ClassLoader cl = new ShrinkWrapClassLoader(archive);

      Thread.currentThread().setContextClassLoader(cl);

      final ShrinkWrapMetaDataDiscovery discovery = new ShrinkWrapMetaDataDiscovery(archive);
      ContainerLifecycle lifecycle = new StandaloneLifeCycle()
      {
         // TODO this override method will need to change to afterInitApplication(Properties) after 1.0.0-M4
         @Override
         public void init()
         {
            super.init();
            log.info("Using discovery service impl class adapted to ShrinkWrap archive : [" + discovery.getClass().getName() + "]");
            this.discoveryService = discovery;
         }
      };

      try
      {
         lifecycle.start(null);
      }
      catch (Exception e)
      {
         throw new RuntimeException("Failed to start standalone OpenWebBeans container", e);
      }

      BeanManager manager = lifecycle.getBeanManager();

      // start the application lifecycle
      ContextFactory.initApplicationContext(null);
      // start the session lifecycle
      HttpSession session = new MockHttpSession();
View Full Code Here

Examples of org.apache.webbeans.lifecycle.StandaloneLifeCycle

      ClassLoader cl = new ShrinkWrapClassLoader(archive);

      Thread.currentThread().setContextClassLoader(cl);

      final ShrinkWrapMetaDataDiscovery discovery = new ShrinkWrapMetaDataDiscovery(archive);
      ContainerLifecycle lifecycle = new StandaloneLifeCycle()
      {
         // TODO this override method will need to change to afterInitApplication(Properties) after 1.0.0-M4
         @Override
         public void init()
         {
            super.init();
            log.info("Using discovery service impl class adapted to ShrinkWrap archive : [" + discovery.getClass().getName() + "]");
            this.discoveryService = discovery;
         }
      };

      try
      {
         lifecycle.start(null);
      }
      catch (Exception e)
      {
         throw new RuntimeException("Failed to start standalone OpenWebBeans container", e);
      }

      BeanManager manager = lifecycle.getBeanManager();

      // start the application lifecycle
      ContextFactory.initApplicationContext(null);
      // start the session lifecycle
      HttpSession session = new MockHttpSession();
View Full Code Here

Examples of org.apache.webbeans.lifecycle.StandaloneLifeCycle

    {
        // Scanner service
        final TCKMetaDataDiscoveryImpl discovery = (TCKMetaDataDiscoveryImpl) WebBeansContext.getInstance().getScannerService();

        // Lifecycle container
        this.lifeCycle = new StandaloneLifeCycle()
        {
            protected void afterInitApplication(Properties event)
            {
                this.scannerService = discovery;
            }
View Full Code Here

Examples of org.apache.webbeans.lifecycle.StandaloneLifeCycle

        try
        {
            final TCKMetaDataDiscoveryImpl discovery = (TCKMetaDataDiscoveryImpl) WebBeansContext.getInstance().getScannerService();

            // Lifecycle container
            this.lifeCycle = new StandaloneLifeCycle()
            {
                protected void afterInitApplication(Properties event)
                {
                    this.scannerService = discovery;
                }
View Full Code Here

Examples of org.apache.webbeans.lifecycle.StandaloneLifeCycle

    {
        // Scanner service
        final TCKMetaDataDiscoveryImpl discovery = (TCKMetaDataDiscoveryImpl) ServiceLoader.getService(ScannerService.class);

        // Lifecycle container
        this.lifeCycle = new StandaloneLifeCycle()
        {
            protected void afterInitApplication(Properties event)
            {
                this.scannerService = discovery;
            }
View Full Code Here

Examples of org.apache.webbeans.lifecycle.StandaloneLifeCycle

        try
        {
            final TCKMetaDataDiscoveryImpl discovery = (TCKMetaDataDiscoveryImpl) ServiceLoader.getService(ScannerService.class);

            // Lifecycle container
            this.lifeCycle = new StandaloneLifeCycle()
            {
                protected void afterInitApplication(Properties event)
                {
                    this.scannerService = discovery;
                }
View Full Code Here

Examples of org.apache.webbeans.lifecycle.StandaloneLifeCycle

    {
        //Scanner service
        final TCKMetaDataDiscoveryImpl discovery = (TCKMetaDataDiscoveryImpl)ServiceLoader.getService(ScannerService.class);
       
        //Lifecycle container
        this.lifeCycle = new StandaloneLifeCycle()
        {
            protected void afterInitApplication(Properties event)
            {
                this.scannerService = discovery;
            }           
View Full Code Here

Examples of org.apache.webbeans.lifecycle.StandaloneLifeCycle

        try
        {
            final TCKMetaDataDiscoveryImpl discovery = (TCKMetaDataDiscoveryImpl)ServiceLoader.getService(ScannerService.class);
           
            //Lifecycle container
            this.lifeCycle = new StandaloneLifeCycle()
            {
                protected void afterInitApplication(Properties event)
                {
                    this.scannerService = discovery;
                }           
View Full Code Here

Examples of org.apache.webbeans.lifecycle.StandaloneLifeCycle

    {
        // Scanner service
        final TCKMetaDataDiscoveryImpl discovery = (TCKMetaDataDiscoveryImpl) WebBeansContext.getInstance().getScannerService();

        // Lifecycle container
        this.lifeCycle = new StandaloneLifeCycle()
        {
            protected void afterInitApplication(Properties event)
            {
                this.scannerService = discovery;
            }
View Full Code Here

Examples of org.apache.webbeans.lifecycle.StandaloneLifeCycle

        try
        {
            final TCKMetaDataDiscoveryImpl discovery = (TCKMetaDataDiscoveryImpl) WebBeansContext.getInstance().getScannerService();

            // Lifecycle container
            this.lifeCycle = new StandaloneLifeCycle()
            {
                protected void afterInitApplication(Properties event)
                {
                    this.scannerService = discovery;
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.