Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / TransactionBridge / Microsoft / Transactions / Bridge / TransactionManager.cs / 1 / TransactionManager.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace Microsoft.Transactions.Bridge { using System; using System.Collections; using System.Configuration; using System.ServiceModel.Internal; // The TransactionManager type represents a transaction manager // from the viewpoint of the propagation protocol. The MSTB // service (or equivalent) creates one TransactionManager object // per protocol. // abstract class TransactionManager { protected TransactionManager( ) { PropagationProtocolsTracing.TraceVerbose( "TransactionManager::TransactionManager" ); id = Guid.NewGuid( ); PropagationProtocolsTracing.TraceVerbose( id.ToString( "B", null ) ); } public void Initialize(string fullyQualifiedTypeName, object bridgeConfig) { PropagationProtocolsTracing.TraceVerbose( "TransactionManager::Initialize" ); PropagationProtocolsTracing.TraceVerbose( fullyQualifiedTypeName ); if (!TransactionBridge.IsAssemblyMicrosoftSigned( fullyQualifiedTypeName )) { PropagationProtocolsTracing.TraceVerbose( "Protocol type has wrong signature: " + fullyQualifiedTypeName); throw DiagnosticUtility.ExceptionUtility.ThrowHelperError( new ConfigurationErrorsException(SR.GetString(SR.ProtocolTypeWrongSignature))); } this.bridgeConfig = bridgeConfig; // 1. create a object of the type specified by the fully qualified // name; cast as IProtocolProvider Type type = Type.GetType( fullyQualifiedTypeName, true ); PropagationProtocolsTracing.TraceVerbose( type.ToString( ) ); protocolProvider = (IProtocolProvider) Activator.CreateInstance( type ); // 2. call initialize on the transaction manager this.Initialize(); // 3. get the protocol provider's coordinator and propagation services protocolProviderCoordinatorService = protocolProvider.CoordinatorService; protocolProviderPropagationService = protocolProvider.PropagationService; } // The following overrides are called in the following order abstract public void Initialize(); abstract public void Start(); abstract public void Recover(); abstract public void Stop( ); // Expose a property for the provider to query the Max log entry size enforced by PPL. abstract public int MaxLogEntrySize { get ; } public TransactionManagerCoordinatorService CoordinatorService { get{ return transactionManagerCoordinatorService; } } public TransactionManagerPropagationService PropagationService { get{ return transactionManagerPropagationService;} } public TransactionManagerSettings Settings { get { return TransactionManagerSettings; } } override public string ToString( ) { return this.GetType( ).ToString( ) + " " + id.ToString( "B", null ); } public IProtocolProvider IProtocolProvider { get { return protocolProvider; } } public IProtocolProviderCoordinatorService IProtocolProviderCoordinatorService { get { return protocolProviderCoordinatorService; } } public IProtocolProviderPropagationService IProtocolProviderPropagationService { get{ return protocolProviderPropagationService; } } protected TransactionManagerCoordinatorService TransactionManagerCoordinatorService { get { return transactionManagerCoordinatorService; } set { transactionManagerCoordinatorService = value; } } protected TransactionManagerPropagationService TransactionManagerPropagationService { get { return transactionManagerPropagationService; } set { transactionManagerPropagationService = value; } } protected TransactionManagerSettings TransactionManagerSettings { get { return transactionManagerSettings; } set { transactionManagerSettings = value; } } protected object BridgeConfiguration { get { return bridgeConfig; } } protected static void UnhandledExceptionHandler(Exception exception) { DiagnosticUtility.InvokeFinalHandler(exception); } /* ------------------------------------------------------------------- * attributes * ----------------------------------------------------------------- */ private IProtocolProvider protocolProvider; private IProtocolProviderCoordinatorService protocolProviderCoordinatorService; private IProtocolProviderPropagationService protocolProviderPropagationService; private TransactionManagerCoordinatorService transactionManagerCoordinatorService; private TransactionManagerPropagationService transactionManagerPropagationService; private TransactionManagerSettings transactionManagerSettings; private Guid id; private object bridgeConfig; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DoubleLinkListEnumerator.cs
- ListBox.cs
- TemplateManager.cs
- CodeIdentifier.cs
- RegionInfo.cs
- SimpleExpression.cs
- DataStreams.cs
- PauseStoryboard.cs
- IProducerConsumerCollection.cs
- login.cs
- MenuItemStyleCollection.cs
- BufferedStream.cs
- _TimerThread.cs
- TypeForwardedToAttribute.cs
- SecurityDescriptor.cs
- WebPartEditorCancelVerb.cs
- ChineseLunisolarCalendar.cs
- BuildProviderAppliesToAttribute.cs
- PathSegment.cs
- SamlAuthenticationStatement.cs
- ProvideValueServiceProvider.cs
- WebPartCancelEventArgs.cs
- Clock.cs
- ValidationSummaryDesigner.cs
- DirectionalLight.cs
- TraceRecord.cs
- HttpPostedFile.cs
- TypedRowHandler.cs
- ListSortDescription.cs
- CriticalHandle.cs
- SrgsRulesCollection.cs
- RichTextBoxAutomationPeer.cs
- SqlConnectionFactory.cs
- EffectiveValueEntry.cs
- SharedDp.cs
- Function.cs
- ImageAnimator.cs
- WebPartConnectionsCancelEventArgs.cs
- ReadOnlyDataSourceView.cs
- DefaultPrintController.cs
- PropertyChangedEventArgs.cs
- MenuTracker.cs
- SchemaImporter.cs
- InheritanceAttribute.cs
- DataGridViewRowHeaderCell.cs
- counter.cs
- ObjectStorage.cs
- ScriptModule.cs
- OrderedParallelQuery.cs
- SQLInt32.cs
- HttpDictionary.cs
- ResourceDescriptionAttribute.cs
- BitmapDownload.cs
- EpmContentSerializer.cs
- CollectionEditVerbManager.cs
- ButtonAutomationPeer.cs
- BooleanStorage.cs
- TransactionFlowAttribute.cs
- FrameworkElementFactory.cs
- Vector.cs
- WindowsScrollBarBits.cs
- CodeTypeReferenceCollection.cs
- XmlTextReaderImplHelpers.cs
- FormViewInsertedEventArgs.cs
- SystemSounds.cs
- RawStylusInput.cs
- MetadataSerializer.cs
- StringConverter.cs
- XmlSignificantWhitespace.cs
- ChoiceConverter.cs
- EnumBuilder.cs
- OutOfMemoryException.cs
- TreeNodeSelectionProcessor.cs
- TemplateBuilder.cs
- ScrollableControl.cs
- MenuItemStyleCollection.cs
- DynamicActivityTypeDescriptor.cs
- DbDataReader.cs
- FixedTextBuilder.cs
- StringAnimationUsingKeyFrames.cs
- BoolExpression.cs
- ObfuscateAssemblyAttribute.cs
- HtmlTableRowCollection.cs
- MinimizableAttributeTypeConverter.cs
- _SecureChannel.cs
- GroupItemAutomationPeer.cs
- ToolStripItemEventArgs.cs
- Transaction.cs
- WindowPattern.cs
- UnionExpr.cs
- Material.cs
- ComboBox.cs
- httpapplicationstate.cs
- DmlSqlGenerator.cs
- SqlMethodTransformer.cs
- Helper.cs
- DataContractSerializerSection.cs
- DataSourceUtil.cs
- HuffCodec.cs
- SessionState.cs