Package org.jboss.managed.plugins

Examples of org.jboss.managed.plugins.ManagedObjectImpl


         throw new IllegalArgumentException("Null managed object");
     
      if (managedObject instanceof ManagedObjectImpl == false)
         throw new IllegalStateException("Unable to create object " + managedObject.getClass().getName());
     
      ManagedObjectImpl managedObjectImpl = (ManagedObjectImpl) managedObject;
      Serializable object = createUnderlyingObject(managedObjectImpl, clazz);
      populateManagedObject(managedObject, object);
   }
View Full Code Here


   public void populateManagedObject(ManagedObject managedObject, Serializable object)
   {
      if (managedObject instanceof ManagedObjectImpl == false)
         throw new IllegalStateException("Unable to populate managed object " + managedObject.getClass().getName());
     
      ManagedObjectImpl managedObjectImpl = (ManagedObjectImpl) managedObject;
      managedObjectImpl.setAttachment(object);
      populateValues(managedObjectImpl, object);
   }
View Full Code Here

/* 112 */       ManagedObject mo = new ServiceManagedObject(attachName, dsMetaData, this.propertyNameMappings);
/* 113 */       ManagedObject wrapMO = WrapperAdvice.wrapManagedObject(mo);
/* 114 */       map.put(attachName, wrapMO);
/*     */
/* 116 */       attachName = "FakeConnectionFactoryDeployer.datasource-type";
/* 117 */       ManagedObjectImpl typeMO = new ManagedObjectImpl(attachName);
/* 118 */       DefaultFieldsImpl f21 = new DefaultFieldsImpl();
/* 119 */       f21.setName("datasource-type");
/* 120 */       f21.setDescription("The type of the DataSource");
/* 121 */       f21.setMandatory(true);
/* 122 */       f21.setValue("local-tx-datasource");
/* 123 */       HashSet values = new HashSet();
/* 124 */       values.add(SimpleValueSupport.wrap("local-tx-datasource"));
/* 125 */       values.add(SimpleValueSupport.wrap("no-tx-datasource"));
/* 126 */       values.add(SimpleValueSupport.wrap("xa-datasource"));
/* 127 */       f21.setLegalValues(values);
/* 128 */       f21.setMetaType(SimpleMetaType.STRING);
/* 129 */       ManagedPropertyImpl dsType = new ManagedPropertyImpl(typeMO, f21);
/* 130 */       typeMO.getProperties().put("datasource-type", dsType);
/* 131 */       wrapMO = WrapperAdvice.wrapManagedObject(typeMO);
/* 132 */       map.put(attachName, wrapMO);
/*     */     }
/*     */   }
View Full Code Here

/* 123 */       throw new IllegalStateException("Unsupported dsType: " + this.dsType);
/*     */   }
/*     */
/*     */   private void createXaDsTemplate()
/*     */   {
/* 128 */     ManagedObjectImpl mo = new ManagedObjectImpl(XADataSourceDeploymentMetaData.class.getName());
/* 129 */     addDsProperties(mo);
/* 130 */     addManagedProperty("xa-datasource-class", "The xa datasource class name", true, SimpleMetaType.STRING, mo);
/* 131 */     addManagedProperty("xa-datasource-properties", "The xa datasource properties", false, METATYPE_FACTORY.resolve(getMapType()), mo);
/* 132 */     addManagedProperty("url-property", "The URL property", true, SimpleMetaType.STRING, mo);
/* 133 */     addManagedProperty("xa-resource-timeout", "The XA resource timeout", true, SimpleMetaType.INTEGER, new Integer(0), mo);
View Full Code Here

/* 133 */     addManagedProperty("xa-resource-timeout", "The XA resource timeout", true, SimpleMetaType.INTEGER, new Integer(0), mo);
/*     */   }
/*     */
/*     */   private void createLocalTxDsTemplate()
/*     */   {
/* 138 */     ManagedObjectImpl mo = new ManagedObjectImpl(LocalDataSourceDeploymentMetaData.class.getName());
/* 139 */     addNonXADsProperties(mo);
/*     */   }
View Full Code Here

/* 139 */     addNonXADsProperties(mo);
/*     */   }
/*     */
/*     */   private void createNoTxDsTemplate()
/*     */   {
/* 144 */     ManagedObjectImpl mo = new ManagedObjectImpl(NoTxDataSourceDeploymentMetaData.class.getName());
/* 145 */     addNonXADsProperties(mo);
/*     */   }
View Full Code Here

/* 145 */     addNonXADsProperties(mo);
/*     */   }
/*     */
/*     */   private void createTxCfTemplate()
/*     */   {
/* 150 */     ManagedObjectImpl mo = new ManagedObjectImpl(TxConnectionFactoryDeploymentMetaData.class.getName());
/* 151 */     addCommonProperties(mo);
/* 152 */     addManagedProperty("xa-resource-timeout", "The XA resource timeout", true, SimpleMetaType.INTEGER, new Integer(0), mo);
/* 153 */     addManagedProperty("xa-transaction", "", true, SimpleMetaType.BOOLEAN, mo);
/*     */   }
View Full Code Here

/* 153 */     addManagedProperty("xa-transaction", "", true, SimpleMetaType.BOOLEAN, mo);
/*     */   }
/*     */
/*     */   private void createNoTxCfTemplate()
/*     */   {
/* 158 */     ManagedObjectImpl mo = new ManagedObjectImpl(NoTxConnectionFactoryDeploymentMetaData.class.getName());
/* 159 */     addCommonProperties(mo);
/*     */   }
View Full Code Here

/*  81 */     this.propertyNameMappings = propertyNameMappings;
/*     */   }
/*     */
/*     */   public void start()
/*     */   {
/*  86 */     ManagedObjectImpl mo = new ManagedObjectImpl(this.attachmentName);
/*     */
/*  88 */     DefaultFieldsImpl f0 = new DefaultFieldsImpl();
/*  89 */     setFieldName("jndi-name", f0);
/*  90 */     f0.setDescription("The jndi name to bind the DataSource under");
/*  91 */     f0.setMandatory(true);
/*  92 */     f0.setMetaType(SimpleMetaType.STRING);
/*  93 */     ManagedPropertyImpl jndiName = new ManagedPropertyImpl(mo, f0);
/*  94 */     super.addProperty(jndiName);
/*     */
/*  96 */     DefaultFieldsImpl f1 = new DefaultFieldsImpl();
/*  97 */     setFieldName("connection-url", f1);
/*  98 */     f1.setDescription("The jdbc url of the DataSource");
/*  99 */     f1.setMandatory(true);
/* 100 */     f1.setMetaType(SimpleMetaType.STRING);
/* 101 */     ManagedPropertyImpl conURL = new ManagedPropertyImpl(mo, f1);
/* 102 */     super.addProperty(conURL);
/*     */
/* 104 */     DefaultFieldsImpl f2 = new DefaultFieldsImpl();
/* 105 */     setFieldName("user-name", f2);
/* 106 */     f2.setDescription("The username for the connection-url");
/* 107 */     f2.setMandatory(false);
/* 108 */     f2.setMetaType(SimpleMetaType.STRING);
/* 109 */     ManagedPropertyImpl user = new ManagedPropertyImpl(mo, f2);
/* 110 */     super.addProperty(user);
/*     */
/* 112 */     DefaultFieldsImpl f3 = new DefaultFieldsImpl();
/* 113 */     setFieldName("password", f3);
/* 114 */     f3.setDescription("The password for the connection-url");
/* 115 */     f3.setMandatory(false);
/* 116 */     f3.setMetaType(SimpleMetaType.STRING);
/* 117 */     ManagedPropertyImpl password = new ManagedPropertyImpl(mo, f3);
/* 118 */     super.addProperty(password);
/*     */
/* 120 */     DefaultFieldsImpl f4 = new DefaultFieldsImpl();
/* 121 */     setFieldName("security-domain", f4);
/* 122 */     f4.setDescription("The security-domain used to validate connections");
/* 123 */     f4.setMandatory(false);
/* 124 */     f4.setMetaType(SimpleMetaType.STRING);
/* 125 */     ManagedPropertyImpl secDomain = new ManagedPropertyImpl(mo, f4);
/* 126 */     super.addProperty(secDomain);
/*     */
/* 128 */     DefaultFieldsImpl f5 = new DefaultFieldsImpl();
/* 129 */     setFieldName("driver-class", f5);
/* 130 */     f5.setDescription("The jdbc driver class name");
/* 131 */     f5.setMandatory(true);
/* 132 */     f5.setMetaType(SimpleMetaType.STRING);
/* 133 */     ManagedPropertyImpl driverClass = new ManagedPropertyImpl(mo, f5);
/* 134 */     super.addProperty(driverClass);
/*     */
/* 136 */     DefaultFieldsImpl f6 = new DefaultFieldsImpl();
/* 137 */     setFieldName("connection-properties", f6);
/* 138 */     f6.setDescription("The jdbc driver connection properties");
/* 139 */     f6.setMandatory(false);
/* 140 */     String[] itemNames = { "conn-prop1", "conn-prop2" };
/* 141 */     String[] itemDescriptions = { "conn-prop1 description", "conn-prop2 description" };
/* 142 */     MetaType[] itemTypes = { SimpleMetaType.STRING, SimpleMetaType.STRING };
/* 143 */     CompositeMetaType propsType = new ImmutableCompositeMetaType("java.lang.Properties", "DS connection properties", itemNames, itemDescriptions, itemTypes);
/*     */
/* 145 */     f6.setMetaType(propsType);
/* 146 */     ManagedPropertyImpl connProps = new ManagedPropertyImpl(mo, f6);
/* 147 */     super.addProperty(connProps);
/*     */
/* 150 */     ManagedObjectImpl mo2 = new ManagedObjectImpl(this.dsTypeAttachmentName);
/* 151 */     DefaultFieldsImpl f21 = new DefaultFieldsImpl();
/* 152 */     setFieldName("datasource-type", f21);
/* 153 */     f21.setDescription("The type of the ConnectionFactory");
/* 154 */     f21.setMandatory(true);
/* 155 */     f21.setValue("local-tx-datasource");
View Full Code Here

/* 92 */       ManagedObject mo = new ServiceManagedObject(attachName, dsMetaData, this.propertyNameMappings);
/* 93 */       ManagedObject wrapMO = WrapperAdvice.wrapManagedObject(mo);
/* 94 */       map.put(attachName, wrapMO);
/*    */
/* 96 */       attachName = "FakeConnectionFactoryDeployer.datasource-type";
/* 97 */       ManagedObjectImpl typeMO = new ManagedObjectImpl(attachName);
/* 98 */       DefaultFieldsImpl f21 = new DefaultFieldsImpl();
/* 99 */       f21.setName("datasource-type");
/* 100 */       f21.setDescription("The type of the DataSource");
/* 101 */       f21.setMandatory(true);
/* 102 */       f21.setValue("local-tx-datasource");
/* 103 */       HashSet values = new HashSet();
/* 104 */       values.add(SimpleValueSupport.wrap("local-tx-datasource"));
/* 105 */       values.add(SimpleValueSupport.wrap("no-tx-datasource"));
/* 106 */       values.add(SimpleValueSupport.wrap("xa-datasource"));
/* 107 */       f21.setLegalValues(values);
/* 108 */       f21.setMetaType(SimpleMetaType.STRING);
/* 109 */       ManagedPropertyImpl dsType = new ManagedPropertyImpl(typeMO, f21);
/* 110 */       typeMO.getProperties().put("datasource-type", dsType);
/* 111 */       wrapMO = WrapperAdvice.wrapManagedObject(typeMO);
/* 112 */       map.put(attachName, wrapMO);
/*    */     }
/*    */   }
View Full Code Here

TOP

Related Classes of org.jboss.managed.plugins.ManagedObjectImpl

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.