This is not a specific question, but more of a design question. I want to create two MTSObjects.
The first object (DataServer) will be installed on a COM+ server and exported to client. This object will have one method, which retrieves data from another MTSObject and returns it to the methods caller. This object will be stateless and will be pooled.
The other object (DataProvider) is the data provider for the object described in the previous paragraph. The data this object accesses is in a structured file and is loaded when the object is created. It can not be accessed with BDE or any other ODBC driver, which can pool connections. I have to load this data when the object is created.
What I want to do is create the DataProvider once to be utilized by all of the instances DataServer. Since the object (DataProvider) takes so long to load I would not want the initialization to happen again after it is created the first time, and I would want all of the DataServers to be able to utilize the DataProvider for their data queries. In short it would be ideal if I could create the DataProvider as a singleton and have the DataServers access the one DataProvider for their data. My main goal is to keep the data from being loaded over and over again each time I create a DataProvider.
Any suggestions would be appreciated.