Package org.jboss.beans.metadata.spi.builder

Examples of org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder.createInject()


      // Create the classloader
      builder = BeanMetaDataBuilder.createBuilder(contextName, ClassLoader.class.getName());
      builder.setNoClassLoader();
      builder.setFactory(moduleName);
      builder.setFactoryMethod("registerClassLoaderPolicy");
      builder.addConstructorParameter(ClassLoaderSystem.class.getName(), builder.createInject(classLoaderSystemName));
      BeanMetaData classLoader = builder.getBeanMetaData();
     
      return Arrays.asList(classLoader, module);
   }
}
View Full Code Here


      sessionBeanTypeName += "module=" + moduleName + ",component=" + componentName + ",service=" + SessionBeanTypeWrapper.class.getSimpleName();
      {
         BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder(sessionBeanTypeName, SessionBeanTypeWrapper.class.getName());
         builder.addConstructorParameter(JBossSessionBeanMetaData.class.getName(), sessionBeanMetaData);
         builder.addConstructorParameter(ClassLoader.class.getName(), unit.getClassLoader());
         builder.addConstructorParameter(JavaEEComponent.class.getName(), builder.createInject(javaCompName));

         unit.getParent().addAttachment(sessionBeanTypeName, builder.getBeanMetaData());
      }

      String beanInstanceName = "jboss.ejb3:";
View Full Code Here

      String beanInstanceName = "jboss.ejb3:";
      if (appName != null)
         beanInstanceName += "application=" + appName + ",";
      beanInstanceName += "module=" + moduleName + ",component=" + componentName + ",service=" + EJBBinder.class.getSimpleName();
      BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder(beanInstanceName, EJBBinder.class.getName());
      builder.addConstructorParameter(SessionBeanType.class.getName(), builder.createInject(sessionBeanTypeName));
      builder.addPropertyMetaData("globalContext", builder.createInject("NameSpaces", "globalContext"));
      builder.addPropertyMetaData("proxyFactory", legacy);
      builder.setStart("bind");
      builder.setStop("unbind");
View Full Code Here

      if (appName != null)
         beanInstanceName += "application=" + appName + ",";
      beanInstanceName += "module=" + moduleName + ",component=" + componentName + ",service=" + EJBBinder.class.getSimpleName();
      BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder(beanInstanceName, EJBBinder.class.getName());
      builder.addConstructorParameter(SessionBeanType.class.getName(), builder.createInject(sessionBeanTypeName));
      builder.addPropertyMetaData("globalContext", builder.createInject("NameSpaces", "globalContext"));
      builder.addPropertyMetaData("proxyFactory", legacy);
      builder.setStart("bind");
      builder.setStop("unbind");

      for (DependencyBuilder db : builders)
View Full Code Here

   private KernelDeployment createDeployment(String deploymentName, String beanName, String clazz, String dependency, String scope, String alias)
   {
      BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder(beanName, clazz);
      if (dependency != null)
      {
         ValueMetaData inject = builder.createInject(dependency);
         builder.addPropertyMetaData("simpleBean", inject);
      }
      if (scope != null)
      {
         builder.addAnnotation(new ApplicationScopeImpl(scope));
View Full Code Here

         // The BaseContext ctor
         contextBuilder.addConstructorParameter(BeanContainer.class.getName(), container);
         // BaseContext properties
         // BaseContext.instance
         String beanName = nameBuilder.buildName(baseName, "BeanInstance", compID);
         ValueMetaData beanInstance = contextBuilder.createInject(beanName);
         contextBuilder.addPropertyMetaData("instance", beanInstance);
         // Call the visitor to augment the metadata
         if(visitor != null)
            visitor.visit(contextBuilder, baseName, "ContextFactory", compID);
         BeanMetaData beanContext = contextBuilder.getBeanMetaData();
View Full Code Here

         // get the metadata for the authentication policy bean.
         String authPolicyName = this.policyName + "$AuthenticationPolicy";
         result.addAll(this.authMetaData.getBeans(authPolicyName, AuthenticationPolicyBean.class.getName()));

         // inject the authentication policy into the application policy.
         ValueMetaData injectAuthenticationPolicy = policyBuilder.createInject(authPolicyName);
         policyBuilder.addPropertyMetaData("authenticationPolicy", injectAuthenticationPolicy);
      }
      else if (this.jaspiMetaData != null)
      {
         logger.trace("Generating jaspi-authentication metadata for policy " + this.policyName);
View Full Code Here

         // get the metadata for the jaspi authentication policy bean.
         String authPolicyName = this.policyName + "$JASPIAuthenticationPolicy";
         result.addAll(this.jaspiMetaData.getBeans(authPolicyName, JASPIAuthenticationPolicyBean.class.getName()));

         // inject the jaspi authentication policy into the application policy.
         ValueMetaData injectAuthenticationPolicy = policyBuilder.createInject(authPolicyName);
         policyBuilder.addPropertyMetaData("authenticationPolicy", injectAuthenticationPolicy);
      }
      // if no authentication configuration was found and the policy does not extend another policy, throw an exception.
      else if (this.parentPolicy == null)
      {
View Full Code Here

         // get the metadata for the authorization policy bean.
         String authzPolicyName = this.policyName + "$AuthorizationPolicy";
         result.addAll(this.authzMetaData.getBeans(authzPolicyName, AuthorizationPolicyBean.class.getName()));

         // inject the authorization policy into the application policy.
         ValueMetaData injectAuthorizationPolicy = policyBuilder.createInject(authzPolicyName);
         policyBuilder.addPropertyMetaData("authorizationPolicy", injectAuthorizationPolicy);
      }

      // acl (instance-based authorization) metadata.
      if (this.aclMetaData != null)
View Full Code Here

         // get the metadata for the acl policy bean.
         String aclPolicyName = this.policyName + "$ACLPolicy";
         result.addAll(this.aclMetaData.getBeans(aclPolicyName, ACLPolicyBean.class.getName()));

         // inject the authorization policy into the application policy.
         ValueMetaData injectACLPolicy = policyBuilder.createInject(aclPolicyName);
         policyBuilder.addPropertyMetaData("aclPolicy", injectACLPolicy);
      }

      // role-mapping metadata.
      if (this.roleMappingMetaData != null)
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.