Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
constantine2nd committed Nov 8, 2023
2 parents b17d0d6 + 2298f5b commit ebc89e9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion obp-api/src/main/scala/bootstrap/liftweb/Boot.scala
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ class Boot extends MdcLoggable {

// Make a transaction span the whole HTTP request
S.addAround(DB.buildLoanWrapper)
logger.info("Note: Http request is in one database transaction.")
logger.info("Note: We added S.addAround(DB.buildLoanWrapper) so each HTTP request uses ONE database transaction.")

try {
val useMessageQueue = APIUtil.getPropsAsBoolValue("messageQueue.createBankAccounts", false)
Expand Down
7 changes: 5 additions & 2 deletions obp-api/src/main/scala/bootstrap/liftweb/CustomDBVendor.scala
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,11 @@ class CustomDBVendor(driverName: String,
if(maxLifetime.isDefined){
config.setMaxLifetime(maxLifetime.head)
}
//Liftweb DB.scala will set all the new connections to false, so here we set default to false
config.setAutoCommit(true)
//Liftweb DB.scala will set all the new connections to false, so here we set default to false - Hmm, check this comment!
val autoCommitValue: Boolean = true
config.setAutoCommit(autoCommitValue)
logger.info(s"We set HikariDatasource config.setAutoCommit=$autoCommitValue")
logger.info(s"Note: HirakiCP will reset any connection to autoCommit=$autoCommitValue when it returns it to the pool if it has been otherwise set in code. (This can cause further debug messages and some performance impact.)")

(dbUser, dbPassword) match {
case (Full(user), Full(pwd)) =>
Expand Down
4 changes: 2 additions & 2 deletions obp-api/src/main/scala/code/api/util/ErrorMessages.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ object ErrorMessages {
// 3) Before adding a new message, check that you can't use one that already exists.
// 4) Use Proper Names for OBP Resources.
// 5) Don't use abbreviations.
// 6) Any messaage defined here should be considered "fair game" to return over the API. Thus:
// 7) Since the existance of "OBP-..." in a message is used to determine if we should display to a user if display_internal_errors=false, do *not* concatenate internal or core banking system error messages to these strings.
// 6) Any message defined here should be considered "fair game" to return over the API. Thus:
// 7) Since the existence of "OBP-..." in a message is used to determine if we should display to a user if display_internal_errors=false, do *not* concatenate internal or core banking system error messages to these strings.


def apiFailureToString(code: Int, message: String, context: Option[CallContext]): String = JsonAST.compactRender(
Expand Down

0 comments on commit ebc89e9

Please sign in to comment.