Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ProActive
scheduling
Commits
8d2379f7
Unverified
Commit
8d2379f7
authored
Jul 16, 2020
by
Mohamed Boussaa
Committed by
GitHub
Jul 16, 2020
Browse files
Set PCA server DB connection (#3785)
parent
c0434f74
Changes
3
Hide whitespace changes
Inline
Side-by-side
config/pca/database.properties
0 → 100644
View file @
8d2379f7
# Database connection settings.
# To change the database provider, change the driver (hibernate.connection.driver_class),
# the URL (hibernate.connection.url), and don't forget the dialect (hibernate.dialect)
hibernate.connection.driver_class
=
org.hsqldb.jdbc.JDBCDriver
hibernate.connection.url
=
jdbc:hsqldb:hsql://localhost:9001/pca
hibernate.dialect
=
org.hibernate.dialect.HSQLDialect
# Username and password
hibernate.connection.username
=
pca
hibernate.connection.password
=
# The classname of a custom org.hibernate.connection.ConnectionProvider which provides JDBC connections to Hibernate
hibernate.connection.provider_class
=
org.hibernate.hikaricp.internal.HikariCPConnectionProvider
# JDBC connection pool configuration
# https://github.com/brettwooldridge/HikariCP#configuration-knobs-baby
hibernate.hikari.connectionTimeout
=
60000
hibernate.hikari.maximumPoolSize
=
20
hibernate.hikari.transactionIsolation
=
TRANSACTION_READ_COMMITTED
hibernate.hikari.poolName
=
pca
# Enable Hibernate's automatic session context management
hibernate.current_session_context_class
=
thread
# Disable the second-level cache
hibernate.cache.use_second_level_cache
=
false
# Echo all executed SQL to stdout
hibernate.show_sql
=
false
# Behavior of the database schema on startup : validate | update | create | create-drop
hibernate.hbm2ddl.auto
=
update
# Use stream method for binary object: use to store bigger object
hibernate.jdbc.use_streams_for_binary
=
true
scheduler/scheduler-server/src/main/java/org/ow2/proactive/scheduler/util/SchedulerHsqldbStarter.java
View file @
8d2379f7
...
...
@@ -54,6 +54,8 @@ public class SchedulerHsqldbStarter {
private
Path
hibernateCatalogConfiguration
;
private
Path
hibernatePcaConfiguration
;
public
SchedulerHsqldbStarter
()
throws
IOException
{
this
.
hsqldbServer
=
createHsqldbServer
();
configureCatalogs
(
hsqldbServer
,
schedulerHome
);
...
...
@@ -102,10 +104,13 @@ public class SchedulerHsqldbStarter {
"catalog"
,
databaseFileName
);
hibernatePcaConfiguration
=
Paths
.
get
(
schedulerHome
,
schedulerConfigurationFolderName
,
"pca"
,
databaseFileName
);
server
.
addCatalog
(
schedulerDbPath
,
hibernateRmConfiguration
);
server
.
addCatalog
(
schedulerDbPath
,
hibernateSchedulerConfiguration
);
server
.
addCatalog
(
schedulerDbPath
,
hibernateNotificationServiceConfiguration
);
server
.
addCatalog
(
schedulerDbPath
,
hibernateCatalogConfiguration
);
server
.
addCatalog
(
schedulerDbPath
,
hibernatePcaConfiguration
);
}
public
boolean
isServerModeRequired
()
throws
IOException
{
...
...
scheduler/scheduler-server/src/test/java/org/ow2/proactive/scheduler/util/SchedulerHsqldbStarterTest.java
View file @
8d2379f7
...
...
@@ -59,11 +59,11 @@ public class SchedulerHsqldbStarterTest extends ProActiveTestClean {
@Test
public
void
testConfigureCatalogs
()
throws
Exception
{
verify
(
hsqldbServerMock
,
times
(
4
)).
addCatalog
(
Mockito
.<
Path
>
any
(),
Mockito
.<
Path
>
any
());
verify
(
hsqldbServerMock
,
times
(
5
)).
addCatalog
(
Mockito
.<
Path
>
any
(),
Mockito
.<
Path
>
any
());
schedulerHsqldbStarter
.
configureCatalogs
(
hsqldbServerMock
,
"/scheduler/home/"
);
verify
(
hsqldbServerMock
,
times
(
8
)).
addCatalog
(
Mockito
.<
Path
>
any
(),
Mockito
.<
Path
>
any
());
verify
(
hsqldbServerMock
,
times
(
10
)).
addCatalog
(
Mockito
.<
Path
>
any
(),
Mockito
.<
Path
>
any
());
}
@Test
...
...
Mohamed Boussaa
@mboussaa
mentioned in commit
d8cf29f8
·
Aug 04, 2020
mentioned in commit
d8cf29f8
mentioned in commit d8cf29f8722af85d4a55d244a791fd9d8cdd0623
Toggle commit list
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment