I would love to get opinions on this.  The example is a bit contrived, but 
hopefully it will get across what I'm after.

Let's say we have a doctor EJB3:


  | @Stateless
  | public class DoctorBean implements Doctor
  | {
  |    public Patient getPatient(String patientNumber);
  | }
  | 

Now, in addition to some basic information, Patient has a lot of complex data 
coming from, say, a database.  I'm thinking that Patient should also be an EJB. 
 That way I'm not getting the hi-res image of every X-ray taken of them 
needlessly serialized, when all I wanted is the last date of X-ray.

The problem I see with this design is that it works great as long as the client 
is local.  If I want to access this remotely, then I have to create an entirely 
different DoctorBean (DoctorRemoteBean) so that the Patient is also a 
RemotePatient.


  | @Stateless
  | public class DoctorRemoteBean implements RemoteDoctor
  | {
  |    public RemotePatient getPatient(String patientNumber);
  | }
  | 

Does this make sense?

Thanks,
Mike

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3895243#3895243

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3895243


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to