Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
630119b1
Commit
630119b1
authored
12 years ago
by
brinn
Browse files
Options
Downloads
Patches
Plain Diff
Max max database connections easier to configure.
SVN: 26866
parent
acac2a2c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dbmigration/source/java/ch/systemsx/cisd/dbmigration/BasicDataSourceFactory.java
+14
-0
14 additions, 0 deletions
.../ch/systemsx/cisd/dbmigration/BasicDataSourceFactory.java
with
14 additions
and
0 deletions
dbmigration/source/java/ch/systemsx/cisd/dbmigration/BasicDataSourceFactory.java
+
14
−
0
View file @
630119b1
...
@@ -49,6 +49,10 @@ public class BasicDataSourceFactory implements IDataSourceFactory
...
@@ -49,6 +49,10 @@ public class BasicDataSourceFactory implements IDataSourceFactory
private
int
activeNumConnectionsLogThreshold
=
DEFAULT_ACTIVE_NUM_CONNECTIONS_LOG_THRESHOLD
;
private
int
activeNumConnectionsLogThreshold
=
DEFAULT_ACTIVE_NUM_CONNECTIONS_LOG_THRESHOLD
;
private
boolean
activeNumConnectionLogThresholdIsDefault
=
true
;
private
boolean
maxIdleIsDefault
=
true
;
private
boolean
logStackTraceOnConnectionLogging
=
false
;
private
boolean
logStackTraceOnConnectionLogging
=
false
;
//
//
...
@@ -96,6 +100,7 @@ public class BasicDataSourceFactory implements IDataSourceFactory
...
@@ -96,6 +100,7 @@ public class BasicDataSourceFactory implements IDataSourceFactory
public
void
setMaxIdle
(
int
maxIdle
)
public
void
setMaxIdle
(
int
maxIdle
)
{
{
this
.
maxIdle
=
maxIdle
;
this
.
maxIdle
=
maxIdle
;
this
.
maxIdleIsDefault
=
false
;
}
}
@Override
@Override
...
@@ -108,6 +113,14 @@ public class BasicDataSourceFactory implements IDataSourceFactory
...
@@ -108,6 +113,14 @@ public class BasicDataSourceFactory implements IDataSourceFactory
public
void
setMaxActive
(
int
maxActive
)
public
void
setMaxActive
(
int
maxActive
)
{
{
this
.
maxActive
=
maxActive
;
this
.
maxActive
=
maxActive
;
if
(
activeNumConnectionLogThresholdIsDefault
)
{
this
.
activeNumConnectionsLogThreshold
=
(
int
)
(
0.8
*
maxActive
);
}
if
(
maxIdleIsDefault
)
{
this
.
maxIdle
=
maxActive
;
}
}
}
@Override
@Override
...
@@ -132,6 +145,7 @@ public class BasicDataSourceFactory implements IDataSourceFactory
...
@@ -132,6 +145,7 @@ public class BasicDataSourceFactory implements IDataSourceFactory
public
void
setActiveNumConnectionsLogThreshold
(
int
activeConnectionsLogThreshold
)
public
void
setActiveNumConnectionsLogThreshold
(
int
activeConnectionsLogThreshold
)
{
{
this
.
activeNumConnectionsLogThreshold
=
activeConnectionsLogThreshold
;
this
.
activeNumConnectionsLogThreshold
=
activeConnectionsLogThreshold
;
this
.
activeNumConnectionLogThresholdIsDefault
=
false
;
}
}
@Override
@Override
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment