Examples of ConfigPropertyMetaData


Examples of org.jboss.resource.metadata.ConfigPropertyMetaData

   protected void setMcfProperties(Collection properties, boolean mustExist) throws DeploymentException
   {
      for (Iterator i = properties.iterator(); i.hasNext();)
      {
         ConfigPropertyMetaData cpmd = (ConfigPropertyMetaData) i.next();
         String name = cpmd.getName();
         String type = cpmd.getType();
         String value = cpmd.getValue();
         if (name == null || name.length() == 0 || value == null || value.length() == 0)
         {
            log.debug("Not setting config property '" + name + "'");
            continue;
         }
View Full Code Here

Examples of org.jboss.resource.metadata.ConfigPropertyMetaData

      {
         return null;
      }
      else if (localName.equals("config-property"))
      {
         ConfigPropertyMetaData cpmd = new ConfigPropertyMetaData();
         cmd.addProperty(cpmd);
         return cpmd;
      }
      else if (localName.equals("license"))
      {
View Full Code Here

Examples of org.jboss.resource.metadata.ConfigPropertyMetaData

      {
         return null;
      }
      else if (localName.equals("config-property"))
      {
         ConfigPropertyMetaData cpmd = new ConfigPropertyMetaData();
         cdmd.addProperty(cpmd);
         return cpmd;
      }
      // 1.0
      else if (localName.equals("transaction-support"))
View Full Code Here

Examples of org.jboss.resource.metadata.ConfigPropertyMetaData

      {
         return null;
      }
      else if (localName.equals("config-property"))
      {
         ConfigPropertyMetaData cpmd = new ConfigPropertyMetaData();
         aomd.addProperty(cpmd);
         return cpmd;
      }
     
      throw new IllegalArgumentException("Unknown admin object newChild: nuri=" +namespaceURI + " localName=" + localName + " attrs=" + attrs);
View Full Code Here

Examples of org.jboss.resource.metadata.ConfigPropertyMetaData

   {
      ResourceAdapter adapter = createResourceAdapter(ramd.getConnectorMetaData());
     
      for(Iterator iter = ramd.getRaXmlMetaData().getProperties().iterator(); iter.hasNext();)
      {
         ConfigPropertyMetaData cpmd = (ConfigPropertyMetaData)iter.next();
         applyProperty(cpmd, adapter.getClass(), adapter);
        
      }
           
      return adapter;
View Full Code Here

Examples of org.jboss.resource.metadata.ConfigPropertyMetaData

      ResourceAdapter result = (ResourceAdapter) raClass.newInstance();
     
      // Apply the properties
      for (Iterator i = cmd.getProperties().iterator(); i.hasNext();)
      {
         ConfigPropertyMetaData cpmd = (ConfigPropertyMetaData) i.next();
         applyProperty(cpmd, raClass, result);
        
        
      }
     
View Full Code Here

Examples of org.jboss.resource.metadata.ConfigPropertyMetaData

      Collection raProperties = aomd.getProperties();
      if (raProperties != null && raProperties.size() != 0)
      {
         for (Iterator i = raProperties.iterator(); i.hasNext();)
         {
            ConfigPropertyMetaData cpmd = (ConfigPropertyMetaData) i.next();
            String name = cpmd.getName();
            String value = cpmd.getValue();
            if (value != null && value.length() > 0)
            {
               if (properties.containsKey(name))
               {
                  if (trace)
                     log.trace("AdminObject '" + jndiName + "' property=" + name + " IGNORING value=" + value +" specified in MBean properties.");
               }
               else
               {
                  // Load the property class as defined in the meta data
                  String typeName = cpmd.getType();
                  if (trace)
                     log.trace("AdminObject '" + jndiName + "' property=" + name + " loading class=" + typeName);
                  Class type = cl.loadClass(typeName);
                 
                  // Find the property editor for this class
                  PropertyEditor editor = PropertyEditorManager.findEditor(type);
                  if (editor == null)
                     throw new DeploymentException("No property editor found for property '" + name + " class='" + type + "' for admin object '" + interfaceClass + "' ra=" + rarName);
                  editor.setAsText(value);
                  Object object = editor.getValue();
                 
                  try
                  {
                     String setter = "set" + Character.toUpperCase(name.charAt(0));
                     if (name.length() > 1)
                        setter = setter.concat(name.substring(1));
                     Method method = implClass.getMethod(setter, new Class[] { type });
                     if (trace)
                        log.trace("AdminObject '" + jndiName + "' property=" + name + " set=" + object);
                     method.invoke(result, new Object[] { object });
                  }
                  catch (InvocationTargetException e)
                  {
                     DeploymentException.rethrowAsDeploymentException("Error for property '" + name + "' class=" + implClass + "' for admin object '" + interfaceClass + "' ra=" + rarName, e.getTargetException());
                  }
                  catch (Throwable t)
                  {
                     DeploymentException.rethrowAsDeploymentException("Error for property '" + name + "' class=" + implClass + "' for admin object '" + interfaceClass + "' ra=" + rarName, t);
                  }
               }
            }
         }
      }
     
      // Apply the properties
      if (properties != null)
      {
         for (Iterator i = properties.entrySet().iterator(); i.hasNext();)
         {
            Map.Entry property = (Map.Entry) i.next();
            String name = (String) property.getKey();
            String value = (String) property.getValue();
            if (trace)
               log.trace("AdminObject '" + jndiName + "' property=" + name + " value=" + value);
           
            // Pick up the property metadata
            ConfigPropertyMetaData cpmd = aomd.getProperty(name);
            if (cpmd == null)
               throw new DeploymentException("No property '" + name + "' for admin object '" + interfaceClass + "' ra=" + rarName);
            if (trace)
               log.trace("AdminObject '" + jndiName + "' property=" + name + " metadata=" + cpmd);

            // Load the property class as defined in the meta data
            String typeName = cpmd.getType();
            if (trace)
               log.trace("AdminObject '" + jndiName + "' property=" + name + " loading class=" + typeName);
            Class type = cl.loadClass(typeName);
           
            // Find the property editor for this class
View Full Code Here

Examples of org.jboss.resource.metadata.ConfigPropertyMetaData

      attrs[9] = new MBeanAttributeInfo("ReauthenticationSupport", Boolean.TYPE.getName(), "Whether reauthentication support is supported", true, false, false);
      attrs[10] = new MBeanAttributeInfo("ResourceAdapter", ResourceAdapter.class.getName(), "The resource adapter instance", true, false, false);
      int n = 11;
      for (Iterator i = properties.iterator(); i.hasNext();)
      {
         ConfigPropertyMetaData cpmd = (ConfigPropertyMetaData) i.next();
         attrs[n++] = new MBeanAttributeInfo(cpmd.getName(), cpmd.getType(), cpmd.getDescription().getDescription(), true, false, false);
      }
      return attrs;
   }
View Full Code Here

Examples of org.jboss.resource.metadata.ConfigPropertyMetaData

  
   public Object newChild(JBossRAMetaData ramd, UnmarshallingContext navigator, String namespaceURI, String localName, Attributes attrs)
   {     
      if(localName.equals("ra-config-property"))
      {
         ConfigPropertyMetaData cpmd = new ConfigPropertyMetaData();
         ramd.addProperty(cpmd);
         return cpmd;
        
      }     
      else if(localName.equals("depends"))
View Full Code Here

Examples of org.jboss.resource.metadata.ConfigPropertyMetaData

/*     */     {
/*  96 */       return null;
/*     */     }
/*  98 */     if (localName.equals("config-property"))
/*     */     {
/* 100 */       ConfigPropertyMetaData cpmd = new ConfigPropertyMetaData();
/* 101 */       cmd.addProperty(cpmd);
/* 102 */       return cpmd;
/*     */     }
/* 104 */     if (localName.equals("license"))
/*     */     {
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.