So far so good. Yesterday I've finished my persistance comparison with interesting result. To get all employees took 13 seconds using complex O-R mapping with EJB3 but only 70 milliseconds using bare mapping (without relations ie. to get employees means to get data from employees table). I don't know what cause such performance degradation yet but I'll try to find out.
As my second task I've tried interceptors. Pretty feature ! You can intercept any call to EJB (stateless or stateful) and add any functionality to it or supress execution of EJB at all. It's some kind of AOP but without AOP or filter known from servlets. For example at my application I add interceptor which check if you want to get an employee named "Ondra". If so, it will log such attempt and returns an empty Employees object (so one can't get info on me :-))
Now I'm ready to write data provider servlet - the one which will return data to OpenRico AJAX ... and perhaps continue to fix performance of the complex EJB3 mapped entities.
No comments:
Post a Comment