I'd be grateful to anyone who could spare the time to offer some suggestions for performance improvements with the following.
I have an application running on JBoss 3.2.2RC3 (RedHat Linux).
The core of the application consists of two entity beans, A and B. These implement my interface I. A accesses data that is rarely changed so I have set it be be a read-only bean. B reads data that is changed more frequently so I have set commit-option to B in its configuration.
I create instances of A and B as and when required through a factory (a stateless session bean), returning instances of my interface I.
Bean B makes use of a third bean, C (a stateful session bean) to do some calculations. In turn C requires data and so creates instances of A and B as required through the factory to get at that data.
I have exposed local interfaces on A, B and C. However when I make calls on my interface I to call a method implemented on an A or B bean I am unable to use the local interface (application hangs - no exception thrown) - is this to be expected? Where possible I do use local interfaces (e.g. on calls from B to C)
I have two facades (session beans) for external clients, one acting as a front to the factory and one to bean C functionality.
Beans A, B, C and the factory are deployed in the same jar. The facades are deployed in two further separate jars.
OK - please forgive the complex explanation. Does anyone have any suggestions?
- should A not be an entity bean?
- any possible improvements to my configuration for these beans (or choice of bean type)?
- should the session beans be making calls to the other beans over local interfaces, even though they are in a different jar?
- is it possible to use local interfaces if I am using my interface to treat beans A and B as the same type?
- are there parts of JBoss I am not using that I could switch off?
I am also using a ServiceLocator to cache JNDI lookups, and cacheing the factory interface and beans A and B interfaces in bean C to prevent repeated creation.
Thanks for your time and any response you may have to offer,