Migration Guide 5.2.1_en - terasolunaorg/terasoluna-gfw GitHub Wiki

Migration guideline from 5.2.0 to 5.2.1

.. only:: html

 .. contents:: Index
    :depth: 2
    :local:

Major changes in 5.2.1

Major changes in 5.2.1 are as below.

  • Changes in some of the specifications in common library
  • Blank project changed

Partial changes in specifications of common library

Some of the specifications of common library for bug modification are changed from 5.2.1 onwards.

  • [#634] @Compare don't display error message for left property in certain cases

Changed in blank project

Configuration file of blank project partially changed from 5.2.1.

  • [single#259] [multi#293] Using DataSourceTransactionManager may be committed on error of commit phase

Process of migration from 5.2.0 to 5.2.1

Migration process is as below.

Note

Legends

Required : Applying the procedure is mandatory
Required by case : Applying the procedure is mandatory under certain conditions
Optional : Applying the procedure is recommended (Procedure to be implemented when required)
- : Applying the procedure is not necessary

[Overall]

.. tabularcolumns:: |p{0.10\linewidth}|p{0.30\linewidth}|p{0.20\linewidth}|p{0.20\linewidth}|p{0.20\linewidth}|
Steps Procedure MavenMultiple Projects MavenSingle Project EclipseWTP Project
Update dependent library Required Required Required

[Spring Framework]

.. tabularcolumns:: |p{0.10\linewidth}|p{0.30\linewidth}|p{0.20\linewidth}|p{0.20\linewidth}|p{0.20\linewidth}|
Steps Procedure MavenMultiple Projects MavenSingle Project EclipseWTP Project
Settings update for rollbackOnCommitFailure option Required by case Required by case Required by case

[Step 1] Update dependent library

Update common library and dependent library of TERASOLUNA Server Framework for Java (5.x).

.. tabularcolumns:: |p{0.35\linewidth}|p{0.25\linewidth}|p{0.25\linewidth}|p{0.15\linewidth}|
Library name Version before update Version after update Remarks
TERASOLUNA Server Framework for Java (5.x) Common Library 5.2.0.RELEASE 5.2.1.RELEASE  

[Cases wherein procedure is required]

The procedure must be applied.

[Step 1-1] When Maven Multiple Projects is used

The update procedure is used for the project created by using mvn archetype.

Revise version of pom file of parent project to 5.2.1.RELEASE.

  • ($YOUR_MULTIPLE_PROJECT_ROOT/pom.xml)
<!-- omitted -->
<parent>
    <groupId>org.terasoluna.gfw</groupId>
    <artifactId>terasoluna-gfw-parent</artifactId>
    <version>5.2.1.RELEASE</version>                    <!-- ### Modification locations ### -->
</parent>
<!-- omitted -->

[Step 1-2] When Maven Single Project is used

The update procedure is used for the project created by using mvn archetype or for the project downloaded from release site.

Revise version of pom file of the project to 5.2.1.RELEASE.

  • ($YOUR_SINGLE_PROJECT/pom.xml)
<!-- omitted -->
<parent>
    <groupId>org.terasoluna.gfw</groupId>
    <artifactId>terasoluna-gfw-parent</artifactId>
    <version>5.2.1.RELEASE</version>                    <!-- ### Modification locations ### -->
</parent>
<!-- omitted -->

[Step 1-3] When Eclipse WTP Project is used

The update procedure is used for Eclipse WTP project downloaded from release site.

For update procedure, refer Update library while using Eclipse WTP Project.

[Step 2] Update settings for rollbackOnCommitFailure option

When an error occurs during commit phase while using DataSourceTransactionManager, the transaction is likely to be committed if the settings are default.

[Cases wherein a procedure is required]

This procedure must be applied when DataSourceTransactionManager is used.

[Modification method]

  • ($YOUR_MULTIPLE_PROJECT_ROOT/projectName-env/src/main/resources/META-INF/spring/projectName-env.xml)
  • ($YOUR_SINGLE_PROJECT/src/main/resources/META-INF/spring/projectName-env.xml)
  • ($YOUR_ECLIPSE_WTP_PROJECT/src/main/resources/META-INF/spring/projectName-env.xml)

rollbackOnCommitFailure property must be set to true.

<bean id="transactionManager"
    class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
    <property name="dataSource" ref="dataSource" />
    <property name="rollbackOnCommitFailure" value="true" />    <!-- ### Additional locations ### -->
</bean>

Appendix for 5.2.1

Update library while using Eclipse WTP Project

The update procedure is used for Eclipse WIP project downloaded from release site.

Note

Legends

[Table header]
Non : A blank project not dependent on O/R Mapper
MB3 : A blank project for MyBatis3
JPA : A blank project for JPA
[Remarks column]
* : Operation target

[Step 1]

Download Eclipse WTP Project of 5.2.1.RELEASE.

[Step 2]

If Eclipse is running, exit Eclipse.

[Step 3]

Update jar file of $YOUR_ECLIPSE_WTP_PROJECT/src/main/webapp/WEB-INF/lib (delete and add).

.. tabularcolumns:: |p{0.25\linewidth}|p{0.30\linewidth}|p{0.30\linewidth}|p{0.05\linewidth}|p{0.05\linewidth}|p{0.05\linewidth}|
Library name Delete file Add file Non MB3 JPA
TERASOLUNA Server Framework for Java (5.x) Common Library terasoluna-gfw-common-5.2.0.RELEASE.jar terasoluna-gfw-common-5.2.1.RELEASE.jar * * *
  terasoluna-gfw-jodatime-5.2.0.RELEASE.jar terasoluna-gfw-jodatime-5.2.1.RELEASE.jar * * *
  terasoluna-gfw-security-web-5.2.0.RELEASE.jar terasoluna-gfw-security-web-5.2.1.RELEASE.jar * * *
  terasoluna-gfw-web-5.2.0.RELEASE.jar terasoluna-gfw-web-5.2.1.RELEASE.jar * * *
  terasoluna-gfw-web-jsp-5.2.0.RELEASE.jar terasoluna-gfw-web-jsp-5.2.1.RELEASE.jar * * *

[Step 4]

Update jar file of $YOUR_ECLIPSE_WTP_PROJECT/testlib (delete and add).

.. tabularcolumns:: |p{0.25\linewidth}|p{0.30\linewidth}|p{0.30\linewidth}|p{0.05\linewidth}|p{0.05\linewidth}|p{0.05\linewidth}|
Library name Delete file Add file Non MB3 JPA
Hamcrest   hamcrest-library-1.3.jar * * *

[Step 5]

Update jar file for storing source of $YOUR_ECLIPSE_WTP_PROJECT/libsrc (delete and add).

.. tabularcolumns:: |p{0.25\linewidth}|p{0.30\linewidth}|p{0.30\linewidth}|p{0.05\linewidth}|p{0.05\linewidth}|p{0.05\linewidth}|
Library name Delete file Add file Non MB3 JPA
TERASOLUNA Server Framework for Java (5.x) Common Library terasoluna-gfw-common-5.2.0.RELEASE-sources.jar terasoluna-gfw-common-5.2.1.RELEASE-sources.jar * * *
  terasoluna-gfw-jodatime-5.2.0.RELEASE-sources.jar terasoluna-gfw-jodatime-5.2.1.RELEASE-sources.jar * * *
  terasoluna-gfw-security-web-5.2.0.RELEASE-sources.jar terasoluna-gfw-security-web-5.2.1.RELEASE-sources.jar * * *
  terasoluna-gfw-web-5.2.0.RELEASE-sources.jar terasoluna-gfw-web-5.2.1.RELEASE-sources.jar * * *
  terasoluna-gfw-web-jsp-5.2.0.RELEASE-sources.jar terasoluna-gfw-web-jsp-5.2.1.RELEASE-sources.jar * * *
Hamcrest   hamcrest-library-1.3-sources.jar * * *

[Step 6]

Update reference library by using a substitution string.

  • $YOUR_ECLIPSE_WTP_PROJECT/.classpath
  • $YOUR_ECLIPSE_WTP_PROJECT/build.xml
.. tabularcolumns:: |p{0.25\linewidth}|p{0.30\linewidth}|p{0.30\linewidth}|p{0.05\linewidth}|p{0.05\linewidth}|p{0.05\linewidth}|
Library name Characters for substitution Substitution characters Non MB3 JPA
TERASOLUNA Server Framework for Java (5.x) Common Library terasoluna-gfw-common-5.2.0.RELEASE terasoluna-gfw-common-5.2.1.RELEASE * * *
  terasoluna-gfw-jodatime-5.2.0.RELEASE terasoluna-gfw-jodatime-5.2.1.RELEASE * * *
  terasoluna-gfw-security-web-5.2.0.RELEASE terasoluna-gfw-security-web-5.2.1.RELEASE * * *
  terasoluna-gfw-web-5.2.0.RELEASE terasoluna-gfw-web-5.2.1.RELEASE * * *
  terasoluna-gfw-web-jsp-5.2.0.RELEASE terasoluna-gfw-web-jsp-5.2.1.RELEASE * * *
Hamcrest   hamcrest-library-1.3 * * *

[Step 7]

Add reference library to settings of Eclipse WTP project (under jar file).

  • $YOUR_ECLIPSE_WTP_PROJECT/.classpath
  • $YOUR_ECLIPSE_WTP_PROJECT/build.xml
.. tabularcolumns:: |p{0.30\linewidth}|p{0.55\linewidth}|p{0.05\linewidth}|p{0.05\linewidth}|p{0.05\linewidth}|
Library name Prefix of jar file to be added Non MB3 JPA
Hamcrest hamcrest-library-1.3 * * *

[Modification method]

.classpath

<!-- ### Following class path entry must be added ### -->

<!-- omitted -->

 <classpathentry kind="lib"
    path="testlib/hamcrest-library-1.3.jar"
    sourcepath="libsrc/hamcrest-library-1.3-sources.jar" />

<!-- omitted -->

build.xml

<!-- ### Following class path entry must be added ### -->

<path id="build.classpath">
    <!-- omitted -->
    <pathelement location="${testlib.dir}/hamcrest-library-1.3.jar"/>
    <!-- omitted -->
</path>
⚠️ **GitHub.com Fallback** ⚠️