Folks,

Advice/Opinion needed....

*Context*

I have it working now.  Beans in separate jars and classloaders are 
interoperating as if they were normal Java classes.  Each bean jar 
contains an XML manifest that states its interfaces with the outside 
world.  Whether the bean is local or remote is irrelvant (well in the 
design it is, but I've not implemented the remote bit).

Working, that is, bar a feature that I wanted, but am having trouble 
implementing.  Consider......

interface Person {
  void setName(String s) ;
  String getName();
  void setAddress(Address s);
}
interface PersonFactory {
  Person makePerson();
}
interface Address { 
  void setZipCode(String s) ;
  String getZipCode();
}
interface AddressFactory {
  Address makeAddress();
}

class PersonTest {
  PersonFactory mPersonFactory; // via lookup
  AddressFactory mAddressFactory; // via lookup
  void test() {
    Person p = mPersonFactory.makePerson();
    p.setName("Fred");
    Address a = mAddressFactory.makeAddress();
    a.setZipCode("ABC123");
    p.setAddress(a);
  }
}


The bit I am having trouble with is :
    p.setAddress(a);

Reason - p and a could be sourced from facades that are in different 
places.  Person test has done a specific lookup for the two facades, but 
PersonImpl knows nothing of the locaton or existance of a facade for 
Address.  The EOB infrastructure could esablish the link for the class, 
but it is very difficult and will require changes to AltRMI.

*Question*

Given that we design beans systems carefully along the lines of the 
Facade Pattern and use Value-Objects too at certain boundary points, 
should I try to hard to solve this issue.  I.e. by solving it I could be 
encouraging bad model design.  In conventional beans systems, this would 
be analagous to passing and entity bean reference "as is" through a 
session bean to another session bean or a non bean client application...

I'd be pleased to hear people's opinion, and invite people that are 
*really* intersted to join up [EMAIL PROTECTED] via 
https://sourceforge.net/mail/?group_id=44888

Regards,

- Paul H


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to