jboss will do a fair bit of this cacheing behind the scenes for you. However if that will be fast enough will depend on your situation. A good idea is to only get the data from the ejb once, via say, a getValueObject() method. Theres plenty of docs around if your keen to really get into it
Sorry... I don't follow...
Let's assume that I have a stateless session bean that a consumer is using to exercise some business logic.
This stateless session bean needs to use an entity bean. But this session bean is going to be called at a such a frequency that it would make sense to have the entity bean always available in memory for rapid access.
If I was writing this as a non-EJB session I'd probably make the enity bean a static class data field.
Rather than hoping that JBoss do this sort of thing for me, is there a specific technique I can employ to ensure that the entity bean is always cached?
The entity is cached in case of commit option A (see the spec). This works if all your access to the underlying database is executed through the app server. JBoss also implements a commit option D that allows refresh from db upon a given interval. See the JBoss documentation for more info on this option.
These assuming the data your accessing is not read-only.