JMS #3: Passing a context struct instead of a string

closes #3