T
Taras_96
Hi all
I'm reading Enterprise JavaBeans, 4th Edition. To explain relationship
fields, they use the example of a CustomerBean having a 1-1
relationship with an AddressBean.
In Chapter 6.5, the book states that:
"The Address EJB is a fine-grained business object that should always
be accessed in the context of another entity bean, which means it
should have only local interfaces and not remote interfaces"
What does the author mean by fine grained?
The CustomerBean defines:
public abstract AddressLocal getHomeAddress( );
public abstract void setHomeAddress(AddressLocal address);
Later the book states that:
" The remote interface of a bean is not allowed to expose its
relationship fields. In the case of the homeAddress field, we have
declared the type to be AddressLocal, which is a local interface, so
the setHomeAddress( )/getHomeAddress( ) accessors cannot be declared
in the remote interface of the Customer EJB"
Now, is it not allowed to expose the relationship fields because
that's the way it was defined (the accessor methods take and return
AddressLocal interfaces), or because it is a requirement that *no*
remote interfaces expose relationship fields?
Thanks
Taras
I'm reading Enterprise JavaBeans, 4th Edition. To explain relationship
fields, they use the example of a CustomerBean having a 1-1
relationship with an AddressBean.
In Chapter 6.5, the book states that:
"The Address EJB is a fine-grained business object that should always
be accessed in the context of another entity bean, which means it
should have only local interfaces and not remote interfaces"
What does the author mean by fine grained?
The CustomerBean defines:
public abstract AddressLocal getHomeAddress( );
public abstract void setHomeAddress(AddressLocal address);
Later the book states that:
" The remote interface of a bean is not allowed to expose its
relationship fields. In the case of the homeAddress field, we have
declared the type to be AddressLocal, which is a local interface, so
the setHomeAddress( )/getHomeAddress( ) accessors cannot be declared
in the remote interface of the Customer EJB"
Now, is it not allowed to expose the relationship fields because
that's the way it was defined (the accessor methods take and return
AddressLocal interfaces), or because it is a requirement that *no*
remote interfaces expose relationship fields?
Thanks
Taras