We have an application for which uses Java classes..We are migrating, so as to use EJB.
We have almost completed developing the CMP beans.
Most of the beans are called by JSP and Servlets.
Performance wise both work fine (native classes and EJB), but when it comes to the speed factor, We find EJB's to be slow. I would like to know how can we increase the Speed of our application. We are using Weblogic 5.1 and EJB 1.1 spec.
One more quick question, do we need to make Context to the Bean in all the JSP's or can I make a Context at one place and use it. Some thing like making a context in a global class or JSP.
Consider adding isModified methods and setting db-is-shared to false (if you are not using a cluster) to improve entity beans performance.
It would be better to have utility class which will obtain initial context and EJB home of various deployed beans instead of rewriting the code in JSP/Servlet.
Unless you need security - yes.
JNDI lookups tend to be pretty expensive - speed wise. So it is better, as suggested before, to have some kind of a Factory class to cache your home interfaces.
Another thing that could be tried out is tuning the number of beans in the container.
Let me know about your progress - production level performance is certainly an interesting topic to discuss. I'm also very surprised that you were able to use CMP so often. Could you share your hardware details with us? For instance, what appserver, database, ide & object to RDBMS mapper you have been using? How did you manage to accomplish mutiple table joins (if any?)
We are currently working on Weblogic 5.1, Oracle as our database, and Structure Builder(webgain) as our EJB development tool..We are not performing a table join in our CMP..But most of our Beans are CMP..For a complex query we are using Session Bean..