Good point, thanks Victor!
-----Original Message-----
From: A mailing list for Enterprise JavaBeans development
[mailto:[EMAIL PROTECTED]]On Behalf Of Victor Langelo
Sent: 24 August 2000 16:10
To: [EMAIL PROTECTED]
Subject: Re: Multiple Entity components, one DB table
Phil,
There won't be a problem unless your database's locking is too granular.
More important, is why do you want to make lookup values entities? Why not
have a stateless session bean which returns the appropriate lookup object(s)
(id, description, value) directly from the DB or from an in memory cache?
You can provide methods in this bean add/remove objects which updates both
the cache and
the DB. This is a lot more efficient that entity beans for frequently used
but seldom updated data.
--Victor Langelo
Phil Lewis wrote:
> Is this OK?
>
> The reason I ask , is that in our physical DB schema we have a 'lookup'
> table with a structure like:
>
> lupID
> lupType
> lupDescription
> lupValue
>
> This is used throughout a legacy system for storing general data values.
For
> example, several combo boxes available in the UI have configurable
comtents.
> A typical example would be a 'severity' combo. The app allows an admin
user
> to specify the values to list in this combo. This is done by modifying
> lookup entries with a particular lupType.
>
> We are now developing a EJB app that will use the same DB schema, and it
> seems to me that there is a possible argument for treating each of the
> lupTypes as different Entity components. From a component modelling point
of
> view, this makes a lot of sense.
>
> For example, we would want an entity component called
InternetSearchEngine,
> and another called SeverityValue. In future applications of the
components,
> they may mapo onto different tables, but in the current implementaion,
they
> would both map onto the same database table, one with a lupType of (eg) 1,
> and onther with a lupType of (eg) 2.
>
> So, that's why I want to do it, the question is, that it seems to me that
it
> may not be a good idea to have differnt entity beans looking at the same
> table. We are to be using bean managed persistence, but container managed
> transactions. We are developing to the J2EE spec, in an effort to maintain
> app server independence, and so cannot take advantage of any vendor
specific
> facilities.
>
> Is this an advisable course of action, or should I stick with a single
> LookUpValue entity?
>
> Thanks
>
> Phil
>
> Any opinions expressed in this email are those of the individual and not
necessarily Knowledge Management Software plc. This email and any files
transmitted with it are confidential and solely for the use of the intended
recipient.
> If you are not the intended recipient or the person responsible for
delivering to the intended recipient, be advised that you have received this
email in error and that any use is strictly prohibited. If you have
received this email in error please notify the Systems Manager by telephone
on 44 (0) 161 227 9009
>
>
===========================================================================
> 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".
===========================================================================
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".
Any opinions expressed in this email are those of the individual and not necessarily
Knowledge Management Software plc. This email and any files transmitted with it are
confidential and solely for the use of the intended recipient.
If you are not the intended recipient or the person responsible for delivering to the
intended recipient, be advised that you have received this email in error and that any
use is strictly prohibited. If you have received this email in error please notify
the Systems Manager by telephone on 44 (0) 161 227 9009
===========================================================================
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".