• 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

Entity Query behaving differently when making local Session bean call vs remote sessi

 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We have two physical servers in load balancing (P1 & P2).

I am caching my entity using Entity Tree cache.

When I call my session bean locally (server p1) to get list of all the records for that entity, it works fine. I get any new rows added to the database table or any updates to a row data. This also automatically refreshes my local cache (server p1).

Now when I make a remote call to get list of records another server (p2) having the same code base, I do not get the newly added rows or updaets, and nor is mthe cache refreshed on that server (p2).

I am calling the same session bean method both the times. Any ideas why this discrepancies?

p.s. both the server point to the same database.

Thanks,
Peter
 
Ranch Hand
Posts: 457
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
#1 trace it in the debugger and see what you find

#2 show us some code if you want our help

How To Ask Qs
 
Peter Vennel
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When I do refManager.getDmvStateList() (using local call p1 to p1), I get all the data from the database loaded into my cache.

When I do refManager.getDmvStateList() (using remote call p1 to p2), I do not get all the data from the database loaded into my cache.

Scenario #1
New rows can be added by either of the servers using the same code
base in the app server.

Scenario #2
Plain sql update through sqlplus.


Please refer to the code snippets below:

DmvState.java



RefManagerSessionBean.java


ejb3-entity-cache-service.xml

[ January 31, 2008: Message edited by: Peter Vennel ]
 
No one can make you feel inferior without your consent - Eleanor Roosevelt. tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic