Not Bank accounts
A company(owner of the software) has created accounts for all clients and agents that do bussiness with them. The client and agent accounts are independent(No diff in the modelling).
I had thought of making a transaction ejb (entity with CMP) as follows:
Transaction(transID, accountID, type, Amount, Descr, Date&time, Balance)
type can be Debit or Credit
The account ejb would then identify the owner of the account
Is this the way to go since there will typically be about 5 transactions on each account every month?
Hope i've shed more light
> Not Bank accounts
> A company(owner of the software) has created accounts
> for all clients and agents that do bussiness with
> them. The client and agent accounts are
> independent(No diff in the modelling).
> I had thought of making a transaction ejb (entity
> with CMP) as follows:
Why do you think you need EJBs?
> Transaction(transID, accountID, type, Amount, Descr,
> Date&time, Balance)
>
>type can be Debit or Credit
What's the different behavior between Debit and Credit?
Wouldn't it be more object-oriented to have a base Account class with Debit and Credit subclasses?
> would then identify the owner of the account
>
> Is this the way to go since there will typically be
> about 5 transactions on each account every month?
"The" way to go? No. It's one way to do it, and perhaps not the best way.
%