Hello Eric,

I have a similar model where objects are a set of key-value paires.
Each object has its metadata represented with metadataId and a set of
propertyIds. This is how the type of object is defined.

Another entity bean stores a property of some object. Its fields are
metadataId, propertyId and property's value.

Then to fetch an object I use dynamic QL. General method call looks
like this:
HashMap getObject(String metadataId, List propertyIds)

Note, I can fetch the whole object's properties or its subset.
Indeed, it's mapping of objects not horizonatlly (to rows in
a table) but vertically. It's even possible to try to achieve some
object inheritence with EJB and QL here.

further inlined...

Sunday, December 15, 2002, 7:23:40 PM, you wrote:

EK> We have an architecture in which a majority of our domain objects are
EK> modelled as key-value pairs.  It's a financial application.  So, for
EK> example, we have a Position object that represents a holding, and it may
EK> have things in it like "Amount owned", "Associated Asset", etc.  The system
EK> is completely extensible.  A given customer describes their own set of
EK> "Position" data fields, along with meta data about each one of these fields,
EK> and these values are used throughout the suite of applications which we have
EK> built (e.g. reporting, etc.).  We use ejb to model their persistent data.
EK> These ejbs are customer specific, tailored to each individual installations
EK> database, etc.  We then have proxies that interface to these custom
EK> components and do things like pull back all positions in a given portfolio
EK> on a given date.  These are returned from the proxy as a Collection of Maps
EK> (essentially).  

EK> The question is follows.  We currently use BMP entity beans for which the
EK> code is autogenerated.  The bulk loads are actually done is direct jdbc and
EK> the data is mapped to specific keys in the map on the way in based upon a
EK> bean definition file which the customer writes.  We would like to move to
EK> CMP but have two questions.

EK> 1. I've only seen cmp beans specify mapping to individual data members
EK> (instance variables), not to keys in a map.  Is there a technology available
EK> to do such a mapping?

AFAIK, no, but I thought about it too.

EK> 2. I asked this before, but I want to confirm.  If we go to cmp, can we do
EK> away with our bulk jdbc loads, which essentially bypass any cacheing the
EK> container might do for us?  In the past, going through the entity beans with
EK> BMP to load large amounts of data was expensive.  Can CMP handle a bulk load
EK> efficiently, or must it select the pks and then go back for the data one by
EK> one?

I think CMP is the right way to go. I extensively use read-ahead and
caching facilities and sutisfied though there are still many things to
improve.

HTH,
alex

EK> Thoughts would be appreciated.

EK> Regards

EK> Eric Kaplan
EK> Armanta, Inc.




-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility 
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to