Stack 2.1 to Stack 2.2 Migration Guide

spinabundantInternet και Εφαρμογές Web

30 Ιουλ 2012 (πριν από 4 χρόνια και 10 μήνες)

286 εμφανίσεις

Stack 2.1 to Stack 2.2 M
igration
G
uide

Default Configuration Changes


Database Driver

Java 6 requires a Java 6 compliant JDBC driver. Oracle only provides an 11g Java 6 compliant driver. So
we must change all Oracle ojdbc14 database driver dependencies
over to 11g.



Group
Id
: com.oracle



ArtifactId: ojdbc6

Stack WS (org.lds.stack.platform:stack
-
ws)



In your project’s pom.xml files that use stack
-
ws the following changes must take place:

o

The stack
-
ws dependency has changed to:



GroupId:
org.lds.stack.ws



Artifa
ctId
:

stack
-
ws
-
spring

o

The following dependency must be added to your pom.xml if it is not already there:



GroupId:
com.sun.org.apache.xerces



ArtifactId:
xercesImpl



C
lassifier
: no
-
services

o

If your stack
-
ws service uses authentication then the following depen
dency must be
added:



GroupId:
org.apache.cxf



ArtifactId:
cxf
-
rt
-
ws
-
security

o

Remove the following dependency from your project:



GroupId: org.lds.stack.integrations



ArtifactId: stack
-
cxf



In your spring config files the namespace handler uris have changed to:

o

http://dev.lds.org/schema/spring/ws

o

http://dev.lds.org/schema/spring/ws/stack
-
ws
-
1.1.xsd



Any instances of using ‘#’ to identify a refe
rence to a bean in the stack
-
ws namespace handlers
must be changed to Spring 3.0 expressions using #{…} syntax.



If you have any secured stack
-
ws:produce handlers you must add the following attribute:
authentication
-
manager
-
ref="authenticationManager"

since

the default for this attribute has
changed.




ServiceProxy



In your spring/service
-
context/serviceBeanContext.xml

o

Add the following ServiceProxy namespace handler



http://dev.lds.org/schema/sprin
g/service
-
proxy



http://dev.lds.org/schema/spring/service
-
proxy/stack
-
service
-
proxy
-
1.1.xsd

o

Any <lds:service
-
proxy/> elements in this file need to become <
service
-
pro
xy:decorate
/>

DB Migration Plugin

We moved the DB Migration tool to Stack 3 and made some minor changes. This will detail the changes
you need to make to your “db” project in order to work with version 3 of the DB Migration tool.



Delete db/assembly.xml



Change db
modules pom.xml

o

Change the

packaging

element

to
stack
-
db
-
migrator

o

Delete the maven
-
assembly
-
plugin plugin definition

o

Change the db plugin definition (org.lds.stack.plugins:maven
-
db
-
plugin) to:



GroupId: org.lds.stack.db



ArtifactId: stack
-
db
-
maven
-
plugin

o

Change the stack
-
db
-
migrator dependency’s groupid to org.lds.stack.db

o

Change the oracle driver from ojdbc14 to ojdbc6.

ACEGI Security Changes

We were unable to upgrade from Acegi to Spring Security in this release because it entailed too many
backwa
rds compatibility issues. That said Acegi should work fine with Spring 3 except for:



@Secured annotations no longer work
s. If this functionality is vital to your project we may be
able to create a patch. Let us know if you need this functionality.

Stack

Remedy

Stack remedy has been removed from Stack 2.2. It is expected that Stack Remedy will eventually be
ported to Stack 3 at which time that would be the version of Stack Remedy you will use in Stack 2.2.
(
https://jira.ldschurch.org/jira/browse/STACK
-
20
36
)

Integration Testing

The “
AbstractTransactionalStackIntegrationTests

.getSpringBean(Class)” method no longer works
reliably. Due to some changes in Spring 3 core it will often return more than one bean now. Because of
this it is recommended that Integ
ration tests be changed to favor the use of @Autowired in the
integration test instead of getSpringBean(Class).

Websphere Deployment

Several changes have been made to the websphere deployment module. Stack 2.2 uses the deploy
module in Stack 3. This is
a list of changes you must make to your deploy project.



Remove maven
-
deployable
-
packaging

extension
” from deploy project pom.xml.



The maven
-
deployable
-
plugin must be changed to the following
:

o

GroupId: org.lds.stack.was

o

ArtifactId: stack
-
was
-
deployable
-
mav
en
-
plugin



The maven
-
automated
-
was
-
plugin has been changed to the following:

o

GroupId: org.lds.stack.plugins

o

ArtifactId: stack
-
was
-
deploy
-
maven
-
plugin



Change the deploy project’s “packaging” value from “stack
-
deployable” to “was
-
deployable”.



In the deploy/
src/main/resources/application.properties file you must change the following
property to use the Java 6 ojdbc driver:

o

jdbc.provider.pool.classpath=${ORACLE_JDBC_DRIVER_PATH}/ojdbc6.jar

Atomikos Changes

If your web project has a stack
-
atomikos dependency ex
plicitly defined in the pom.xml then make the
following changes:



Rename the stack
-
atomikos dependency to:

o

GroupId: org.lds.stack.db

o

ArtifactId: stack
-
atomikos



Add the following dependency:

o

GroupId: com.atomikos

o

ArtifactId: transactions
-
hibernate3

Streams A
Q Changes

If your web project uses Oracle Streams AQ then make the following changes:



Rename the dependency to the following:

o

GroupId: org.lds.stack

o

ArtifactId: stack
-
streams
-
aq
-
spring



In your serviceBeanContext.xml change the namespace to the following:

o

h
ttp://dev.lds.org/schema/spring/streams
-
aq
http://dev.lds.org/schema/spring/streams
-
aq/stack
-
streams
-
aq
-
3.0.xsd

Pseudol10n Changes

Stack 2.2 now uses the Stack 3 Pseudol10
n module.



In the web pom of your project change the pseudol10n plugin definition to the following:

o

GroupId: org.lds.stack

o

ArtifactId: stack
-
pseudol10n
-
maven
-
plugin

Seam Changes

The Stack now uses Seam 2.2.1. Although Seam 2.2.1 is supposed to be backwards

compatible with
Seam 2.0.x there may be some regressions. It is recommended that you fully retest your application
after the upgrade. If you experience problems that you suspect are related to changes in Seam
functionality consult a member of the Stack
team.



The “
seam.display_transaction_failed_message
” property does not work at all anymore. Seam
now provides a different way to add transaction failed messages to a request. If your project is
dependent upon this functionality and has
the above
property

set to “true” in your
defaultContext.proeprties then
consult a member of the Stack team.


Misc Changed and compatibility notes



Due to performance and stability problems
JBossCache is no longer
available
as
a
Hibernate
Second Level Cache



Due to stability p
roblems
JBossCache is disabled by default
. JBoss cache (minus Hibernate
Second Level Caching) can be enabled in your project on request. Consult a member of the
Stack team.



The
seam.disable_imports

property is now “true” by default.