Package org.jboss.ejb3

Examples of org.jboss.ejb3.SecurityActions$TCLAction$UTIL


         log.info("\t" + smd.getSupply());
      }

      if(service instanceof EJBContainer)
      {
         EJBContainer container = EJBContainer.class.cast(service);
         // TODO: use an informer
         JavaEEModule module = container.getModule();
         String moduleName = stripSuffix(module.getName());
         JavaEEApplication app = module.getApplication();
         String appName = app != null ? stripSuffix(app.getName()) : null;
         String scopedBeanName = "application=" + (appName != null ? appName : moduleName) + ",module=" + moduleName + ",component=" + container.getEjbName();
         String encFactoryBeanName = "jboss.ejb3:" + scopedBeanName + ",service=EjbEncFactory";
         // create an EjbEncFactory for this container
         {
            BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder(encFactoryBeanName, NamingComponentEjbEncFactory.class.getName());
            String componentBeanName = "jboss.naming:" + scopedBeanName;
            builder.addConstructorParameter(JavaEEComponent.class.getName(), new AbstractInjectionValueMetaData(componentBeanName));
            // TODO: is deployment always available at this stage?
            deployment.getBeanFactories().add(builder.getBeanMetaDataFactory());
         }
         // modify the container bean meta data to inject the EjbEncFactory
         BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder(bean);
         //builder.addPropertyMetaData("namingComponent", new AbstractInjectionValueMetaData("java:comp"));
         builder.addPropertyMetaData("ejbEncFactory", new AbstractInjectionValueMetaData(encFactoryBeanName));
        
         // Add the BeanInstantiator injection into EJBContainer
         // TODO: (Jaikiran) Terrible hack! Use JavaEEComponentInformer to get the app name.
         // But for now, due to lack of time for 6.0.0.CR1 release, let's just use this hack
         if (appName == null)
         {
            appName = moduleName;
         }
         String beanInstantiatorMcName = BeanInstantiatorRegistration.getInstantiatorRegistrationName(appName, moduleName, container.getEjbName());
         builder.addPropertyMetaData("beanInstantiator", new AbstractInjectionValueMetaData(beanInstantiatorMcName));

         // ahem
         if(service instanceof StatelessContainer)
         {
View Full Code Here


      container.getEncInjectors().put(encName, injector);
   }

   public static EJBContainer getEjbContainer(EJB ref, InjectionContainer container, Class<?> memberType)
   {
      EJBContainer rtn = null;

      if (ref.mappedName() != null && !"".equals(ref.mappedName()))
      {
         return null;
      }
View Full Code Here

      }
   }

   public Context getJNDIContext(final Endpoint ep) throws NamingException
   {
      final EJBContainer ejb3Container = (EJBContainer) getEjb3Container();
      return (Context) ejb3Container.getEnc().lookup(EJB3_JNDI_PREFIX);
   }
View Full Code Here

            final String ejbName = ejbMD.determineContainerName();

            if (ejbMD.getEjbClass() != null)
            {
               this.log.debug("Creating webservice EJB adapter for: " + ejbName);
               final EJBContainer ejbContainer = this.getContainer(ejb3Deployment, ejbMD);
               endpoints.add(new WebServiceDeclarationAdapter(ejbMD, ejbContainer, unit.getClassLoader()));
            }
            else
            {
               this.log.warn("Ingoring EJB deployment with null classname: " + ejbName);
View Full Code Here

      EJBContainer container = null;
      EndpointInfo endpoint = endpointResolver.getEndpointInfo(businessIntf, EndpointType.EJB, vfsContext);
      if(endpoint != null)
      {
         log.debug("Found endpoint for interface: "+businessIntf+", endpoint: "+endpoint);
         Ejb3Deployment deployment = deployments.get(endpoint.getPathName());
         String ejbObjectName = JavaEEComponentHelper.createObjectName(deployment, endpoint.getName());
         ObjectName ejbON;
         try
         {
            ejbON = new ObjectName(ejbObjectName);
         }
         catch (Exception e)
         {
            throw new IllegalStateException("Failed to build ejb container ObjectName", e);
         }
         container = (EJBContainer) deployment.getContainer(ejbON);
         // TODO: container = deployment.getEjbContainerForEjbName(endpoint.getName());
      }
      else
      {
         log.debug("Failed to find endpoint for interface: "+businessIntf);
View Full Code Here

      // First try the ejbLink
      EndpointInfo endpoint = endpointResolver.getEndpointInfo(ejbLink, EndpointType.EJB, vfsContext);
      if(endpoint != null)
      {
         log.debug("Found endpoint for ejbLink: "+ejbLink+", endpoint: "+endpoint);
         Ejb3Deployment deployment = deployments.get(endpoint.getPathName());
         String ejbObjectName = JavaEEComponentHelper.createObjectName(deployment, endpoint.getName());
         ObjectName ejbON;
         try
         {
            ejbON = new ObjectName(ejbObjectName);
         }
         catch (Exception e)
         {
            throw new IllegalStateException("Failed to build ejb container ObjectName", e);
         }
         container = (EJBContainer) deployment.getContainer(ejbON);
         // TODO: container = deployment.getEjbContainerForEjbName(endpoint.getName());         container = deployment.getEjbContainerForEjbName(endpoint.getName());
      }
      else
      {
         log.debug("Failed to find endpoint for ejbLink: "+ejbLink);
View Full Code Here

   }

   @Override
   protected void internalDeploy(DeploymentUnit unit) throws DeploymentException
   {
      Ejb3Deployment ejb3Deployment = unit.getAttachment(Ejb3Deployment.class);
     
      try
      {
         // start the deployment
         ejb3Deployment.start();
      }
      catch (Exception e)
      {
         throw new DeploymentException("Error starting Ejb3Deployment: " + ejb3Deployment.getName(), e);
      }
   }
View Full Code Here

   }
  
   @Override
   public void undeploy(VFSDeploymentUnit unit, JBossMetaData metadata)
   {
      Ejb3Deployment deployment = unit.getAttachment(Ejb3Deployment.class);
      if(deployment == null)
         return;

      try
      {
         deployment.stop();
      }
      catch(Exception e)
      {
         log.warn("Failed to stop deployment " + deployment, e);
      }
      try
      {
         deployment.destroy();
      }
      catch(Exception e)
      {
         log.warn("Failed to destroy deployment " + deployment, e);
      }
View Full Code Here

      return false;
   }
  
   public void undeploy(VFSDeploymentUnit unit)
   {
      Ejb3Deployment deployment = unit.getAttachment(Ejb3Deployment.class);
      if (deployment == null) return;
      try
      {
         deployment.stop();
      }
      catch (Exception e)
      {
         log.error("failed to stop deployment", e);
      }
      try
      {
         deployment.destroy();
      }
      catch (Exception e)
      {
         log.error("failed to destroy deployment", e);
      }
View Full Code Here

   @Override
   protected void internalDeploy(final DeploymentUnit unit) throws DeploymentException
   {
      final JBossMetaData mergedMD = (JBossMetaData) unit
            .getAttachment(MergedJBossMetaDataDeployer.EJB_MERGED_ATTACHMENT_NAME);
      final Ejb3Deployment ejb3Deployment = ASHelper.getOptionalAttachment(unit, Ejb3Deployment.class);

      if (mergedMD != null)
      {
         final WebServiceDeploymentAdapter wsDeploymentAdapter = new WebServiceDeploymentAdapter();
         final List<WebServiceDeclaration> endpoints = wsDeploymentAdapter.getServiceEndpoints();
View Full Code Here

TOP

Related Classes of org.jboss.ejb3.SecurityActions$TCLAction$UTIL

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.