File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

access records from 2 table using CMB

 
krish
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1913
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 362
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Create a view of those 2 tables and access the view using CMP
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Most CMP implementations won't work on Views -- they're not updatable.
Kyle
 
Sai Prasad
Ranch Hand
Posts: 560
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 211
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic