Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB 2.0 Finder using distributed query  RSS feed

 
Naveen Sampra
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have two data sources DS1, DS2. They both map to two physically seperate databases. Say an EJB 2.0 CMP bean, "Vendor" maps to the vendor table in DS2.

A vendor can use multiple login ids. The login ids are stored in a user table which is created in DS1. The relationship between vendor and user is NOT maintained at the database level.



How do I write a finder off "VendorHome" interface that joins login_id column in "vendor" to login_id column of the "user" table located in DS1. I need to retrieve all user records that have a matching login_id in vendor table. The finder should return a collection User entity beans.


Any ideas ?
[ April 12, 2005: Message edited by: Naveen Sampra ]
 
Mudi Appu
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In order to have CMR relation ship between user (entity bean) and vendor (entity bean) you DO NOT need to maintain relation at the database level. Write a CMR relationship between vendor and user.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!