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

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


        bmdBuilder.addConstructorParameter(EsbMetaData.class.getName(), esbMetaData);
        // Setup the second constructor argument (the name of the mbean).
        final String mbeanName = esbBeanPrefix + ":deployment=" + deploymentUnit.getSimpleName();
        bmdBuilder.addConstructorParameter(String.class.getName(), mbeanName);
        // Setup the third constructor argument (vfs deployment unit).
        bmdBuilder.addConstructorParameter(VFSDeploymentUnit.class.getName(), deploymentUnit);
        if (warFilesDir == null)
        {
            final String errorMsg = String.format("No property named '%s' was configured in jbossesb.sar/META-INF/jboss-service.xml for %s", "warFilesDir", getClass().getName());
            throw new DeploymentException(errorMsg);
        }
View Full Code Here


            final String errorMsg = String.format("The directory configured for %s='%s' does not exist.", "warFilesDir", tmpDir);
            throw new DeploymentException(errorMsg);
        }
        // Setup the fourth constructor argument (temp war directory).
        File esbWarFiles = JBossDeployerUtil.createDir(tmpDir, "esbwarfiles");
        bmdBuilder.addConstructorParameter(File.class.getName(), esbWarFiles);
        // Add management annotation.
        bmdBuilder.addAnnotation("@org.jboss.aop.microcontainer.aspects.jmx.JMX(registerDirectly=true, exposedInterface=void.class, name=\"" + mbeanName + "\")");

        // Add default dependencies.
        for (String dependency : defaultDeps)
View Full Code Here

    private BeanMetaData createBeanMetaData(final VFSDeploymentUnit deploymentUnit, final EsbMetaData esbMetaData) throws DeploymentException, IOException
    {
        log.debug(esbMetaData);
        BeanMetaDataBuilder bmdBuilder = BeanMetaDataBuilder.createBuilder(esbBeanPrefix + "." + deploymentUnit.getName(), EsbDeployment.class.getName());
        // Setup the first constructor argument (esb meta data).
        bmdBuilder.addConstructorParameter(EsbMetaData.class.getName(), esbMetaData);
        // Setup the second constructor argument (the name of the mbean).
        final String mbeanName = esbBeanPrefix + ":deployment=" + deploymentUnit.getSimpleName();
        bmdBuilder.addConstructorParameter(String.class.getName(), mbeanName);
        // Setup the third constructor argument (vfs deployment unit).
        bmdBuilder.addConstructorParameter(VFSDeploymentUnit.class.getName(), deploymentUnit);
View Full Code Here

        BeanMetaDataBuilder bmdBuilder = BeanMetaDataBuilder.createBuilder(esbBeanPrefix + "." + deploymentUnit.getName(), EsbDeployment.class.getName());
        // Setup the first constructor argument (esb meta data).
        bmdBuilder.addConstructorParameter(EsbMetaData.class.getName(), esbMetaData);
        // Setup the second constructor argument (the name of the mbean).
        final String mbeanName = esbBeanPrefix + ":deployment=" + deploymentUnit.getSimpleName();
        bmdBuilder.addConstructorParameter(String.class.getName(), mbeanName);
        // Setup the third constructor argument (vfs deployment unit).
        bmdBuilder.addConstructorParameter(VFSDeploymentUnit.class.getName(), deploymentUnit);
        if (warFilesDir == null)
        {
            final String errorMsg = String.format("No property named '%s' was configured in jbossesb.sar/META-INF/jboss-service.xml for %s", "warFilesDir", getClass().getName());
View Full Code Here

        bmdBuilder.addConstructorParameter(EsbMetaData.class.getName(), esbMetaData);
        // Setup the second constructor argument (the name of the mbean).
        final String mbeanName = esbBeanPrefix + ":deployment=" + deploymentUnit.getSimpleName();
        bmdBuilder.addConstructorParameter(String.class.getName(), mbeanName);
        // Setup the third constructor argument (vfs deployment unit).
        bmdBuilder.addConstructorParameter(VFSDeploymentUnit.class.getName(), deploymentUnit);
        if (warFilesDir == null)
        {
            final String errorMsg = String.format("No property named '%s' was configured in jbossesb.sar/META-INF/jboss-service.xml for %s", "warFilesDir", getClass().getName());
            throw new DeploymentException(errorMsg);
        }
View Full Code Here

            final String errorMsg = String.format("The directory configured for %s='%s' does not exist.", "warFilesDir", tmpDir);
            throw new DeploymentException(errorMsg);
        }
        // Setup the fourth constructor argument (temp war directory).
        File esbWarFiles = JBossDeployerUtil.createDir(tmpDir, "esbwarfiles");
        bmdBuilder.addConstructorParameter(File.class.getName(), esbWarFiles);
        // Add management annotation.
        bmdBuilder.addAnnotation("@org.jboss.aop.microcontainer.aspects.jmx.JMX(registerDirectly=true, exposedInterface=void.class, name=\"" + mbeanName + "\")");

        // Add default dependencies.
        for (String dependency : defaultDeps)
View Full Code Here

      AbstractBeanFactory result = getExactBean(name, AbstractBeanFactory.class);
      ConstructorMetaData cmd = result.getConstructor();

      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder("Temp");
      for (Object parameter : parameters )
         builder.addConstructorParameter(null, parameter);
      ConstructorMetaData tempCMD = builder.getBeanMetaData().getConstructor();

      synchronized (result)
      {
         result.setConstructor(tempCMD);
View Full Code Here

    */
   public BeanMetaData getBeanMetaData(VirtualFile root)
   {
      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(getBeanName(), Hibernate.class.getName());
      if (root != null)
         builder.addConstructorParameter(VirtualFile.class.getName(), root);
      builder.addPropertyMetaData("sessionFactoryName", getName());
      if (properties != null && properties.isEmpty() == false)
      {
         for (BaseNamedElement bne : properties)
            builder.addPropertyMetaData(bne.getName(), bne.getValue());
View Full Code Here

            theAliases.add(alias.getAliasValue());
         builder.setAliases(theAliases);
      }
      builder.setMode(mode);
      ValueMetaData injectKernelConfigurator = builder.createInject(KernelConstants.KERNEL_CONFIGURATOR_NAME);
      builder.addConstructorParameter(KernelConfigurator.class.getName(), injectKernelConfigurator);
      if (bean != null)
      {
         builder.addPropertyMetaData("bean", bean);
         // add bean as related class
         builder.addRelatedClass(bean);
View Full Code Here

         contextName = getName() + ":" + getVersion();
      String moduleName = contextName + "$MODULE";
     
      // Create the module
      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(moduleName, VFSClassLoaderPolicyModule.class.getName());
      builder.addConstructorParameter(VFSClassLoaderFactory.class.getName(), this);
      builder.addConstructorParameter(String.class.getName(), moduleName);
      builder.addPropertyMetaData("roots", roots);
      builder.setNoClassLoader();
      builder.addUninstall("removeClassLoader");
      BeanMetaData module = builder.getBeanMetaData();
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.