[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.technology.cosmos] Re: parsing query results from multiple MDRs

Hi David,

Is it possible to create a serializer aggregate that keys off something in the query response, perhaps a namespace, to delgate to model-specific serializers for the actual work? That might not be an elegant solution but might work for you in the near term. We would also like to hear your ideas on what sort of API you would like to see, maybe some sort of serializer/datatype mapping registry?

It sounds like the last sentence of your post is regarding a separate problem. When you say it ignores it for most object types, can you give an example of one for which it does, or a place you think it is doing this?

In general, I would encourage you to create defects and/or enhancements in our Bugzilla system where appopriate, including specific details and recreation scenarios, as this will make it more likely that we can get the work scheduled, and offer more timely solutions. Plus, being the creator of the defect, you will get notified as the status changes.

Thanks,
David

David Loewenstern wrote:
I apologize if this question has been answered before, but I have not seen it in the archives.

Say I have an application that queries two _different_ MDRs with _different_ underlying object models. The application can be configured so it knows which model goes with which MDR. To make this concrete, say we have one MDR that handles personnel and a different MDR that handles IT assets, and we need to construct queries across both (e.g., "list all assets that are assigned to managers with pay grade above 10").

I realize it isn't Cosmos's or CMDBf's job to tear apart the query and route the subqueries to the appropriate MDR, and I'm not worried about that. The problem I have is specific, and has to do with handling the query responses.

Both MDRs will send back query responses containing records. For one, the records will be personnel, for the other, IT assets. As far as I can tell, the CMDBf will handle both by way of the QueryOutputStreamHandler, ultimately calling CMDBfServicesUtil.getRecordSerializer(). There can be only one record serializer -- it's a class variable, so even if I have two separate instances of QueryOutputStreamHandler, they will both use the same record serializer. But I need two serializers, one for the personnel data model, one for the IT data model. How do I accomplish this?

It seems that there is a problem in that QueryOutputStreamHandler accepts a user-defined ArtifactFactory but ignores it in favor of CommonArtifactFactory when creating most object types.

David Loewenstern
davidloe@xxxxxxxxxx