• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EJB3 Caching problem (Toplink)

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey guys,

I`m having an issue with ejb3 in my web app (glassfish v2b58c). I think this is more of an architectural issue, but i`m still not sure how to resolve it.

I have a shopping cart app, that displays a menu on the left. This menu is created from querying the database for all the sections and under it categorys of products available (soft of a quick link).

Section 1
-> Category 1
-> Category 2
-> Category 3
Section 2
-> Category 4

If i update a Category the change shows strait away. I guess toplink cache gets updated with the update operation.

if i create a new Category it doesnt show under the sections, i`ve debug the app and what seems to be the problem is that the cached objects under the section selected doesn`t get updates.

Now i`ve added a piece of code to manually refresh the section from the DB, and this fixed the cached category`s under the section aswell.

Now i would have thought that Toplink would recognize the new object being as being a part of the section selected.

Any suggestions would be welcome.

Thanks
Derick
 
And then we all jump out and yell "surprise! we got you this tiny ad!"
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic