Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
sentinel
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
曲欣亮
sentinel
Commits
84b6fd03
Commit
84b6fd03
authored
Jul 30, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
fb7e0f8f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
SqlConcurrentController.java
.../java/com/egolm/sentinel/web/SqlConcurrentController.java
+19
-1
No files found.
src/main/java/com/egolm/sentinel/web/SqlConcurrentController.java
View file @
84b6fd03
...
...
@@ -185,8 +185,26 @@ public class SqlConcurrentController {
dataSource
.
setDriverClassName
(
driverClass
);
dataSource
.
setUsername
(
username
);
dataSource
.
setPassword
(
password
);
dataSource
.
setValidationQuery
(
"select 1"
);
dataSource
.
setValidationQueryTimeout
(
1000
);
dataSource
.
init
();
int
count
=
5
;
while
(!
dataSource
.
isInited
()
&&
count
--
>
0
)
{
try
{
Thread
.
sleep
(
1000L
);
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
}
}
if
(
dataSource
.
isInited
())
{
return
dataSource
;
}
else
{
dataSource
.
close
();
return
null
;
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment