can we replace Glassfish with Tomcat/OpenEJB for lighter applications? What is the performance of OpenEJB comparing to glassfish as EJB container.
What is the restrictions of OpenEJB instead of glassfish?
Regards
I guess the question is about the runtime environment but still, I don't understand what lighter application does mean. Memory footprint? Startup time? Deployment time? What problem do you actually have? And please define light.
For what it's worth, I consider GlassFish 3 as a light runtime and my experience with it is very positive. From the product data sheet:
Oracle GlassFish Server 3 implements the OSGi runtime, which allows features to be dynamically added to the Java server as needed, and for the smallest possible Java stack to be deployed to support applications. This helps to keep the footprint as small as possible by loading only the modules required to service deployed applications—improving startup time and reducing resource utilization.
Second, I personally don't like the Frankenstein approach, I believe that the glue between all parts that you get with a real application server is part of the added value, that's actually why I use an app server.
Third, I never benched OpenEJB, I used it for testing only and never planned to use it for production, mostly because of its bad reputation. See this comment about Geronimo's performances on TSS (from Hani Suleiman, don't be surprised if it's caustic):
I'd imagine that saying that the EJB tier is 'acceptable' is about the nicest thing you could say.
From what I know, geronimo's ejb code is based off openEJB, which has, historically, bean the worst container you could possibly find. You'd have to look pretty hard to find it too, only to be filled with various degrees of regret/rage once you achieve that dubious goal.
It's not surprising that G's performance will always be sub-par. The frankenstein approach of software building is a great recipe for bad performance. Sure, you'll have lots of pretty diagrams, great looking dependency graphs, and loose coupling. All of which are fairly irrelevant to users who want a coherent appserver that they can treat as a black box.
Things might have changed, OpenEJB has probably improved, at least a bit, but still:
For all these reasons, I wouldn't consider Tomcat+OpenEJB instead of GlassFish, especially if there is no problem to solve.