Package org.jboss.resource

Examples of org.jboss.resource.JBossResourceException


/*     */   }
/*     */
/*     */   protected void checkException(SQLException e) throws ResourceException
/*     */   {
/* 702 */     connectionError(e);
/* 703 */     throw new JBossResourceException("SQLException", e);
/*     */   }
View Full Code Here


/*  52 */     return this;
/*     */   }
/*     */
/*     */   public XAResource getXAResource() throws ResourceException
/*     */   {
/*  57 */     throw new JBossResourceException("Local tx only!");
/*     */   }
View Full Code Here

/*     */         {
/* 118 */           checkException(e);
/*     */         }
/*     */       }
/*     */       else
/* 122 */         throw new JBossResourceException("Trying to begin a nested local tx");
/*     */     }
/*     */   }
View Full Code Here

/*     */
/*     */   public Object createConnectionFactory(ConnectionManager cm)
/*     */     throws ResourceException
/*     */   {
/*  78 */     if (this.driverClass == null)
/*  79 */       throw new JBossResourceException("driverClass is null");
/*  80 */     if (this.connectionURL == null) {
/*  81 */       throw new JBossResourceException("connectionURL is null");
/*     */     }
/*  83 */     return super.createConnectionFactory(cm);
/*     */   }
View Full Code Here

/*     */     {
/* 204 */       String url = getConnectionURL();
/* 205 */       Driver d = getDriver(url);
/* 206 */       Connection con = d.connect(url, copy);
/* 207 */       if (con == null) {
/* 208 */         throw new JBossResourceException("Wrong driver class for this connection URL");
/*     */       }
/* 210 */       return new LocalManagedConnection(this, con, props, this.transactionIsolation, this.preparedStatementCacheSize);
/*     */     }
/*     */     catch (Exception e) {
/*     */     }
/* 214 */     throw new JBossResourceException("Could not create connection", e);
/*     */   }
View Full Code Here

/* 248 */         this.urlSelector.failedUrlObject(url);
/*     */       }
/*     */
/*     */     }
/*     */
/* 253 */     throw new JBossResourceException("Could not create connection using any of the URLs: " + this.urlSelector.getAllUrlObjects());
/*     */   }
View Full Code Here

/* 434 */     if (trace) {
/* 435 */       this.log.trace("Checking driver for URL: " + url);
/*     */     }
/* 437 */     if (this.driverClass == null)
/*     */     {
/* 439 */       throw new JBossResourceException("No Driver class specified (url = " + url + ")!");
/*     */     }
/*     */
/* 444 */     if (isDriverLoadedForURL(url))
/*     */     {
/* 446 */       return this.driver;
/*     */     }
/*     */
/*     */     try
/*     */     {
/* 452 */       Class clazz = Class.forName(this.driverClass, true, Thread.currentThread().getContextClassLoader());
/* 453 */       if (isDriverLoadedForURL(url))
/*     */       {
/* 455 */         return this.driver;
/*     */       }
/*     */
/* 459 */       this.driver = ((Driver)clazz.newInstance());
/* 460 */       DriverManager.registerDriver(this.driver);
/* 461 */       if (isDriverLoadedForURL(url)) {
/* 462 */         return this.driver;
/*     */       }
/*     */     }
/*     */     catch (Exception e)
/*     */     {
/* 467 */       throw new JBossResourceException("Failed to register driver for: " + this.driverClass, e);
/*     */     }
/*     */
/* 470 */     throw new JBossResourceException("Apparently wrong driver class specified for URL: class: " + this.driverClass + ", url: " + url);
/*     */   }
View Full Code Here

TOP

Related Classes of org.jboss.resource.JBossResourceException

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.