Package org.jboss.resource.metadata

Examples of org.jboss.resource.metadata.ConnectorMetaData


/*    */
/* 74 */     URL rar = Thread.currentThread().getContextClassLoader().getResource(this.rarName);
/* 75 */     JarFile rarFile = new JarFile(rar.getFile());
/* 76 */     ZipEntry entry = rarFile.getEntry("META-INF/ra.xml");
/*    */
/* 78 */     ConnectorMetaData metaData = (ConnectorMetaData)unmarshaller.unmarshal(rarFile.getInputStream(entry), factory, null);
/*    */
/* 81 */     return metaData;
/*    */   }
View Full Code Here


/*     */
/*     */   public ServiceConstructorMetaData buildConstructor(ManagedConnectionFactoryDeploymentMetaData mcfmd)
/*     */   {
/*  79 */     ServiceConstructorMetaData constructor = new ServiceConstructorMetaData();
/*     */
/*  81 */     ConnectorMetaData md = this.repository.getConnectorMetaData(mcfmd.getRarName());
/*  82 */     if (md == null)
/*  83 */       throw new IllegalStateException("No ConnectorMetaData found for mdf rarName: " + mcfmd.getRarName());
/*  84 */     constructor.setParameters(new Object[] { md, mcfmd });
/*  85 */     constructor.setSignature(new String[] { md.getClass().getName(), ManagedConnectionFactoryDeploymentMetaData.class.getName() });
/*  86 */     return constructor;
/*     */   }
View Full Code Here

/*     */   protected void startService() throws Exception
/*     */   {
/* 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);
View Full Code Here

/*     */
/*     */   public ConnectorMetaData getConnectorMetaData(String name)
/*     */   {
/* 121 */     JCAConnectorMetaDataKey entry = new JCAConnectorMetaDataKey(name);
/* 122 */     entry.setName(name);
/* 123 */     ConnectorMetaData md = getConnectorMetaData(entry);
/* 124 */     return md;
/*     */   }
View Full Code Here

TOP

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

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.