Pectoralis Major Tear

6 05 2008

Firstly, I am not a doctor or qualified in a medical profession in any way—I am just documenting my personal experiences with this particular injury.

Staying physically active plays a large role in my day-to-day routine. While I love to cut code and experiment with technology, it doesnt help me towards keeping a physically healthy body. To balance this, I mainly participate in solo sports (jogging, road cycling and resistance training at the gym)—this way I can exercise when I want and how I want.

Per week, my routine generally comprises of about 25Km of real jogging (i.e. not using a machine) and 10 hours in the gym doing resistance training. Through various protein supplements and heavy resistance training I have been consistently bulking up over the last 18 months (I am fairly lean, 188cm tall and currently weight about 100Kg).

In late April (24th) 2008 I went to gym planning to rip through my usual chest/shoulder program. It was about 9:00PM and the gym was basically dead—great! When it came to use the bench press, my right-shoulder had throbbing sensation (imagine a tooth-ache only across the front of your shoulder). This had started a few weeks prior when I played some casual indoor cricket with some colleagues from work—something I hadnt done for years. The wrenching/stretching of bowling was too much for my muscle bound shoulder—not like when I was younger.

As this throbbing sensation had been causing me to now miss workout sessions, I brushed it off thinking I could tough this one out. I got through the first light warm-up set, and the intensity of the throbbing got worse. Frustrated at my “weak” throbbing shoulder, I proceeded with my second set with full weight. When it came to lower the third rep the throbbing on the side of my armpit suddenly turned into a sharp intense pain, which was followed by a popping/tearing sensation. Still load bearing the shoulder just slumped backwards in the same way a dislocation would—getting a fully loaded barbell off me with just my left arm was nasty to say the least. Although I didn’t realise at the time, I had just torn/ripped/ruptured my right chest muscle (aka the “pec” or “pectoral” or “pectoralis major”).

To summarise the remainder of my experience so far, within the first-week my right bicep got very black and blue (with no pain) and my right chest/armpit/shoulder region felt very tight. Two weeks out from the injury the pectoral chest was still very swollen and the bicep still badly bruised—I didnt however feel much pain at all. Although not painful, it felt like I was missing a chunk of muscle around my armpit—a really strange feeling. Pressing the palms of my hands together with my arms fully extended out in front of me (pec-fly motion) really highlighted the problem—I no longer had any power with this motion, as there was no muscle.

I visited three separate GP’s within the first week and got varying results—from pain killer scripts to physiotherapy referrals. One GP gave me a referral to get some ultrasound imaging done. These confirmed a 35mm tear of the pectoralis major. Concerned I “googled” for others experiences (try searching “pectoral tear” or “pectoral rupture”)—there are some useful resources out there. Some claim MRI is the most effective way of diagnosing this injury as the large amount of swelling that occurs with this injury makes ultrasound work very difficult.

http://www.pubmedcentral.nih.gov/articlerender.fcgi?artid=2267574
http://www.thedisabledlist.com/bertrand-berry-treat-torn-pectoral-muscle
http://www.carletonsportsmed.com/chronic_tear_of_the_pectoralis_m.htm

The online research consistency indicated one thing…that early surgery is the only possible solution to a full recovery. While shocked to read this, I knew how serious the injury was from the large tearing sensation I had felt. Thanks to this knowledge I now knew what had to be done—surgery, and fast. General doctor’s (aka GP’s) have a tough job, they are expected to accurately diagnose a vast array of possible injuries and illnesses. As this particular injury is uncommon, be prepared for your GP to be a little off the ball with this one. As my family doctor had a one week backlog before he could see me, I went to the nearest first-in-first-out public medical centre and saw the first possible doctor available. I gave him the ultrasounds, and told him I wanted to see an orthopaedic surgeon ASAP. I rang the surgeon I was referred to, only to find that he was unable to work on this particular injury. Great, all that for nothing. To cut a long story short over the next week, I saw several more GP’s and got as many orthopaedic surgeon contacts and referrals as I could. I found most had backlogs of patients weeks/months long. I eventually located a private orthopaedic surgeon that was able to see me within two days. This process is extremely frustrating and time consuming—be persistent and dont give up.

I was very lucky—the orthopaedic surgeon not only had a solid understanding of the injury and how to repair it, but had done several of them over her career. Within two days, the surgery was complete. As I type this post with just my left hand, my right arm is in a sling, and I have new 12cm incision running from my shoulder down to the top of my bicep where the pectoral muscle was reconnected. Event timeline:

Timeline of Events

I tore my pectoral on the 24th of April 2008 and had the surgery done on the 5th of May. So there was an 11 day period between the actual injury and the surgery. 6 weeks out from my surgery I have had two post-op visits, and can personally confirm that the results (so far) have been amazing. I am positive that I will have a 100+% recovery.

At my 6-week post-op I got the all clear to take the sling off. Although my shoulder/chest/arm muscles have badly deteriorated, most (85%) of my arm motion is now free without any pain. The pectoral muscle feels tight (like a piece of string), but like it is in tact once again (i.e. it stretches over the armpit to the shoulder once again). Three weeks ago I commenced a rehabilitation program with a physiotherapist. My orthopaedic has advised me that in another 4–5 months I can probably return to shoulder/chest weight training.

So far the whole ordeal has cost me around AU$5000. To be honest I would have paid anything to get it fixed—so I considered this to be cheap.





Orchestration Deployment + Bindings

25 04 2008

There seems to be an intermittent deployment problem with BizTalk 2006, that has been the cause of much time wasting. When attempting to deploy BizTalk artefacts either explicitly using the BizTalk Administration Console or the Visual Studio deploy functionality results in the following:

Error 26 Failed to add resource(s). Change requests failed for some resources. BizTalkAssemblyResourceManager failed to complete end type change request. Failed to update binding information. Could not enlist orchestration ‘Net.Bencode.Orchestration,Orchestration, Version=1.0.0.0, Culture=neutral’. Could not enlist orchestration ‘Orchestration.TestProcess’. All orchestration ports must be bound and the host must be set.

Most unusual—binding validation issues at deployment time. Thanks to James French soon discovered that the issue is related to the bindings cache that BizTalk maintains. In short, BizTalk creates (using assembly reflection) and maintains (using the BizTalkMgmt database) BindingInfo.xml files in the C:\Documents and Settings\User\Application Data\Microsoft\BizTalk Server\Deployment\BindingFiles directory. Destroying these temporary BindingInfo files forces fresh binding files to be generated and solves the above error.





MIME Decoder and 64bit

22 04 2008

This week I got a great introduction to the subtle difficulties that are waiting to be encountered when running a 32-bit component in a 64-bit environment. In short, an orchestration that employed the standard (ships with BizTalk) MIME Decoder pipeline component was consistently failing with the following:

The invocation of a pipeline component continued to raise the following exception.
The pipeline “Net.Bencode.Pipeline.Decoder” could not be created for execution. Error Details: “Retrieving the COM class factory for component with CLSID {254B4004-2AA7-4C82-BB2E-18BA7F22DCD2} failed due to the following error: 80040154.”

WTF. After much digging around and troubleshooting, found the problem related to a partcular BizTalk (MIME Decoder) component that only supports a 32-bit execution mode. When executing in a native 64-bit execution environment (e.g. Windows Server 2003 R2 x64) serious instability issues arose (the component would just fail with leaving extremely misleading/confusing diagnostics behind). BizTalk is capable of provide an emulated 32-bit execution mode by using WOW64.

The solution to this problem was to run the orchestration (which uses the MIME Decoder component through a custom pipeline) under a 32-bit host instance. The original problem (”Retrieving the COM class factory for component with CLSID”) can be easily reproduced by switching off the 32-bit emulation mode.

Apparently this applies to a small handful of components in BizTalk. As stated on technetRunning the WSE adapter, FTP adapter, SQL adapter, POP3 adapter, and MIME Decoder on 64-bit host instances is not supported“.





WSE Adapter Woes

18 03 2008

Every now and then I come across a solution that employs the BizTalk Web Service Enhancement (WSE) 2.0 adapter suite—a legacy technique for getting BizTalk to consume/expose web services.

The WSE adapter pack includes the foundation runtime binaries and a cool schema generation wizard that neatly plugs into Visual Studio—the “Add Generated Items” option available in solution explorer will get options for doing WSE schema generation.

Recently I had to maintain a legacy (2004) solution—among other activities this involved defining a number of new logical ports in an existing orchestration. After a typical BizTalk build-deploy-test cycle I soon discovered that the WSE adapter was not happy…

Failed to transmit message.
Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: methodname

After digging through the light but sufficient documentation that ships with the WSE adapter, found that the adapter infers the web method to invoke using the operation name that is specified on the logical port to which it is bound. For some reason this was not working—some environments it would work and others it would not.

I hope to revisit this problem to properly get to the bottom of it, but my temporary work-around with the intension of moving forward was to explicitly define the SoapAction context property on the message from the calling orchestration/s—which in effect instructs the WSE adapter of the web method that is to be invoked. For more information refer to the documentation that ships with the WSE adapter, around configuring dynamic send ports (even if your not actually interested in using dynamic send ports).

requestMessage(WSE.SoapAction) = “http://bencode.net/OperationName”;





WMI with System.Management

17 03 2008

Lately i’ve come across the requirement to provide diagnostic/environmental information from with BizTalk itself. Integration solutions can become unwieldy as the number of participating scheduled processes, windows services, web services, databases, COM+ components, queues and so increases.

The deployment of such scenarios often involves a number of independent installers and/or release procedures—eg. one for each vendor system and one for the integration (ie. BizTalk) solution itself.

Ensuring that the correct environmental configuration files, databases, business rules etc. have been put in place, can make a sysadmins life rather tedious. Providing the ability to ascertain key environmental configuration can ease deployment headaches when things don’t seem to be working.

In addition to probing participating systems for their environmental (eg. service account/s names, database connection details, dll versions, server time, etc.) information, providing BizTalk environmental details is also useful. Whether your gathering the BizTalk environmental data from an orchestration, pipeline, or map it soon  becomes clear that BizTalk’s runtime configurable + agnostic approach to physical ports/adapters will require some way of querying the setup details of particular adapters. To complicate things a little, custom adapter configuration is securely stored in the Enterprise Single Sign-On system.

Fortunately BizTalk is highly instrumented to the Windows Management Instrumentation (WMI) infrastructure. The System.Management provides access to this infrastructure, here is an sample C# that queries off a given send ports URL (primary transport address):

public static string SendPortUrl(string sendPortName)
{
  string queryString = String.Format(
    “SELECT * FROM MSBTS_SendPort WHERE  Name = \”{0}\”",
    sendPortName);

  string scopeString = String.Format(
    “\\\\{0}\\root\\MicrosoftBizTalkServer”,
    Environment.MachineName);

  ObjectQuery query = new ObjectQuery(queryString);
  ManagementScope scope = new ManagementScope(scopeString);
  ManagementObjectSearcher search = new ManagementObjectSearcher(scope, query);
  ManagementObjectCollection results = search.Get();

  foreach (ManagementObject sendPort in results)
  {
    return sendPort["PTAddress"].ToString();
  }
  return “Could not resolve send port.”;
}





Debugging Pipeline Components

16 03 2008

Of late I have been spending most of my free time (which isnt a great deal) with pipeline components. BizTalk pipelining is very intriguing and potentially a powerful tool in any BizTalk developers toolkit.

Pipeline component development like most BizTalk related development, seems to involve allot of boilerplate code. Others have tried to counter this with VS.NET wizards (eg. pipeline component wizard, adapter wizard, etc). For some reason I just dont like these… they are a little heavy for my needs.

The BizTalk SDK (to my surprise) includes several useful pipeline samples—ranging from using the standard pipeline components that ship with BizTalk, to crafting custom stream classes that plug-in to the standard component model. I hope to create a small suite of component templates and streamers that I can keep handy for various scenarios.

When you actually start writing custom pipeline components the inefficiency of the BizTalk build-deploy-test cycle becomes unbearable. Gilles (back in 2004) posted about a very handy technique (How to Debug a BizTalk 2004 Pipeline) for interactively debugging pipeline components—it removes the need to perform BizTalk deployments in order to test your pipeline components. The BizTalk SDK ships with a number of managed executables specifically designed to exercise pipelines in the same way BizTalk Server would. By configuring a pipeline component C# class library to bind against a startup application of pipeline.exe and defining the test input message and  pipeline definition (.btp) arguments, it becomes a simple affair of hitting F5 to get interactive debugging—I couldn’t believe how effective this simple technique was.





Missing Tracking Data?

4 03 2008

BizTalk’s tracking capabilities are a wonderful diagnostic feature when in thick of core BizTalk development work, or when a curly situation raises its head in a production environment. Typically when involved with BizTalk development it is not uncommon to find yourself integrating with COTS (Commercial Off The Shelf) products. Participating systems can (and do) deviate from the agreed contracts, sometimes in ways never foreseen. Doing integration between business units and their systems is a political hotspot when things go wrong—being able to identify the cause of an integration problem quickly is crucial. BizTalk tracking can be easily switched on and off at runtime—at both the port and orchestration level. The actual information (message bodies and/or context properties) and the granularity (pre and/or post processing) of tracking can be easily controlled using the administration console.

In my current “work” environment tracking never worked as expected. 99% of the time I could never extract message bodies using the HAT (Health and Activity Tracking) tool. Although frustrated, I never spent the time to investigate why this was until recently. After a bit of digging around, soon discovered that tracking data is actually shipped out of the message box at (by default) one minute intervals by the SQL Server Agent job TrackedMessages_Copy_BizTalkMsgBoxDb. When I attempted to manually invoke the job I quickly found that the job failed to execute due to a lack of sysadmin privilege to the SQL Server.

The SQL Server Agent windows service had been setup to run under a low privileged domain account which in-fact had no (let alone sysadmin) privileges to the SQL Server. After reconfiguring the account under which the windows service ran under I was in-luck—the job was now happily shipping message tracking data into the BizTalkDTADb database.

Now message tracking was 100% reliable and I felt invincible—having the knowledge that I could now reliably capture the complete message bodies and context properties of incoming and outgoing messaging is very comforting.

So if your having problem with tracking and everything looks to be enabled, make sure you check out the TrackedMessages_Copy_BizTalkMsgBoxDb job.





GnuPG Cheatsheet

2 03 2008

This semester I have enrolled in a security unit at my local University. Before we get into the mechanics of modern security techniques (mathematical theory, ciphers, protocols, hashing, Kerberos)—the first lecture kicked off with a gentle overview of PKI and the basics of using the Gnu Privacy Guard (aka GnuPG or GPG for short). In short it is a complete and free implementation of the OpenPGP standard. I havent used GPG on the Windows platform before—there are win32 binaries available for download straight from the official site. Like most Unix born software it is very portable. The binaries are happy running off a mass storage device (eg. a USB flashdrive) assuming the drive is mounted on a suitable Windows host. I hope to make PGP-type security more of apart of my day-to-day routine… im not aware of many people that use PGP compatible systems—I wonder why this is? My public key is also now available on the about page.

Generate a key pair:
gpg –gen-key

Encrypt file:
gpg –armor –output Example.txt.gpg –recipient “Charlie Brown” –encrypt Example.txt
gpg -a -r “Charlie Brown” -e Example.txt

Decrypt file:
gpg –output ExampleDecrypted.txt –decrypt Example.txt.gpg
gpg -d Example.txt.gpg

To export a public key:
gpg –export –armor “Charlie Brown” > CharliePublic.key

Import public key:
gpg –import Alice.key

Delete a public key:
gpg –delete-key “Charlie Brown”

To export a private key:
gpg –export-secret-key –armor “Charlie Brown” > CharliePrivate.key

To import a private key:
gpg –allow-secret-key-import –import CharliePrivate.key

Delete a private key:
gpg –delete-secret-key “Ben Simmonds”

Sign a message:
gpg –output ExampleSigned.txt –clearsign Example.txt

Verify the message:
gpg –verify ExampleSigned.txt

Encrypt and sign a message simultaneously:
gpg –armor –output ExampleSignedEncrypted.txt –recipient “Charlie Brown” –encrypt –sign Example.txt

Decrypt and verify the encrypted and signed message:
gpg –output ExampleDecryptedVerified.txt –decrypt ExampleSignedEncrypted.txt

Create a detached signature:
gpg –armor –output Exa mpleDetachedSignature.txt –detach-sig Example.txt

Verify the detached signature for a given file:
gpg –verify ExampleDetachedSignature.txt Example.txt

Generate a list of numbers that can be used to verify public keys:
gpg –fingerprint > Fingerprints.txt





Reserved words and Distinguished Fields

13 02 2008

The other day I built a schema that was the cause of much confusion and time wasting. Basically the tiny schema was being used by a centralised error handling process, that was designed to subscribe to and publish errors. The schema had a number of child elements, two of which were named “message” and “source”. Each field in the schema was distinguished (not promoted) to allow participating orchestrations to examine and/or manipulate the error message instances.

So thinking it be business as usual (BAU) I went about assigning the distinguished message fields using various expression and assignment orchestration shapes. To my frustration the VS.NET XLANG editor (the one you get when editing an expression or assignment) kept red-squiggly underlining the “message” and “source” distinguished fields whenever I attempted to reference them (as below)—with the unhelpful error message of “Unexpected keyword: message, cannot find symbol”.

myMessage.myRoot.message or myMessage.myRoot.source

It turns out that I was unlucky, message and system are reserved words in the XLANG grammar. Be careful of XLANG reserved words when distinguishing message fields.





BizTalk Mapper Multiple Schemas

12 02 2008

Today I was preparing to do some maintenance work, and while studying the relevant maps and schemas discovered a very unusual looking map—unusual to me anyway. I have included the XML source definition of the map below for reference. The source definition of the map was an aggregation of two schemas. That is, the source definition had two root elements InputMessagePart_0 and InputMessagePart_1 which contained XSD imports of two schemas. The thing that took me by surprise was that the source definition of this particular map was not actually explicitly defined through a “wrapping” schema definition. Instead the actual details of the aggregation was defined and stored in the map definition itself, under the target namespace of:
http://schemas.microsoft.com/BizTalk/2003/aggschema

The only way I could work out how to get the BizTalk development tools to create an aggregated map source/destination definition, was through the orchestration designer in VS.NET. Drop in a transform shape. When configuring the transform shape ensure that the “Create New Map” option is selected, and set its source (and/or destination) to multiple (more than one) messages, click OK. BizTalk will generate the new aggregated map definition. Sweet!

<SrcTree>
<xs:schema
   xmlns:tns=”http://schemas.microsoft.com/BizTalk/2003/aggschema”
   xmlns:ns2=”http://Net.Bencode.Schema1″
   xmlns:ns1=”http://Net.Bencode.Schema2″
   xmlns:b=”http://schemas.microsoft.com/BizTalk/2003″
   targetNamespace=”http://schemas.microsoft.com/BizTalk/2003/aggschema”
   xmlns:xs=”http://www.w3.org/2001/XMLSchema”>
  <xs:import schemaLocation=”.\schema1.xsd” namespace=”http://Net.Bencode.Schema1″ />
  <xs:import schemaLocation=”.\schema2.xsd” namespace=”http://Net.Bencode.Schema2″ />
  <xs:element name=”Root”>
   <xs:complexType>
    <xs:sequence>
     <xs:element name=”InputMessagePart_0″>
      <xs:complexType>
       <xs:sequence>
        <xs:element ref=”ns1:MyRoot” />
       </xs:sequence>
      </xs:complexType>
     </xs:element>
     <xs:element name=”InputMessagePart_1″>
      <xs:complexType>
       <xs:sequence>
        <xs:element ref=”ns2:MyRoot” />
       </xs:sequence>
      </xs:complexType>
     </xs:element>
    </xs:sequence>
   </xs:complexType>
  </xs:element>
</xs:schema>
</SrcTree>