-
Notifications
You must be signed in to change notification settings - Fork 224
Integrate Agroal Datasource pool #1157 #1159
Conversation
Can one of the admins verify this patch? |
1 similar comment
Can one of the admins verify this patch? |
} | ||
|
||
/** | ||
* Are transactions are managed by JTA. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the second "are".
return this; | ||
|
||
} | ||
public boolean isConnectable() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this attribute mean?
|
||
private Duration reapTimeout = ZERO; | ||
|
||
private volatile Duration acquisitionTimeout = ZERO; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wonder why just 2 fields are volatile
?
void noJDBCdriverClass(String className); | ||
|
||
@LogMessage(level = Logger.Level.WARN) | ||
@Message(id = 4 + OFFSET, value = "agroal datasource '%s' specified no JDBC driver, too many to choose from") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does "no JDBC driver, too many to choose from" mean?
void implicitlyUsingDriver(String datasource, String driver); | ||
|
||
@LogMessage(level = Logger.Level.WARN) | ||
@Message(id = 6 + OFFSET, value = "agroal datasource '%s' specified requested tracing, but tracing is not available") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove "specified"?
try { | ||
jndi.bind(metaData.getJNDIName(), dataSource); | ||
} catch (NamingException e) { | ||
e.printStackTrace(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm...
} | ||
if (this.metaData.isXa()) { | ||
if (!XADataSource.class.isAssignableFrom(providerClass)) { | ||
throw new RuntimeException("Driver is not an XA datasource and xa has been configured"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we use the JBoss Logging error mechanism uniformly? Few lines above, we use AgroalMessages.MESSAGES.noJDBCdriverClass
to throw an exception (at least I hope it throws an exception :-) ), but not here.
} | ||
} else { | ||
if (providerClass != null && !DataSource.class.isAssignableFrom(providerClass) && !Driver.class.isAssignableFrom(providerClass)) { | ||
throw new RuntimeException("Driver is an XA datasource and xa has been configured"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error message doesn't make a lot of sense.
|
||
|
||
private final AgroalDataSource delegate; | ||
// private final TracedLocalManagedConnectionFactory mcf; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems unfinished?
/** | ||
* @author kg6zvp | ||
*/ | ||
public class JpaFraction { } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this totally useless? Thorntail v4 has no concept of fractions.
@johnaohara please can you check the review comments about this PR? Thanks! |
Integrate Agroal database connection pool to provide a fast, efficient database connection pool when a full jca compliant database connection pool is not required.