porting from jboss?
Posted: Fri, 11/14/2008 - 13:02
porting from jboss?
I work for an ISV that has a large enterprise application which we deploy on-top of WebLogic, WebSphere and JBoss at our customers data centers. We have been investigating marketing a hosted SaaS model and I am trying to size the work to move our application onto a Fabric. We do not take advantage of many of the J2EE features of these app-servers. For simplification I am wondering if anyone here has had any experience moving a reasonably complex tomcat based application onto the fabric. If so what are the Gotcha's and Gimmies?
Any and all help is appreciated!








brad4d,
We see a lot of this type of thing, and help customers in making the migration, so we have built up experience along these lines. Below are some of the types of things we do....
Migrating a J2EE (EJBs) application
Session beans:
Entity beans:
If you have custom code in any lifecycle callback methods and interceptors that is weaved in by the application server, this code could weaved in via AspectJ AOP (or Spring AOP) with minimal code changes. For example, @PostConstruct (EJB3) would be replaced with either @AfterReturning (AspectJ or Spring AOP).
Any object/resource dependencies that are injected in a Session/Entity/Message bean by the application container can be easily configured to be injected via Spring (if you are using Spring DI) or some other custom dependency injection framework in the business/data/message objects in the fabric.
Migrating a web application (war)
Presentation layer:
The View/Controller can remain in the war file on a servlet container such as Tomcat.
In the Controller code (for example, Action sub-class in Struts or Controller sub-class in Spring MVC) you can invoke the interface methods exposed on the fabric in ONE of following 2 ways:
OR
If you choose to use the IFabric class, you will need to create and package a Process Flow definition in the above .fabric file.
In the above approach, I've leaned towards defining the business delegates/DAOs as components rather than tasks .
You could choose to define them as tasks if you so desire. Generally it as simple as creating a task module definition file.
A cleaner approach would be to package the business interfaces and domain objects in jars which can then be included in the war file and in the .fabric file.
Package the business delegate and DAO implementations in jars separate from the business delegate interfaces.
I hope this helps. Please let us know if you have additional questions. We could discuss these offline if you so desire with.
- Rosh
OK I think I understand.
We have no Session Beans
We have no Entity Beans
The only thing I need to do is "migrate the WAR"
We have Servlets, JSP, and a whole lot of plain Java behind the Servlets.
We have custom Data Access Layer - Will that pose a problem?
How is the Session object handled? One goal we have is to create session survivability. If the session is left managed in Tomcat then we still have a single point of failure for the session.
Are these complex and time consuming steps that are implemented on a "per-servlet basis"
I am trying to scope the effort give / take a few developer months
The only thing I need to do is "migrate the WAR"
We have Servlets, JSP, and a whole lot of plain Java behind the Servlets.
In the approach detailed in my previous post, the war will only contain servlets and jsps. You would deploy the plain Java code (invoked from servlets) onto the fabric (as components described above). And then from your servlets, you would replace the plain Java code method invocation statement with the IFabric's execute/submit methods.
We have custom Data Access Layer - Will that pose a problem?
That will not be a problem.
If the servlets currently are invoking methods on custom data access layer, these calls would be replaced with the IFabric execute/submit methods.
If the servlets currently are invoking methods on some Plain Old Java Object that is acting as a facade between the servlet and the custom data access layer, then these calls would be replaced with the IFabric execute/submit methods.
How is the Session object handled? One goal we have is to create session survivability. If the session is left managed in Tomcat then we still have a single point of failure for the session.
Which version of Tomcat are you using? Presently you could use the session replication feature that Tomcat provides. See http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html.
Are these complex and time consuming steps that are implemented on a "per-servlet basis"
I am trying to scope the effort give / take a few developer months
I would love to say it would take a few hours :) But without looking at your code, I would basically be pulling out a number out of thin air :) On the other hand, we have worked with clients in the past on projects like these and have built prototypes (along with training) in a couple of days.
Hope this helps.
- R