• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

how to cache a CMP-Bean

 
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic