Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Use different datasources for EJB based on userprofile.

Geir L?ken
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey all!
I'm pretty new to J2EE, and i'm trying to rewrite an old servlet-based web-app to J2EE.
Things started out going very well using CMP, but my first challenge seems to be this:
The application uses two databases (production and training - same datamodel/different data).
If you log in as a production-user, you use the production-database, and if you are a test-user, you use the test-database.
I'm hoping someone can tell me a good way to solve this. If I want to keep using CMP, do I have to make two sets of EJB's - one set for each database? If that's the case, i'm guessing there are better ways.
Any ideas???
Geir L�ken
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic