Note | ||
---|---|---|
| ||
The content below is for Apache Syncope <= 1.2 - for later versions check the "System Administration" chapter of the Reference Guide. |
Table of Contents | ||
---|---|---|
|
...
Code Block |
---|
quartz.sql=tables_mysql.sql |
...
MariaDB
Code Block |
---|
jpa.driverClassName=oracleorg.mariadb.jdbc.OracleDriverDriver jpa.url=jdbc:oraclemariadb:thin:@localhost:1521:orcl//localhost:3306/syncope?characterEncoding=UTF-8 jpa.username=syncope jpa.password=syncope jpa.dialect=org.apache.openjpa.jdbc.sql.OracleDictionaryMariaDBDictionary jpa.pool.validationQuery=SELECT 1 #note: other connection pool settings can also be configured here, see persistenceContext.xml quartz.jobstore=org.quartz.impl.jdbcjobstore.oracle.OracleDelegateStdJDBCDelegate quartz.sql=tables_oraclemariadb.sql audit.sql=audit_oracle.sql database.schema=SYNCOPE |
This assumes that you have an Oracle a MariaDB instance running on localhost, listening on its default port 1521 3306 with a database syncope
under tablespace SYNCOPE
fully database syncope
fully accessible by user syncope
user syncope
with password syncope
syncope
.
You will also need to
create directory
Code Block core/src/main/resources/META-INF
- download Oracle mapping file for the version you are building (1.1.X, 1.0.X)
rename it to
Code Block orm.xml
and copy it under the directory created above
Microsoft SQL Server
Oracle
Code Block |
---|
jpa.driverClassName=oracle.jdbc.OracleDriver
jpa.url=jdbc:oracle:thin:@localhost:1521:orcl
jpa.username=syncope
jpa.password=syncope
jpa.dialect=org.apache.openjpa.jdbc.sql.OracleDictionary
jpa.pool.validationQuery=SELECT 1 FROM DUAL
#note: other connection pool settings can also be configured here, see persistenceContext.xml
quartz.jobstore=org.quartz.impl.jdbcjobstore.oracle.OracleDelegate
quartz.sql=tables_oracle.sql
audit.sql=audit_oracle.sql
database.schema=SYNCOPE
|
Code Block |
jpa.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
jpa.url=jdbc:sqlserver://localhost:1344;database=syncope;selectMethod=cursor;sendStringParametersAsUnicode=false
jpa.username=syncope
jpa.password=syncope
jpa.dialect=org.apache.openjpa.jdbc.sql.SQLServerDictionary
jpa.pool.validationQuery=SELECT 1
#note: other connection pool settings can also be configured here, see persistenceContext.xml
quartz.jobstore=org.quartz.impl.jdbcjobstore.MSSQLDelegate
quartz.sql=tables_sqlServer.sql
audit.sql=audit_sqlserver.sql
database.schema=
|
This assumes that you have an SQL Server Oracle instance running on localhost, listening on its default port 1344 1521 with a database syncope
under tablespace SYNCOPE
fully accessible by user syncope
with password syncope
.
...
create directory
Code Block core/src/main/resources/META-INF
- download MS SQL Server Oracle mapping file for the version you are building (1_2_X, 1.1.X, 1.0.X)
rename it to
Code Block orm.xml
and copy it under the directory created above
JEE container
Apache Tomcat 7
This assumes that you have got Apache Tomcat 7 installed in directory $CATALINA_HOME
.
Note | ||
---|---|---|
| ||
If you have installed Apache Tomcat 7 via Debian / Ubuntu package, you will also need to
|
Set Environment
GNU / Linux - Mac OS X
Create $CATALINA_HOME/bin/setenv.sh
with content (keep everything on a single line).
Code Block |
---|
JAVA_OPTS="-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server \
-Xms1536m -Xmx1536m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m \
-XX:MaxPermSize=256m -XX:+DisableExplicitGC" |
Windows
Create %CATALINA_HOME%\bin\setenv.bat
with content (keep everything on a single line).
Code Block |
---|
set JAVA_OPTS=-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server
-Xms1536m -Xmx1536m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m
-XX:MaxPermSize=256m -XX:+DisableExplicitGC |
context.xml
Uncomment <Manager pathname="" />
in $CATALINA_HOME/conf/context.xml
.
Optionally, define a datasource for internal storage (following example is for MySQL): please check that the connection parameters are same as configured above.
Code Block |
---|
<Resource name="jdbc/syncopeDataSource" auth="Container" type="javax.sql.DataSource"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" testWhileIdle="true"
testOnBorrow="true" testOnReturn="true" validationQuery="SELECT 1" validationInterval="30000"
maxActive="100" minIdle="2" maxWait="10000" initialSize="2" removeAbandonedTimeout="20000"
removeAbandoned="true" logAbandoned="true" suspectTimeout="20000"
timeBetweenEvictionRunsMillis="5000" minEvictableIdleTimeMillis="5000"
jdbcInterceptors="org.apache.tomcat.jdbc.pool.interceptor.ConnectionState;org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer"
username="syncope" password="syncope" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/syncope?characterEncoding=UTF-8"/>
|
Be sure to put the JDBC driver JAR file under $CATALINA_HOME/lib
for the Datasource you have defined above.
Glassfish 4.1
Update core glassfish-web.xml
When using a datasource for internal storage, be sure to add
Code Block |
---|
<resource-ref>
<res-ref-name>jdbc/syncopeDataSource</res-ref-name>
<jndi-name>jdbc/syncopeDataSource</jndi-name>
</resource-ref>
|
assuming that your Glassfish instance provides a datasource named jdbc/syncopeDataSource
.
right after </context-root>
in core/src/main/webapp/WEB-INF/glassfish-web.xml
.
JBoss AS 7.1
Note | ||
---|---|---|
| ||
Content of this paragraph applies to Apache Syncope < 1.2.0 |
Download this file, copy it under core/src/main/resources/
and replace
Code Block | ||
---|---|---|
| ||
<entry key="openjpa.MetaDataFactory" value="org.apache.syncope.core.persistence.openjpa.JBossPersistenceMappingFactory(URLs=vfs:${project.build.directory}/cargo/configurations/jboss71x/deployments/${project.build.finalName}.war/WEB-INF/classes/, Resources=META-INF/orm.xml)"/> |
with
...
Microsoft SQL Server
Code Block |
---|
jpa.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
jpa.url=jdbc:sqlserver://localhost:1344;database=syncope;selectMethod=cursor;sendStringParametersAsUnicode=false
jpa.username=syncope
jpa.password=syncope
jpa.dialect=org.apache.openjpa.jdbc.sql.SQLServerDictionary
jpa.pool.validationQuery=SELECT 1
#note: other connection pool settings can also be configured here, see persistenceContext.xml
quartz.jobstore=org.quartz.impl.jdbcjobstore.MSSQLDelegate
quartz.sql=tables_sqlServer.sql
audit.sql=audit_sqlserver.sql
database.schema=
|
This assumes that you have an SQL Server instance running on localhost, listening on its default port 1344 with a database syncope
fully accessible by user syncope
with password syncope
.
You will also need to
create directory
Code Block core/src/main/resources/META-INF
- download MS SQL Server mapping file for the version you are building (1_2_X, 1.1.X, 1.0.X)
rename it to
Code Block orm.xml
and copy it under the directory created above
JEE container
Apache Tomcat 7
This assumes that you have got Apache Tomcat 7 installed in directory $CATALINA_HOME
.
Note | ||
---|---|---|
| ||
If you have installed Apache Tomcat 7 via Debian / Ubuntu package, you will also need to
|
Set Environment
GNU / Linux - Mac OS X
Create $CATALINA_HOME/bin/setenv.sh
with content (keep everything on a single line).
Code Block |
---|
JAVA_OPTS="-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server \
-Xms1536m -Xmx1536m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m \
-XX:MaxPermSize=256m -XX:+DisableExplicitGC" |
Windows
Create %CATALINA_HOME%\bin\setenv.bat
with content (keep everything on a single line).
Code Block |
---|
set JAVA_OPTS=-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server
-Xms1536m -Xmx1536m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m
-XX:MaxPermSize=256m -XX:+DisableExplicitGC |
context.xml
Uncomment <Manager pathname="" />
in $CATALINA_HOME/conf/context.xml
.
Optionally, define a datasource for internal storage (following example is for MySQL): please check that the connection parameters are same as configured above.
Code Block | ||
---|---|---|
| ||
<Resource name="jdbc/syncopeDataSource" auth="Container" type="javax.sql.DataSource"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" testWhileIdle="true"
testOnBorrow="true" testOnReturn="true" validationQuery="SELECT 1" validationInterval="30000"
maxActive="100" minIdle="2" maxWait="10000" initialSize="2" removeAbandonedTimeout="20"
removeAbandoned="true" logAbandoned="true" suspectTimeout="20"
timeBetweenEvictionRunsMillis="5000" minEvictableIdleTimeMillis="5000"
jdbcInterceptors="org.apache.tomcat.jdbc.pool.interceptor.ConnectionState;org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer"
username="syncope" password="syncope" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/syncope?characterEncoding=UTF-8"/>
|
Be sure to put the JDBC driver JAR file under $CATALINA_HOME/lib
for the Datasource you have defined above.
Glassfish 4.1
Update core glassfish-web.xml
When using a datasource for internal storage, be sure to add
Code Block | ||
---|---|---|
| ||
<resource-ref>
<res-ref-name>jdbc/syncopeDataSource</res-ref-name>
<jndi-name>jdbc/syncopeDataSource</jndi-name>
</resource-ref>
|
assuming that your Glassfish instance provides a datasource named jdbc/syncopeDataSource
.
right after </context-root>
in core/src/main/webapp/WEB-INF/glassfish-web.xml
.
JBoss AS 7.1
Note | ||
---|---|---|
| ||
Content of this paragraph applies to Apache Syncope < 1.2.0 |
Download this file, copy it under core/src/main/resources/
and replace
Code Block | ||
---|---|---|
| ||
<entry key="openjpa.MetaDataFactory" value="org.apache.syncope.core.persistence.openjpa.JBossPersistenceMappingFactory(URLs=vfs:${project.build.directory}/cargo/configurations/jboss71x/deployments/${project.build.finalName}.war/WEB-INF/classes/, Resources=META-INF/orm.xml)"/> |
with
Code Block | ||
---|---|---|
| ||
<entry key="openjpa.MetaDataFactory" value="org.apache.syncope.core.persistence.openjpa.JBossPersistenceMappingFactory(URLs=vfs:/content/${project.build.finalName}.war/WEB-INF/classes/, Resources=META-INF/orm.xml)"/> |
Fixing error messages at core startup
When core application starts up you will see many yet harmless error messages and stacktraces: this is due to an internal mechanism that looks for custom implementations of standard Apache Syncope interfaces.
If you want to remove such messages you can provide an override of the org.apache.syncope.core.init.ImplementationClassNamesLoader
class: see an example here.
Wildfly 8.1
Note | ||
---|---|---|
| ||
Content of this paragraph applies to Apache Syncope >= 1.2.X |
Download this file, copy it under core/src/main/resources/
and replace
Code Block | ||
---|---|---|
| ||
<entry key="openjpa.MetaDataFactory" value=" |
...
jpa(URLs=vfs: |
...
${project.build. |
...
directory} |
...
/ |
...
cargo/ |
...
configurations/jboss71x/deployments/${project.build.finalName}.war/WEB-INF/classes/, Resources=META-INF/orm.xml)"/>
|
with
Wildfly 8.1
Note | ||
---|---|---|
| ||
Content of this paragraph applies to Apache Syncope >= 1.2.X |
Download this file, copy it under core/src/main/resources/
and replace
Code Block | ||
---|---|---|
| ||
<entry key="openjpa.MetaDataFactory" value="jpa(URLs=vfs:${project.build.directory}/cargo/configurations/jboss71x/deployments/URLs=vfs:/content/${project.build.finalName}.war/WEB-INF/classes/, Resources=META-INF/orm.xml)"/> |
with
...
language | xml |
---|
...
/, Resources=META-INF/orm.xml)"/>
|
Fixing error messages at core startup
When core application starts up you will see many yet harmless error messages and stacktraces: this is due to an internal mechanism that looks for custom implementations of standard Apache Syncope interfaces.
If you want to remove such messages you can provide an override of the org.apache.syncope.core.init.ImplementationClassNamesLoader
class: see an example here.
Use DataSource
When using a DataSource, a few additional adjustments are needed.
...