File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JBoss and the fly likes how to cache a CMP-Bean Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » JBoss
Reply Bookmark "how to cache a CMP-Bean" Watch "how to cache a CMP-Bean" New topic
Author

how to cache a CMP-Bean

Kay Tracid
Ranch Hand

Joined: Mar 06, 2002
Posts: 148
Hi,

i have a cmp bean "Minfo" and get my results in my client this way:



Every time i call a get-Function, JBoss make a database query, like this:

Executing SQL: SELECT filename, extension, disk, size, id3title, id3artist, id3length, id3bitrate FROM minfo WHERE (id=?)

is it possible to get the information for all get-functions with one sql-call for each bean? is it possible to configure my bean or jboss for this behavior?

i have a performance problem if i call a lot of get-Methods.

Thanks a lot!
Nathaniel Stoddard
Ranch Hand

Joined: May 29, 2003
Posts: 1258
There are some synchronization settings that you set when you deploy. "Optimistic", etc -- I forget the others. Check out some JBoss documentation. If you use a more lax setting, it may only need to do one select, and your gets can actually return the cached information.


Nathaniel Stodard<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS, ICAD, ICSD, ICED
 
 
subject: how to cache a CMP-Bean
 
Threads others viewed
JBoss CMP read ahead cache problem
javax.ejb.CreateException
Mapping an EB CMP to more than one Table
EJBQL with dates / CMP BLOB Problem
Example of primary key class?
IntelliJ Java IDE