Examples of Ejb3Deployment


Examples of org.jboss.ejb3.Ejb3Deployment

   }

   @Override
   public boolean isWebServiceDeployment(DeploymentUnit unit)
   {
      Ejb3Deployment ejb3Deployment = unit.getAttachment(Ejb3Deployment.class);
      if (ejb3Deployment == null)
         return false;

      boolean isWebServiceDeployment = false;
View Full Code Here

Examples of org.jboss.ejb3.Ejb3Deployment

{
   public void addSecurityDomain(JBossWebMetaData jbossWeb, Deployment dep)
   {
      String securityDomain = null;

      Ejb3Deployment ejb3Deployment = dep.getAttachment(Ejb3Deployment.class);
      if (ejb3Deployment != null)
      {
         WebServiceDeployment apiAdapter = WebServiceDeploymentApiAdapter.createInstance(ejb3Deployment);
         Iterator<WebServiceDeclaration> it = apiAdapter.getServiceEndpoints().iterator();
         while (it.hasNext())
View Full Code Here

Examples of org.jboss.ejb3.Ejb3Deployment

      }
   }

   public void addSecurityRoles(JBossWebMetaData webApp, Deployment dep)
   {
      Ejb3Deployment ejb3Deployment = dep.getAttachment(Ejb3Deployment.class);
      if (ejb3Deployment != null)
      {
         WebServiceDeployment apiAdapter = WebServiceDeploymentApiAdapter.createInstance(ejb3Deployment);
         Iterator<WebServiceDeclaration> it = apiAdapter.getServiceEndpoints().iterator();
         while (it.hasNext())
View Full Code Here

Examples of org.jboss.ejb3.Ejb3Deployment

   public void internalDeploy(DeploymentUnit unit) throws DeploymentException
   {
      JBossMetaData beans = (JBossMetaData)unit.getAttachment(
        MergedJBossMetaDataDeployer.EJB_MERGED_ATTACHMENT_NAME
      );
      Ejb3Deployment ejb3Deployment = unit.getAttachment(Ejb3Deployment.class);
     
      if(beans!=null)
      {
         WebServiceDeploymentAdapter wsDeployment = new WebServiceDeploymentAdapter();  
        
         Iterator<JBossEnterpriseBeanMetaData> iterator = beans.getEnterpriseBeans().iterator();
         while(iterator.hasNext())
         {
            JBossEnterpriseBeanMetaData ejb = iterator.next();
            EJBContainer ejbContainer = null;
            if (ejb3Deployment != null && !ejb.isEntity())
            {
               ObjectName objName = null;
               try
               {
                  objName = new ObjectName(ejb.determineContainerName());
               }
               catch (Exception e)
               {
                  throw new DeploymentException(e);
               }
               ejbContainer = (EJBContainer)ejb3Deployment.getContainer(objName);
            }
            if(ejb.getEjbClass()!=null)
              wsDeployment.getEndpoints().add( new WebServiceDeclarationAdapter(ejb, ejbContainer, unit.getClassLoader()) );
            else
               log.warn("Ingore ejb deployment with null classname: " + ejb);
View Full Code Here

Examples of org.jboss.ejb3.Ejb3Deployment

   }
  
   @Override
   public void undeploy(VFSDeploymentUnit unit)
   {
      Ejb3Deployment deployment = unit.getAttachment(Ejb3Deployment.class);
      if(deployment == null) return;
     
      try
      {
         deployment.destroy();
      }
      catch(Exception e)
      {
         log.warn("Failed to destroy deployment " + deployment, e);
      }
View Full Code Here

Examples of org.jboss.ejb3.Ejb3Deployment

      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

Examples of org.jboss.ejb3.Ejb3Deployment

         {
            log.warn("ejb link '" + ejbLink + "' is relative, but no deployment scope found");
            return null;
         }
         String relativePath = ejbLink.substring(0, hashIndex);
         Ejb3Deployment dep = deploymentScope.findRelativeDeployment(relativePath);
         if (dep == null)
         {
            log.warn("can't find a deployment for path '" + relativePath + "' of ejb link '" + ejbLink + "'");
            return null;
         }
         String ejbName = ejbLink.substring(hashIndex + 1);
         return dep.getEjbContainer(ejbName, businessIntf);
      }
      // look internally
      EJBContainer ejb = searchDeploymentInternally(ejbLink, businessIntf);
      if (ejb != null) return ejb;
      for (Object obj : Ejb3Registry.getContainers())
View Full Code Here

Examples of org.jboss.ejb3.Ejb3Deployment

                  return pud;
               }
            }
            return null;
         }
         Ejb3Deployment dep = deploymentScope.findRelativeDeployment(relativePath);
         if (dep == null)
         {
            return null;
         }
         PersistenceUnitDeployment rtn = dep.getPersistenceUnitDeploymentInternal(name);
         return rtn;
      }
      PersistenceUnitDeployment rtn = getPersistenceUnitDeploymentInternal(unitName);
      if (rtn != null) return rtn;
View Full Code Here

Examples of org.jboss.ejb3.Ejb3Deployment

      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());
         // Note that this should never happen because the dependencies should have been
         // resolved by the MappedReferenceMetaDataResolverDeployer
         if(deployment == null)
            throw new IllegalStateException("JBAS-5713: could not find an ejb3 deployment for " + endpoint.getPathName() + " (yet), try reordering the jars or adding explicit dependencies");
         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

Examples of org.jboss.ejb3.Ejb3Deployment

      // 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());
         // Note that this should never happen because the dependencies should have been
         // resolved by the MappedReferenceMetaDataResolverDeployer
         if(deployment == null)
            throw new IllegalStateException("JBAS-5713: could not find an ejb3 deployment for " + endpoint.getPathName() + " (yet), try reordering the jars or adding explicit dependencies");
         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
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.