gertnerro

two featureworkspaces only one database process

Discussion created by gertnerro on Dec 2, 2011
Latest reply on Dec 4, 2011 by gertnerro
Hello,
I want to ask about experience with multithread operations in geodatabase. We have standalone application wit two separate threads. Each thread has own FeatureWorkspace object which was obtained with following part of code:


IWorkspaceFactory2 v_pWSFactory;
IWorkspace v_pWorkspace;
IPropertySet v_pCnnProperty;
IFeatureWorkspace v_pFeatWorkspace;

            v_pCnnProperty = new PropertySet();
            v_pCnnProperty.SetProperty("SERVER", a_sServer);
            v_pCnnProperty.SetProperty("INSTANCE", a_sInstance);
            v_pCnnProperty.SetProperty("USER", a_sUser);
            v_pCnnProperty.SetProperty("PASSWORD", a_sPassword);
            v_pCnnProperty.SetProperty("VERSION", c_sParentVer);

            v_pWSFactory = (IWorkspaceFactory2)new SdeWorkspaceFactoryClass();

            try
            {
                v_pWorkspace = (IWorkspace)v_pWSFactory.Open(v_pCnnProperty, 0);
                v_pFeatWorkspace = (IFeatureWorkspace)v_pWorkspace;
                return v_pFeatWorkspace;
            }
            catch (Exception ex)
            {
                m_oLogWriter(8, "GetWorkspace", ex.Message);
                return null;
            }
            finally
            {
                v_pWSFactory = null;
            }

Everything works, but we supposed, that each FeatureWorkpace will have own process in geodatabase (sde.process_information table). But there is just one process for both and one thread waits for the other in some types of operations in geodatabase.

Question: Is there any possibility to have one process in geodatabase per each FeatureWorkspace (WorkSpaceFactory) for the same user???

Thank you for answers.

Outcomes