Relevant changes
Changes in SyncopeConf table
As per SYNCOPE-457, the SMTP server configuration is defined in the mail.properties
file.
Consequently, the rows withe the following four keys in the SyncopeConf
table are no longer used and can be removed:
smtp.host
smtp.port
smtp.username
smtp.password
The following properties should be defined in the mail.properties
file, providing appropriate values.
smtpHost=none.syncope.apache.org smtpPort=25 smtpUser=syncope smtpPassword=secret smtpProtocol=smtp smtpEncoding=UTF-8 smtpConnectionTimeout=3000 mailDebug=true
Additionally other smtp protocol configuration properties can be specified as defined by the java mail spec
Suggested procedure
Make the TODO tab empty
- Approve or reject any pending approval
- Manage any pending user request
Backup
Make full backup of
- the internal storage
- your 1.1.X project's (the one created from archetype) sources
- configured bundles and logs directories
- Save Notification "about" and "recipients", upgrade sets default values for these fileds due to radical change to Notification object from 1.1.X to 1.2.X.
The new 1.2.X project
- create a new 1.2.X project
- copy any existing Java class you have developed for the former 1.1.X project and make necessary adaptations
- include any connector bundle you might have added in the former 1.1.X project
- configure the internal storage as done for the former 1.1.X project
Perform custom SQL upgrade
At this point you need to manually perform some SQL changes according to the description above.
An example of such changes is reported for MySQL and PostgreSQL (this file is also included in resources of core-upgrader
module of the project): the set of SQL statements you need to run vary depending on the DBMS used for internal storage.
Change content.xml leaving only new Entitlements
This procedure is high recommended if using PostgreSQL database, but it's good practice to use it for all DBMS.
Change new 1.2.X project content file, located under core/src/main/resources/content.xml, leaving only new Entitlements introduced with 1.2.X version, you can delete (or comment) all other Entitlements, already stored on database.
Below there is the list of Entitlements introduced with 1.2.X version:
- SCHEMA_LIST
- ROLE_LIST
- RESOURCE_LIST
- CONFIGURATION_EXPORT
- CONFIGURATION_SET
Enable ContentUpgrader
In core/src/main/resources/persistenceContext.xml add (at the end of file) before </beans>:
<import resource="classpath*:upgradeContext.xml"/>
In core/pom.xml add following dependency from core-upgrader module:
<dependency> <groupId>org.apache.syncope</groupId> <artifactId>syncope-core-upgrader</artifactId> <version>${syncope.version}</version> </dependency>
Build, deploy and run
Build project, deploy to choosen container and run it. The first run should log exceptions about ContentInitializer (in particular about creation of resources, connectors, etc), but this is normal.
You should now have full access to all Syncope 1.2.X features and at this point Syncope is fully-working and container has no need to be restarted.
Nevertheless is recommended to deploy again Syncope (upgraded) project without core-upgrader dependency and modified persistenceContext.xml, in fact if container is started with "enabled" core-upgrader, some exceptions will be noticed due to failure of upgrade task; but despite this few exceptions (after restart) no persistent changes are made to Syncope 1.2.X and it remains in a solid and working state.
Therefore following steps are optional (but recommended):
Stop the JEE container and follow steps below.
Disable ContentUpgrader
In core/src/main/resources/persistenceContext.xml
remove last import:
<import resource="classpath*:upgradeContext.xml"/>
and from core/pom.xml remove dependency from core-upgrader added two steps before.
Build, deploy and run
This final run should log no exceptions and you can enjoy all Syncope 1.2.X new amazing features!