The organization I work for is planning on moving from a legacy Java system to and EJB model. In order to better understand the performance implications of certain aspects of EJBs, we designed a simple test.
I created a non-EJB object to read in about 20 config files and print their contents to the null device. When I did the same with a Session Bean, I found that the bean performed about 4 times faster.
Since the result is counter-intuitive, I was wondering if someone could explain why the Session Bean performed so much better? Is my test bunch of garbage? Does the container perform so super good caching or what?
Thanks in advance,
You could write a log in your session bean ejbCreate() to see how many session objects were created.
If you see more than one that explains it.