Package org.jboss.resource.metadata

Examples of org.jboss.resource.metadata.ConnectionDefinitionMetaData


/* 652 */     attributes.add(new MBeanAttributeInfo("AuthenticationMechanismType", String.class.getName(), "The Authentication Mechanism Type", true, false, false));
/* 653 */     attributes.add(new MBeanAttributeInfo("CredentialInterface", String.class.getName(), "The Credential Interface", true, false, false));
/* 654 */     attributes.add(new MBeanAttributeInfo("ReauthenticationSupport", Boolean.class.getName(), "The Reauthentication Support", true, false, true));
/* 655 */     attributes.add(new MBeanAttributeInfo("McfInstance", "javax.resource.spi.ManagedConnectionFactory", "The ManagedConnectionFactory instance", true, false, false));
/*     */
/* 657 */     ConnectionDefinitionMetaData cdmd = this.cmd.getConnectionDefinition(this.connectionDefinition);
/*     */
/* 666 */     MBeanAttributeInfo[] info = (MBeanAttributeInfo[])attributes.toArray(new MBeanAttributeInfo[attributes.size()]);
/* 667 */     return info;
/*     */   }
View Full Code Here


/*     */   }
/*     */
/*     */   protected Object getInternalAttribute(String attribute)
/*     */     throws AttributeNotFoundException, MBeanException, ReflectionException
/*     */   {
/* 710 */     ConnectionDefinitionMetaData cdmd = this.cmd.getConnectionDefinition(this.dmd.getConnectionDefinition());
/*     */
/* 712 */     Object result = null;
/*     */
/* 714 */     if ("RARName".equals(attribute))
/*     */     {
/* 716 */       result = this.rarName;
/*     */     }
/* 718 */     else if ("OldRarDeployment".equals(attribute))
/*     */     {
/* 720 */       result = this.oldRarDeployment;
/*     */     }
/* 722 */     else if ("ConnectionDefinition".equals(attribute))
/*     */     {
/* 724 */       result = this.dmd.getConnectionDefinition();
/*     */     }
/* 726 */     else if ("VendorName".equals(attribute))
/*     */     {
/* 728 */       result = this.cmd.getVendorName();
/*     */     }
/* 730 */     else if ("SpecVersion".equals(attribute))
/*     */     {
/* 732 */       result = this.cmd.getVersion();
/*     */     }
/* 734 */     else if ("EisType".equals(attribute))
/*     */     {
/* 736 */       result = this.cmd.getEISType();
/*     */     }
/* 738 */     else if ("Version".equals(attribute))
/*     */     {
/* 740 */       result = this.cmd.getRAVersion();
/*     */     }
/* 742 */     else if ("ManagedConnectionFactoryClass".equals(attribute))
/*     */     {
/* 744 */       result = cdmd.getManagedConnectionFactoryClass();
/*     */     }
/* 746 */     else if ("ConnectionInterface".equals(attribute))
/*     */     {
/* 748 */       result = cdmd.getConnectionInterfaceClass();
/*     */     }
/* 750 */     else if ("ConnectionFactoryImpl".equals(attribute))
/*     */     {
/* 752 */       result = cdmd.getConnectionFactoryImplementationClass();
/*     */     }
/* 754 */     else if ("ConnectionImplClass".equals(attribute))
/*     */     {
/* 756 */       result = cdmd.getConnectionImplementationClass();
/*     */     }
/* 759 */     else if ("TransactionSupport".equals(attribute))
/*     */     {
/* 761 */       result = this.dmd.getTransactionSupportMetaData();
/*     */     }
View Full Code Here

/*     */   {
/* 297 */     if (this.mcf != null) {
/* 298 */       throw new DeploymentException("Stop the RARDeployment before restarting it");
/*     */     }
/* 300 */     ConnectorMetaData cmd = null;
/* 301 */     ConnectionDefinitionMetaData cdmd = null;
/* 302 */     ResourceAdapter resourceAdapter = null;
/* 303 */     if (this.oldRarDeployment != null)
/*     */     {
/*     */       try
/*     */       {
/* 307 */         resourceAdapter = (ResourceAdapter)getServer().getAttribute(this.oldRarDeployment, "ResourceAdapter");
/* 308 */         cmd = (ConnectorMetaData)getServer().getAttribute(this.oldRarDeployment, "MetaData");
/* 309 */         cdmd = cmd.getConnectionDefinition(this.connectionDefinition);
/* 310 */         if (cdmd == null)
/* 311 */           throw new DeploymentException("ConnectionDefinition '" + this.connectionDefinition + "' not found in rar '" + this.rarName + "'");
/* 312 */         setManagedConnectionFactoryClass(cdmd.getManagedConnectionFactoryClass());
/* 313 */         setReauthenticationSupport(cmd.getReauthenticationSupport());
/*     */       }
/*     */       catch (Exception e)
/*     */       {
/* 317 */         throw new DeploymentException("couldn't get oldRarDeployment! " + this.oldRarDeployment, e);
/*     */       }
/*     */     }
/*     */     try
/*     */     {
/* 322 */       this.mcfClass = Thread.currentThread().getContextClassLoader().loadClass(this.managedConnectionFactoryClass);
/*     */     }
/*     */     catch (ClassNotFoundException cnfe)
/*     */     {
/* 326 */       this.log.error("Could not find ManagedConnectionFactory class: " + this.managedConnectionFactoryClass, cnfe);
/* 327 */       throw new DeploymentException("Could not find ManagedConnectionFactory class: " + this.managedConnectionFactoryClass);
/*     */     }
/*     */
/*     */     try
/*     */     {
/* 332 */       this.mcf = ((ManagedConnectionFactory)this.mcfClass.newInstance());
/*     */     }
/*     */     catch (Exception e)
/*     */     {
/* 336 */       this.log.error("Could not instantiate ManagedConnectionFactory: " + this.managedConnectionFactoryClass, e);
/* 337 */       throw new DeploymentException("Could not instantiate ManagedConnectionFactory: " + this.managedConnectionFactoryClass);
/*     */     }
/*     */
/* 340 */     if (cmd != null)
/*     */     {
/* 343 */       setMcfProperties(cmd.getProperties(), false);
/*     */
/* 345 */       setMcfProperties(cdmd.getProperties(), true);
/*     */     }
/*     */
/* 348 */     setMcfProperties(this.managedConnectionFactoryProperties);
/*     */
/* 350 */     if ((resourceAdapter != null) && ((this.mcf instanceof ResourceAdapterAssociation)))
View Full Code Here

TOP

Related Classes of org.jboss.resource.metadata.ConnectionDefinitionMetaData

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.