460 likes | 1.04k Views
Migrate JBoss Legacy Applications to Oracle WebLogic Server More Simply and Quickly. Roger Freixa & Jesus Guerra Principal Product Manager. Introduction.
E N D
Migrate JBoss Legacy Applications to Oracle WebLogic Server More Simply and Quickly Roger Freixa &Jesus Guerra Principal Product Manager
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.
JBoss Legacy Applications Migration JBoss AS 4, JBoss AS 5, JBoss EAP 5 1 Migration Process 2 Migration Results 3
JBoss Legacy versionsJBoss AS4, JBoss AS 5 end of Full Support
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
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
WebLogic Suite 12c vs JBoss EAP 6Total Cost of Ownership JBoss AS 4, JBoss AS 5, JBoss EAP 5 1 Migration Process Migration Results 2 2
JBoss AS 7 from previous versionsMigration 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
Migration ProcessExact same process in WebLogic 12c and JBoss AS 7 Application Migration Deployment & Lifecycle Installation & Configuration • Net new installation • Services configuration from scratch (JDBC …) • Classloading issues • Frameworks compatibility • Application Testing • Administration & Deployment
Migration Process Installation & Configuration WebLogic 12c (12.1.1) 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 • 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
Migration Process Application Compatibility • Customers provided a simple EAR/WAR file, not the source code • Goal was to complete the migration with none/minimal code changes WebLogic 12c (12.1.1) JBoss 7.1.1 • Classloading issues analysis • Framework Compatibility • Deployment descriptors change • Repackage Applications • Classloading issues analysis • Framework Compatibility • Repackage Applications • Code change (AOP/Hibernate)
WebLogic Suite 12c vs JBoss EAP 6Total Cost of Ownership JBoss AS 4, JBoss AS 5, JBoss EAP 5 3 Migration Process 1 Migration Results 2
Migration Effort Average of 5 applications migrated Average Total Days/Man per App 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 22 JBoss AS 7
Migration Comparison Aggregated Results from JBoss 4/5 to JBoss 7 & WebLogic 12c 6 5 WLS 12c JBoss AS 7 4 4 3 Hibernate Time (days) Clustering 1.5 1.5 1.5 1.5 1.5 1 1 1 Configuration FileDescriptors ClassLoading KnownIssues (frameworks, …) Servicemigration (JMS, EJB, …) AdditionalTricks Codeimpact
Differences in Clustering & Configuration • 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 4 1 Clustering
Differences in Classloading 6 • 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 Classloading
Differences in Classloading (cont’) 6 • JBoss AS 7has 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 isexperiencinglessclassloadingissues and are muchsimplertodiagnose • WebLogic FliteringClassLoader • ClassLoaderAnalysisTool • Betterbacksupport 1.5 Classloading
Differences File Descriptors conversion • 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 File Descriptors
Differences File Descriptors conversion (cont’) • 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 Frameworks
Differences in Framework deployment • 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 Frameworks
Differences in Framework deployment (cont’) • 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.handleConfigException(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 Frameworks
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. 4 Hibernate 1 Code Impact
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.5 1 Service Migration
Service Migration (cont’) • 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.5 1 Service Migration
Additional Migration Tricks • 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. 6 1 Additional items
Take Away - WebLogic perspective Migration • 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 Code Changes • Zero impact in the application code: 5 applications tested with no recoding required Services • Services like JMS, EJB, ...they would need reengineering but the process is well documented
Take Away - JBoss perspective New product • JBoss AS 7 has been completely redesigned. New concepts to learn (domain, new console … ). Code Changes • 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. 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