Hello,
We've started creating an object model that we are going to implement using EJB. I've
come across a fundamental design issue that I'm not sure how to solve. We have two
beans: ControlParamBean and ActivityBean (along with their associated interfaces
ControlParam and Activity). ControlParam has a method called setActivty() that takes
an Activity as an argument. This method will be called from the client. Activity has
a method called addControlParam() that takes a ControlParam argument. The body of
ActivityBean.addControlParam() looks like this:
aControlParam.setActivity(this);
Of course the problem is that setActivity() takes an Activity and "this" is an
ActivityBean. I can't cast it because ActivityBean does not truly implement Activity.
Since the client knows nothing of the ActivityBean class, I can't change
setActivity() to take an ActivityBean either. How should this be handled?
We have originally determined that any object that is stored in the database (and
used by the client) will be an entity bean. Is this not correct?
Thanks,
Tim Pedone
[EMAIL PROTECTED]
Jostens Learning Corp
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".