Saturday, February 09, 2008

Should tablename be passed to CacheStore?

No. Table name should not be passed to the Coherence CacheStore constructor. Following are the reasons:
1. CacheStore does not have any knowledge of the "type" of datasource. Only Its implementation knows it. And CacheStore implementation should encapsulate this information.
2. Grid is about objects. Its better to use an ORM and hide the data-model in its internal mapping file.
3. If Multiplexed(?) CacheStore needs to be written its easier to instantiate individual CacheStores with common arguments.

No comments: