aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes access records from 2 table using CMB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "access records from 2 table using CMB" Watch "access records from 2 table using CMB" New topic
Author

access records from 2 table using CMB

krish
Greenhorn

Joined: Nov 05, 2002
Posts: 5
Hi all
I am doing a project of Health Care. Here in my project I am using weblogic 6.1 as server and I am accessing Surgeon and patient tables from database. In this scenario I want to show the details of a patient as report.This report includes Surgeon details and patient status. I want to achieve using CMP. I hope by using CMP I can get the records either Surgeon or patient. I want to get both table records at a time. Any body tell the approach?
Regards,Krish
Simon Brown
sharp shooter, and author
Ranch Hand

Joined: May 10, 2000
Posts: 1913
    
    6
Krish,
Thanks for joining JavaRanch, but could you just take a quick look at the naming policy and edit your profile.
Also, only members with valid names will be eligible for the book giveaways.
Thanks
Simon
Mary Cole
Ranch Hand

Joined: Dec 02, 2000
Posts: 362
Create a view of those 2 tables and access the view using CMP
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
Most CMP implementations won't work on Views -- they're not updatable.
Kyle


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
Sai Prasad
Ranch Hand

Joined: Feb 25, 2002
Posts: 560
Krish,
Create a Session Facade and find the Surgeon and Patient CMP Entity EJBs using the primary key. You can then form a Data Transfer Object which contains both Surgeon and Patient information specific to your requirement.
Mathews P Srampikal
Ranch Hand

Joined: Nov 26, 2002
Posts: 211
Dear Krish,
If you are using ejb1.1 then it is not possible to use in a single CMP.But if you want show the details of doctor as well as the patient.What you can do is.
1. Create 2 cmp(Doctor and Patient)
2. Make a session bean
3. Using that session bean get the deatils of the Doctor and patient and can be displayed.
Try to use coarse-grained style of Accessing rather fine grained.so that you can avoid many network problem.


Thanks,
Mathews
 
Don't get me started about those stupid light bulbs.
 
subject: access records from 2 table using CMB