Are you using EJB3 in JBoss AS? JBoss AS's EJB3/JPA implementation is based on Hibernate, which can use JBoss Cache as a 2nd level cache. I'd recommend enabling caching for your entities.
Refer to http://www.hibernate.org/hib_docs/annotations/reference/en/html/entity.html#d0e2911 for details.
I'm using the EJB entity cache already. But I wanted to just cache other pojos which are only useful for the life of a user session without persisting to the db. Making a bunch of unnecesary inserts and updates is killing my applications performance.
I've had a crack at it and created i new thread.
Still having problems with setting this up so any help would be greatly appreciated.