This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Svelte and Sapper in Action and have Mark Volkmann on-line!
See this thread for details.
Win a copy of Svelte and Sapper in Action this week in the JavaScript 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

CMP db Access

Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi again,

Is it possible to access more then one DB via CMP inside the same EJB container?

Maybe another issue:
Is it possible to cache some Entities readonly for failsavety reasons?

Currently i search for a possibility to hold some tables as local cache being accessible for all Cliens. When the db disapears, this might give me the possibility to server clients till the db failover is completed.

I know that several ejb calls will fail, because they need write access. But i also know that my app might be able to serve some client types without the db.

So for example a small outdated h2 in-memory db will be already enough for my purpose. But i dont know if its possible to share this db with all connected clients.

thx for feedback
Bernhard Neuhauser
Ranch Hand
Posts: 775
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your CMP *layer* can use multiple databases, but any one CMP *bean* can only use a single database. Having read-only beans could possibly protect you from short outages if the *only* usages during that time period are read-only (i.e. no change events progated from a read/write version of the same bean), but only until you hit whatever refresh event your read-only beans have been configured to implement. If you need transparent failover, you might want to look into databases that provide transparent failover with a JDBC driver supporting that feature (e.g. Oracle RAC).
[ February 15, 2006: Message edited by: Reid M. Pinchback ]
Bernhard Neuhauser
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thx ) exactly what i wanted to know

The db behind is already clustered. Still, there might be some "circumstances" where the db will be unavailable for some minutes. The own appserver will still try to serve some clients.

The fallback cmps are readonly in this case. Okay there will be updates from another app, but i think im able to trigger the refresh event when an update occours.

Yeah, but how did the squirrel get in there? Was it because of the tiny ad?
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic