Migrate JBoss Legacy Apps to WebLogic - ACTIVEevents.com

splattersquadSecurity

Nov 17, 2013 (3 years and 7 months ago)

73 views

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template

1

Migrate JBoss Legacy
Applications to Oracle
WebLogic Server More
Simply and Quickly

Roger Freixa
&

Jesus Guerra

Principal Product Manager


Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template

3

Introduction


This presentation reflects a practical experience of 5 customers
forced to migrate from JBoss AS 4 or JBoss AS 5 to a non
EOLed

version of JBoss


Jesus Guerra (
@
OracleJMGuerra
) and Roger Freixa challenged
them by comparing the migration of the same app to WebLogic 12c
and JBoss AS 7 (EAP 6).


We collected data of each migration and we built a comparison
reflecting both efforts. This presentation includes this results.

Copyright

©

2013, Oracle and/or its affiliates. All rights reserved. |
Confidential


Oracle Restricted


4

JBoss Legacy Applications

Migration

JBoss AS 4, JBoss AS 5, JBoss EAP 5

1

Migration Process

2

Migration Results

3

Copyright

©

2013, Oracle and/or its affiliates. All rights reserved. |
Confidential


Oracle Restricted


5

JBoss Legacy versions

JBoss AS4, JBoss AS 5 end of Full Support

Copyright

©

2013, Oracle and/or its affiliates. All rights reserved. |
Confidential


Oracle Restricted


6

Main reasons exposed to upgrade


Some companies don’t allow to run software EOL


JBoss AS 4 and JBoss AS 5 have some
stability/scalability issues reported for this customers:


EJB remote uses a thread per socket


Clustering is unstable


Deployment is erratic

Copyright

©

2013, Oracle and/or its affiliates. All rights reserved. |
Confidential


Oracle Restricted


7

Main reasons exposed to upgrade (Cont’)


Configuration complexity increase in case of growing
applications (JBoss 5 has 20 xml files spread within
different locations).


JBoss AS 4 only supports up to JDK 1.6


JBoss AS 5 (EAP 5.2) is certified only up to JDK 1.7u10

Copyright

©

2013, Oracle and/or its affiliates. All rights reserved. |
Confidential


Oracle Restricted


8

WebLogic Suite 12c
vs

JBoss EAP 6

Total Cost of Ownership

JBoss AS 4, JBoss AS 5, JBoss EAP 5

1

Migration Results

2

Migration Process

2

Copyright

©

2013, Oracle and/or its affiliates. All rights reserved. |
Confidential


Oracle Restricted


9

JBoss AS 7 from previous versions

Migration or Upgrade?


JBoss AS 7 is a brand new product, with a new core engine, a
new JMS container, a new domain and admin model


JBoss AS 7 hasn’t been build with compatibility with previous
releases in mind, including JBoss proprietary features (Hibernate)


Customers planning to “upgrade” from JBoss AS 4/5 to 7 will


Create new installations from scratch


Learn the new domain & admin model


Learn the new services model (previous services are not reusable)


Migrate applications to be compatible with JBoss AS 7

Copyright

©

2013, Oracle and/or its affiliates. All rights reserved. |
Confidential


Oracle Restricted


10

Migration Process

Exact same process in WebLogic 12c and JBoss AS 7


Classloading

issues


Frameworks
compatibility


Application
Migration


Application
Testing


Administration &
Deployment

Deployment &
Lifecycle


Net new
installation


Services
configuration from
scratch (JDBC …)

Installation &
Configuration

Copyright

©

2013, Oracle and/or its affiliates. All rights reserved. |
Confidential


Oracle Restricted


11

Migration Process

Installation & Configuration


Create domain & cluster using
XML file
config

& command line.


Replicate app environment:


No services compatibility


Define services from
scratch, manually, by editing
some XML files


Copy JDBC drivers

JBoss 7.1.1


Create domain & cluster using
Configuration Wizard


Replicate app environment


Create
Datasources

on Console


Folders configuration (logs,
properties) matching old
env


Add Environment parameters in
WLS command line

WebLogic 12c (12.1.1)

Copyright

©

2013, Oracle and/or its affiliates. All rights reserved. |
Confidential


Oracle Restricted


12

Migration Process


Customers provided a simple EAR/WAR file, not the source code


Goal was to complete the migration with none/minimal code changes


Application Compatibility


Classloading

issues analysis


Framework Compatibility


Repackage Applications


Code change (AOP/Hibernate)

JBoss 7.1.1


Classloading

issues analysis


Framework Compatibility


Deployment descriptors change


Repackage Applications

WebLogic 12c (12.1.1)

Copyright

©

2013, Oracle and/or its affiliates. All rights reserved. |
Confidential


Oracle Restricted


13

WebLogic Suite 12c
vs

JBoss EAP 6

Total Cost of Ownership

Migration Process

1

Migration Results

2

JBoss AS 4, JBoss AS 5, JBoss EAP 5

3

Copyright

©

2013, Oracle and/or its affiliates. All rights reserved. |
Confidential


Oracle Restricted


14

Migration Effort

Average of 5 applications migrated

22

JBoss

AS 7

6.5

WebLogic
12c

Total Days/Man effort based
on a true end
-
to
-
end
migration of 5 production
applications from JBoss 4/5
to JBoss 7 and to WebLogic
12c. Results are average per
application

Average Total
Days/Man per App

Copyright

©

2013, Oracle and/or its affiliates. All rights reserved. |
Confidential


Oracle Restricted


15

Migration Comparison

Aggregated Results from JBoss 4/5 to JBoss 7 & WebLogic 12c

Time (
days
)

Clustering

1

1.5

6

3

1.5

1.5

1.5

1

1.5

5

WLS 12c

JBoss AS 7

4

1

4

Hibernate

Copyright

©

2013, Oracle and/or its affiliates. All rights reserved. |
Confidential


Oracle Restricted


16

Differences in Clustering & Configuration

1

4

Clustering


In general, all the customers complained
about
JBoss AS 4 and 5
clustering, and all
of them had the cluster disabled


JBoss AS 7
clustering documentation was
insufficient and inaccurate


Main issues experienced on JBoss AS 7:


Clustering Monitoring. No visibility or diagnostic
features for the JBoss clustering


Elasticity (scale up easily) completely manual

Copyright

©

2013, Oracle and/or its affiliates. All rights reserved. |
Confidential


Oracle Restricted


17

Differences in
Classloading

Classloading


JBoss AS 7

is including a brand new
classloader, which causes lots of issues on
migration from previous releases:


Old applications: conflicts with old libraries, as
expected (struts
-
1.1.jar). WebLogic was able to deploy
such old libraries with no problem.


New classloader model creates a high number of
"
ClassNotFound
" and "
ClassCastException
" problems.
(
WARN [
org.jboss.as.server.deployment
] (MSC service
thread 1
-
1) JBAS015893: Encountered invalid class
name '
Nombre
=Commons
BeanUtils
' )


Using WebLogic 12c the number of classloader
exceptions was much lower (JBoss 67
vs

WebLogic 8)

1.5

6

Copyright

©

2013, Oracle and/or its affiliates. All rights reserved. |
Confidential


Oracle Restricted


18

Differences in
Classloading

(cont’)

Classloading


JBoss AS 7

has a new packaging model for
applications that requires to solve class loading
problems (no docs available, pure try & fix process,
no tooling included)


jboss
-
web.xml
: class
-
loader elements are not
supported. They have to be removed and
tested


WebLogic 12c
is

experiencing

less

classloading

issues

and are
much

simpler

to

diagnose


WebLogic
FliteringClassLoader


ClassLoader

Analysis

Tool


Better

backsupport

1.5

6

Copyright

©

2013, Oracle and/or its affiliates. All rights reserved. |
Confidential


Oracle Restricted


19

Differences File Descriptors conversion

File Descriptors


WebLogic 12c

some changes


Include a “weblogic.xml”, it can be automatically
generated by OEPE


Changes in “web.xml” are expected (WLS DTD
validation process is more strict), using OEPE to
validate easily deployment descriptors


JBoss AS 7
changes


MANIFEST.MF
: if the application uses some modules,
they have to be declared in this file


ResourceBundle

location has changed. This forces to
modify the location of property files (and test it)

3

1.5

Copyright

©

2013, Oracle and/or its affiliates. All rights reserved. |
Confidential


Oracle Restricted


20

Differences File Descriptors conversion (cont’)

Frameworks


JBoss AS 7
faces some additional migration
problems on well known community
frameworks.


iBatis
:

Change
iBatis

framework configuration
file (JBoss uses "java:/” notation while
WebLogic doesn’t)


Struts
(struts
-
1.1.jar), turn out to create some
classloader conflicts, which haven’t showed up
in
WeLogic
.


WebLogic 12.1.1
was able to deploy such
frameworks with no problem.

3

1.5

Copyright

©

2013, Oracle and/or its affiliates. All rights reserved. |
Confidential


Oracle Restricted


21

Differences in Framework deployment

Frameworks


JBoss & WebLogic:
Spring, JSF and other
usual frameworks are almost present
everywhere, all supported in both App
Servers. Some minor descriptors modification
would be required, usually well documented in
both Application Servers.


JBoss AS 7
supports mainly Hibernate 4.
Applications using Hibernate 3.X should be
upgraded, depending on the cases (3 out of 4
in our case)


WebLogic 12c
can run Hibernate 3 without
major code and package modifications.

1.5

1.5

Copyright

©

2013, Oracle and/or its affiliates. All rights reserved. |
Confidential


Oracle Restricted


22

Differences in Framework deployment (cont’)

Frameworks


WebLogic 12.1.1
parser is more strict than
JBoss one, on this case, one special
descriptor had to be modified:


Problem:
javax.servlet.UnavailableException
: Parsing
error processing resource path at
org.apache.struts.action.ActionServlet.handleConfigEx
ception
(ActionServlet.java:1035)


Modify "struts
-
config.xml" file to avoid this problem:


<?xml version="1.0" encoding="ISO
-
8859
-
1" ?>

<!DOCTYPE struts
-
config

PUBLIC
-
//Apache
Software Foundation//DTD Struts Configuration
1.2//EN
file:///home/oracle/struts
-
config_1_2.dtd
">



Pointing to a local folder where the DTD file is.

1.5

1.5

Copyright

©

2013, Oracle and/or its affiliates. All rights reserved. |
Confidential


Oracle Restricted


23

Code Impact

Code Impact


JBoss AS 7
works well with Hibernate 4. 3 out
of 5 applications had to be upgraded from
Hibernate 3 to 4, as JBoss AS 7 doesn’t
support well Hibernate 3.


JBoss AS 7

dropped support for JBoss AOP.
3 out of the 5 applications had AOP code
included that had to be replaced.



WebLogic 12c
supported all the Hibernate 3
implementations along with the AOP code.

1

4

Hibernate

Copyright

©

2013, Oracle and/or its affiliates. All rights reserved. |
Confidential


Oracle Restricted


24

Service Migration

Service Migration


JBoss AS 7
changed the
Datasource

configuration model, with no backward
compatibility. All the
Datasources

had to be
adapted.


JBoss AS 7

Introduced
Infinispan

as a new
cache model, applications using JBoss Cache
must be migrated


JBoss AS 7
RESTful

services: there is a
checklist to be followed in order to adapt these
services to the new environment

1

1.5

Copyright

©

2013, Oracle and/or its affiliates. All rights reserved. |
Confidential


Oracle Restricted


25

Service Migration (cont’)

Service Migration


JBoss AS 7
changed Security model.
Applications including descriptors with basic
authentication defined on it must be changed
to accomplish the new security model


JBoss AS7
Security domain names changed,
those have to be changed as well.


JBoss AS 7
introduced
HornetQ

as
messaging engine. If the app uses former
messaging system, it must be adapted to the
new service (
config

files and code).


WebLogic 12c
has to define yes or yes the
new services.

1

1.5

Copyright

©

2013, Oracle and/or its affiliates. All rights reserved. |
Confidential


Oracle Restricted


26

Additional Migration Tricks

Additional items


If the JDBC driver consists of more than one JAR, for
example a JAR with the driver and a dependent
license JAR, you can not install the driver as a
deployment. You must install the JDBC driver as a
core module. A few days to find this out.


If you modify the MANIFEST.MF file, make sure to
include a newline character at the end of the file


If you deploy modules as core modules make sure
you do NOT have a space at the beginning of
module.xml file or you will get a "New
missing/unsatisfied dependencies" error for this
driver.

1

6

Copyright

©

2013, Oracle and/or its affiliates. All rights reserved. |
Confidential


Oracle Restricted


27

Take Away

Copyright

©

2013, Oracle and/or its affiliates. All rights reserved. |
Confidential


Oracle Restricted


28

Take Away
-

WebLogic perspective

Services


Services like JMS, EJB, ...they would need
reengineering but the process is well documented


Zero impact in the application code: 5 applications
tested with no recoding required

Code
Changes


Migrate from JBoss 4/5 to WLS 12c is very easy


Migration is mainly a matter of modifying descriptors,
adding new ones, repackage and replacing libraries

Migration

Copyright

©

2013, Oracle and/or its affiliates. All rights reserved. |
Confidential


Oracle Restricted


29

Take Away
-

JBoss perspective

Compatibility


JBoss AS 7 has broken compatibility with majority of
the features that are not part of Java EE


Migration apps from former releases is not seamless


JBoss AS 7 doesn’t support AOP and Hibernate 3
which is a challenge for well established JBoss AS
4/5 applications, very often
using both APIs.

Code
Changes


JBoss AS 7 has been completely redesigned. New
concepts to learn (domain, new console … ).

New
product

30

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.

Insert Information Protection Policy Classification from Slide 12 of the corporate presentation template

31