Accessing application objects from session EJBs
I read about the application configuration framework described in the book and I am very impressed with the design idea behind it. I got a question, though, behind my mind. That is, how can a session EJB gain access the the application objects which are probably initialised in the web tier?
Take for example, the Calendar and BoxOffice objects mentioned in the sample application. If we were to design some EJBs that need access to these two objects, how best can it be achieved?
Passing these objects via the method parameters might not be a very pragmatic way of doing things, as that would mean passing the objects at every method call. On the other hand, creating these objects using the BeanFactory within the EJBs might not be very efficient.
|