/* */ {
/* 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)))