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
6db32311
Commit
6db32311
authored
15 years ago
by
tpylak
Browse files
Options
Downloads
Patches
Plain Diff
yeastx chromatogram plots: use connection pooling
SVN: 15592
parent
c6b4cce5
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
rtd_yeastx/source/java/ch/systemsx/cisd/openbis/dss/yeastx/server/EICMLChromatogramGeneratorServlet.java
+10
-9
10 additions, 9 deletions
.../dss/yeastx/server/EICMLChromatogramGeneratorServlet.java
with
10 additions
and
9 deletions
rtd_yeastx/source/java/ch/systemsx/cisd/openbis/dss/yeastx/server/EICMLChromatogramGeneratorServlet.java
+
10
−
9
View file @
6db32311
...
@@ -158,36 +158,37 @@ public class EICMLChromatogramGeneratorServlet extends AbstractDatasetDownloadSe
...
@@ -158,36 +158,37 @@ public class EICMLChromatogramGeneratorServlet extends AbstractDatasetDownloadSe
}
}
}
}
// The properties needed for connecting to the database
private
DataSource
dataSource
;
private
Properties
dbProperties
;
@Override
@Override
protected
synchronized
void
doSpecificInitialization
(
Enumeration
<
String
>
parameterNames
,
protected
synchronized
void
doSpecificInitialization
(
Enumeration
<
String
>
parameterNames
,
ServletConfig
servletConfig
)
ServletConfig
servletConfig
)
{
{
// Only initialize the d
b properties
once
// Only initialize the d
ataSource
once
if
(
d
bProperties
!=
null
)
if
(
d
ataSource
!=
null
)
return
;
return
;
dbProperties
=
new
Properties
();
Properties
dbProperties
=
new
Properties
();
String
name
;
String
name
;
while
(
parameterNames
.
hasMoreElements
())
while
(
parameterNames
.
hasMoreElements
())
{
{
name
=
parameterNames
.
nextElement
();
name
=
parameterNames
.
nextElement
();
dbProperties
.
setProperty
(
name
,
servletConfig
.
getInitParameter
(
name
));
dbProperties
.
setProperty
(
name
,
servletConfig
.
getInitParameter
(
name
));
}
}
final
DatabaseConfigurationContext
dbContext
=
DBUtils
.
createAndInitDBContext
(
dbProperties
);
this
.
dataSource
=
dbContext
.
getDataSource
();
}
}
// remember to close the query after using it!
// remember to close the query after using it!
private
IEICMSRunDAO
createQuery
()
private
IEICMSRunDAO
createQuery
()
{
{
return
createQuery
(
d
bProperties
);
return
createQuery
(
d
ataSource
);
}
}
private
static
IEICMSRunDAO
createQuery
(
Properties
properties
)
private
static
IEICMSRunDAO
createQuery
(
DataSource
dataSource
)
{
{
final
DatabaseConfigurationContext
dbContext
=
DBUtils
.
createAndInitDBContext
(
properties
);
DataSource
dataSource
=
dbContext
.
getDataSource
();
return
QueryTool
.
getQuery
(
dataSource
,
IEICMSRunDAO
.
class
);
return
QueryTool
.
getQuery
(
dataSource
,
IEICMSRunDAO
.
class
);
}
}
...
...
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