[ Pobierz całość w formacie PDF ]
.You may get a compiler error like,  Cannot write to DLL while executableis loaded. To avoid this, you can set the MTS package or COM+ applicationproperties to shut down the server when it is idle.To shut down the server when idle,1 In the MTS Explorer or COM+ Component Manager, right-click the MTS packageor COM+ application in which your transactional object is installed and chooseProperties.2 Select the Advanced tab.The Advanced tab determines whether the server process associated with apackage always runs, or whether it shuts down after a certain period of time.Cr eat i ng MTS or COM+ obj ec t s 46-25 I n s t a l l i n g t r a n s a c t i o n a l o b j e c t s3 Change the time-out value to 0, which shuts down the server as soon as no longerhas a client to service.4 Click OK to save the setting.Note When testing outside the MTS environment, you do not reference the ObjectPropertyof TMtsObject directly.The TMtsObject implements methods such as SetComplete andSetAbort that are safe to call when the object context is nil.Installing transactional objectsMTS applications consist of a group of in-process MTS objects running in a singleinstance of the MTS executive (EXE).A group of COM objects that all run in the sameprocess is called a package.A single machine can be running several differentpackages, where each package is running within a separate MTS EXE.Under COM+, you work with a similar group, called a COM+ application.In aCOM+ application, the objects need not be in-process, and there is no separateruntime environment.You can group your application components into a single MTS package or COM+application to be managed by a single process.You might want to distribute yourcomponents into different MTS packages or COM+ applications to partition yourapplication across multiple processes or machines.To install transactional objects into an MTS package or COM+ application,1 If your system supports COM+, choose Run|Install COM+ objects.If your systemdoes not support COM+ but you have MTS installed on your system, choose Run|Install MTS objects.If your system supports neither MTS nor COM+, you will notsee a menu item for installing transactional objects.2 In the Install Object dialog box, check the objects to be installed.3 If you are installing MTS objects, click the Package button to get a list of MTSpackages on your system.If you are installing COM+ objects, click the Applicationbutton.Indicate the MTS package or COM+ application into which you areinstalling your objects.You can choose Into New Package or Into New Applicationto create a new MTS package or COM+ application in which to install the object.You can choose Into Existing Package or Into Existing Application to install theobject into an existing listed MTS package or COM+ application.4 Choose OK to refresh the catalog, which makes the objects available at runtime.MTS packages can contain components from multiple DLLs, and components from asingle DLL can be installed into different packages.However, a single componentcannot be distributed among multiple packages.46-26 Dev el oper  s Gui de Ad mi n i s t e r i n g t r a n s a c t i o n a l o b j e c t sSimilarly, COM+ applications can contain components from multiple executablesand different components from a single executable can be installed into differentCOM+ applications.Note You can also install your transactional object using the COM+ Component Manageror MTS Explorer.Be sure when installing the object with one of these tools that youapply the settings for the object that appear on the COM+ page of the Type Libraryeditor.These settings are not applied automatically when you do not install from theIDE.Administering transactional objectsOnce you have installed transactional objects, you can administer these runtimeobjects using the MTS Explorer (if they are installed into an MTS package) or theCOM+ Component Manager (if they are installed into a COM+ application).Bothtools are identical, except that the MTS Explorer operates on the MTS runtimeenvironment and the COM+ Component Manager operates on COM+ objects.The COM+ Component Manager and MTS Explorer have a graphical user interfacefor managing and deploying transactional objects [ Pobierz całość w formacie PDF ]

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • czarkowski.pev.pl
  •