Dear All
I'm not sure if this is a Jonas specific problem or simply an EJB problem
but we have unsatisfactory performance when using CMP Entity beans.
We have a tree structure search within a session bean and using entity beans
to do the search (the two methods at the end of the enclosed file that are
remmed out) the search takes about 8 seconds. Using JDBC code acccess the
database directly and bypass the entity beans (four methods under 'Op
implementation' in the java file , no entity bean access) the search takes
about 1 second (if that). Both tests are run on the same machine with the
same data.
All the entity beans called in the slow search are setup as TX_REQUIRED so I
presume it's not the transaction manager slowing things down. I know that
with CMP there are a lot of SELECT statements issued to synchronise the
entity beans and the database but does this allow for the huge difference in
performance? I have tried using the isModified feature but that doesn't seem
to make a difference either.
I enclose a copy of the session bean implementation with both search
implementations. There is only one remote method in this bean, the
getEmployeesForUnit() method. Both search implementations return exactly the
same data.
Regards
Robert Hargreaves
<<VariationsImpl.java>>
VariationsImpl.java