Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Alignment API
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
moex
Alignment API
Commits
73891c9c
Commit
73891c9c
authored
18 years ago
by
Jérôme Euzenat
Browse files
Options
Downloads
Patches
Plain Diff
- fixed error on close
- solved user/pasword/database stuff
parent
9ef6e363
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/fr/inrialpes/exmo/align/service/DBServiceImpl.java
+4
-6
4 additions, 6 deletions
src/fr/inrialpes/exmo/align/service/DBServiceImpl.java
with
4 additions
and
6 deletions
src/fr/inrialpes/exmo/align/service/DBServiceImpl.java
+
4
−
6
View file @
73891c9c
...
...
@@ -35,11 +35,10 @@ public class DBServiceImpl implements DBService{
Connection
conn
=
null
;
static
String
IPAddress
=
"localhost"
;
static
String
port
=
"3306"
;
static
String
user
=
"
root
"
;
static
String
database
=
""
;
static
String
user
=
"
adminAServ
"
;
static
String
database
=
"
AServDB
"
;
String
driverPrefix
=
"jdbc:mysql"
;
Statement
st
=
null
;
ResultSet
rs
=
null
;
Cache
cache
=
null
;
public
DBServiceImpl
()
throws
ClassNotFoundException
,
InstantiationException
,
IllegalAccessException
{
...
...
@@ -67,7 +66,7 @@ public class DBServiceImpl implements DBService{
}
public
void
connect
(
String
IPAddress
,
String
port
,
String
user
,
String
password
)
throws
SQLException
{
conn
=
DriverManager
.
getConnection
(
driverPrefix
+
"://"
+
IPAddress
+
":"
+
port
+
"/
DBService"
,
user
,
password
);
conn
=
DriverManager
.
getConnection
(
driverPrefix
+
"://"
+
IPAddress
+
":"
+
port
+
"/
"
+
database
,
user
,
password
);
st
=
(
Statement
)
conn
.
createStatement
();
}
...
...
@@ -97,9 +96,8 @@ public class DBServiceImpl implements DBService{
try
{
conn
.
close
();
st
.
close
();
rs
.
close
();
}
catch
(
Exception
ex
)
{
System
.
out
.
println
(
"DB Closing Error"
);
ex
.
printStackTrace
(
);
}
}
...
...
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