Package org.apache.webbeans.lifecycle

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


        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

    {
        // 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

        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

    {
        // 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

        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

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

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

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

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

       *
      ClassLoader cl = new ShrinkWrapClassLoader(archive);
      Thread.currentThread().setContextClassLoader(cl);
       */
      final ShrinkWrapMetaDataDiscovery discovery = new ShrinkWrapMetaDataDiscovery(archive);
      ContainerLifecycle lifecycle = new StandaloneLifeCycle()
      {
         /**
          * Override so we can set out own scannerService.
          * TODO: We should change this to use the ServiceLoader via openwebbeans.properties, then do something like:
          * ((ShrinkWrapScannerService)StandardLifecycle.getScannerService()).setArchive(deployment)
          */
         @Override
         protected void afterInitApplication(Properties properties)
         {
            super.afterInitApplication(properties);
            this.scannerService = discovery;
         }
      };

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

      lifecycleProducer.set(lifecycle);
      beanManagerProducer.set(lifecycle.getBeanManager());
     
      return new ProtocolMetaData();
   }
View Full Code Here

TOP

Related Classes of org.apache.webbeans.lifecycle.StandaloneLifeCycle

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.