The M-H book also suggests that you not expos the remote interface to
your entity beans. I think I tend to agree with this: Only the Session
beans should be visiblie to the outside world, and the entity beans
should just be the persistance mechanism. However, since JBoss does not
require you to provide an implementation of the Home interface, you have
no way of avoiding doing the JNDI lookup. Or do you? Is there a way you
can take advantage of CMP without having to provide a remote interface?
Kar YEOW wrote:
>The relationship stuff is in EJB2.0 and it is still in DRAFT. It is not yet
>supported in JBOSS.
>Kar
>----- Original Message -----
>From: "Richard Kasperowski" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Tuesday, June 19, 2001 7:34 AM
>Subject: [JBoss-user] How to specify relationships between CMP EJBs?
>
>
>I'm trying to understand how container managed persistence make this
>happen. I have two EJBs like so:
>
>-----
>public interface Foo extends EJBObject {
> Long getId() throws RemoteException;
> void setId(Long param) throws RemoteException;
> String getName() throws RemoteException;
> void setName(String param) throws RemoteException;
> Bar getBar() throws RemoteException;
> void setBar(Bar param) throws RemoteException;
>}
>
>public interface Bar extends EJBObject {
> Long getId() throws RemoteException;
> void setId(Long param) throws RemoteException;
> String getName() throws RemoteException;
> void setName(String param) throws RemoteException;
>}
>-----
>
>The idea here is that a Foo has a Bar. The Bar must already exist.
>
>I want this to work through CMP. I can't quite figure out how to tell
>JBoss that there's a relationship between Foo and Bar. I've been
>playing around with the tags "relationships" and "cmr-field", but I
>haven't been able to get it right.
>
>Does anyone have an example that I could follow?
>
>Thanks,
>
>--
>Richard Kasperowski (mailto:[EMAIL PROTECTED])
>Tel: 617-576-1552, Fax: 617-576-2441
>http://www.altisimo.com/
>
>
>_______________________________________________
>JBoss-user mailing list
>[EMAIL PROTECTED]
>http://lists.sourceforge.net/lists/listinfo/jboss-user
>
>
>_______________________________________________
>JBoss-user mailing list
>[EMAIL PROTECTED]
>http://lists.sourceforge.net/lists/listinfo/jboss-user
>
>
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user