Hello all,

I've been doing some research on how to implement inheritance using CMP. So
far I only found out that I couldn't do it. The spec. model has an Account
Object and 2 classes that inherit this object, the SavingsAccount and the
CheckingsAccount. My datamodel has 3 tables, the account
(accountID,balance), the Savings (accountID,minAmount) and the Checking
(accountID,overdraftAmount). I would like to know if this is possible using
CMP. What I :

- Create AccountBean (EB) and don't specify it in the xml file. Create the
checkingsAccountBean (EB) which remote class extends the remote interface
from the acc.bean  and the bean class itself which extends the acc.bean. In
the checkingbean I set the overdraftAmountfield and I then call the
super.ejbCreate(accountID, balance). This doesn't work because I think the
Acc.bean isn't mapped to the db. It works when I put all the members from
the acc.bean in the checkingaccountbean. But what is the use for inheritance
then?
Is there a way to do this 'elegantly' in CMP?

I also have a non-ejb question which relates to this scenario. I tried to
use (updatable?) views in Oracle to store the data over 2 tables (account
and checking). I think this doesn't work because I use the accountID in both
tables (and only one time in the virtual table CheckingAccount (WHERE
Account.accountID = Checking.AccountID). Is someone familiar with doing
something similar.

Thanks in advance..

Rein Reezigt
Student computer science
Hogeschool Enschede, The Netherlands

===========================================================================
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".

Reply via email to