We are evaluating our application server upgrade from 4.2.2 to AS-7
Our product is based on thick client interface (Swing) and communicates to the JBoss application server through Servlet-IO which is part of Java Servlet API. We pass serializable POJO or Value Objects from the thick client to application server hosted in the datacenter via HTTP(S), in the server side Servlet method receives the HTTPRequest and pass-on this HTTP-Request object to common library class called SMConnectionFactory this class strips the Value Object from the HTTPRequest and returs the decompressed version of VO to the servlet back and then servlet will further submits the request to EJB method (Stateless).
During the evaluation of AS7 we have understood that all common-library class should be loaded as Modules and if we define in GlobalModule tag in the standalone-full.xml all EAR application deployed in the AS-7 will get the visibility of that library class to make use of it, we were able to do upto this step, WAR application able to locate the SMConnectionFactory from GlobalModule classloader and delegates the job of stripping VO from the HTTPRequest, but when the SMCOnnectionFactory class strips the VO as an Object getting an error as Classnotfound and showing the original VO class signature. Later we understood that Classloader which loaded the GlobalModule SMConnectionFactory doesnt have the exposure EAR classloader looks like its oneway i.e., EAR can access the GlobalModules, but GlobalMOdules doesnt have access to EAR classes.
Following solutions we tried.
1. Adding the common-library class in the EAR application, it resolved the problem - But we cannot add a common-library class in 700 EAR application, so this solution is not at all practical.
2. Second option was stripping all the 700+ VO classes and make it as single module and added this VO module as a dependent module of SMConnectionFactory common-library module which is already defined as GlobalModule,result is it works. But again this option will not work for our development and maintenance since we go through changes in the VO objects frequently based on the business requirement.
Please throw some idea on this context to resolve this issue so that we can upgrade our product to JBoss 7
We are looking for a solution where the EAR classes should be accessible to this SMConnectionFactory class which is already an GlobalModule.