Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

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 ]
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic