The 2009 Jacksonville Code Camp was a great success. Many thanks to Bayer, Brandy, and everyone else that made it happen. The bar has been set really high for future Jacksonville code camps, and for the rest of Florida too.
My session on Transactional WCF Services went well. Many great questions and compliments after the session. If you attended and have any unanswered questions, please email me.
You can download the session files below. It contains staged versions of all of the transaction modes we discussed. It also contains a tracing solution and tracing result files to view the client and host tracing files in Client/Service mode. Also see my previous post on using the Service Trace Viewer. It also contains a few demo projects that we didn’t get to in the one-hour session.
Files/Solutions included in Session Archive:
- PowerPoint slides
- Transaction Promotion Code Snippet
- Testing database backup
- Testing SQL script (query and cleanup between tests)
- IDesign ServiceModelEx Project (used by all included Solutions)
- Code Demo Solutions
Code Demos include:
|1.||TransactionScope – Shows how single/multiple resource managers affect which Transaction Manager is chosen to handle the scoped transaction. Also gives first look at transaction promotion detection.|
|2a.||Mode None – WCF transaction mode with which no transactions are created or flowed from the calling client.|
|2b.||Mode Service – WCF transaction mode with which no transactions are flowed from the calling client, but a transaction is created for your service operation.|
|2c.||Mode Client – WCF transaction mode with which a transaction is required to be flowed, and the service will only use the client transaction.|
|2d.||Mode Client/Service – WCF transaction mode with which a client transaction will be flowed and used by the service, if available. If no client transaction is flowed, a transaction will be provided automatically for the service operation.|
|3.||Explicit Voting – Shows how explicit voting with a session-mode service is performed using OperationContext.Current.SetTransactionComplete().|
|4a.||Testing Various Resource Managers – Shows how a client can use a single TransactionScope to call several services (some transactional, some non-transactional), a database stored procedure, and an IDesign volatile resource manager Transactional<int>
|4b.||Testing Services – Provides a host project for a transactional service and a non-transactional service used in 4a.|
|5a.||Tracing – Same as 2d. modified with the additional app.config settings in the client and host projects to allow for service tracing to .svclog files.|
|5b.||Tracing Results – Stored results from executing 5a. in case you don’t want to load the database and actually run the projects. The .stvproj file can be opened directly in the Service Trace Viewer. On the “Activity” table, click on the activity “Process action ‘http://services/gotjeep.net/GpsTrackServiceContract/SubmitTrack’” then click on the “Graph” tab. You will see that the client and host activities where the arrow moves from client to host (send and receive message, respectively) show the OleTxTransaction in “Headers.” The next activity in the host reads “The transaction ’5bd25b08-848c-409d-9163-6303b9138382:1′ was flowed to operation ‘SubmitTrack’.”|
Download the session files:
TransactionalWCF.zip (854 KB)