I’ve scheduled all the Matrix provisioning updates for next week. I think this takes project multitasking to silly levels and just as well C# is very like Java. I’d hate to have to switch constantly between Java and C++. It’s all come together at once though, with a move to Active Directory, which needs provisioned and a move to Blackboard 9.1, which also needs provisioned. So it’s been an interesting few months culminating in this release fest.

Following on from my initial Blackboard SIS research I had a clearer idea of how to plumb it into my new Matrix Provisioning system which is based on ActiveMQ and Camel. The main problem I had was the lack of any status coming back from the SIS. You can send it what you like, even garbage and it replies with ‘OK’. Although the garbage ingestion is due to be fixed in SP9 or SP10 I think. The status won’t though. It will still return ‘OK’ even though the account wasn’t created. I had a chat with Behind the Blackboard and it’s fair to say that because it ingests feed files containing possibly thousands of users a single result isn’t suitable. It is in my case though as the users come in real time in JMS messages, one per message. So I decided to develop a small Building Block to wrap the SIS endpoint. The flow is shown in the diagram.
(more…)
I used to be quite passable with PaintShop Pro yonks ago and the graphics I do for the blog I do in Keynote, apart from the logo which I did in Pixelmator. So I thought I’d start to get to grips with graphics for my iOS projects and decided to try out the glowing power button tutorial. I must say I was pleasantly pleased with the result. The first attempt was a mess, the second was pleasing and the third was both pleasing and enlightening. By then I was understanding how to make correct selections from other layers to constrain fills and also what parts the different elements play in the overall image. For example, the outer circles with no fill but inside stroke, once gaussian blurred smear out and ‘rise up’ the sides of the button housing. Masking out and then revealing with a colour to transparent gradient made sense to isolate the top and bottom parts of the button’s outer bevel. All in all a really nice experience and I’m fair chuffed with the result!

In the first version of Matrix Provisioning the modules that handle the local systems such as Active Directory and Blackboard were responsible for dealing with messages they couldn’t process. For example if a message contained an invalid location code for an account then that account can’t be provisioned in Active Directory as the module doesn’t know where to create it in the tree. It’s a classic example of an error that’s not going to go away and it needs manual intervention to sort the bad location code. Either manually changing it in the message or deleting the message and issuing a new one with the correct location code. The module would persist the message to a database in this case and email someone to come and sort it but I’d rather keep the modules as simple and focussed as possible. More along the lines of the Single Responsibility Principle, although it’s quite a broad responsibility in that it creates/updates/deletes accounts in Active Directory based on messages coming from an ActiveMQ broker. What I’d rather do is allow the module to say to the broker ‘you’ve sent me a bum message, do something about it’ and forget about it. So I had a read of Enterprise Integration Patterns and decided to use the Invalid Message Channel. The flow is summarised in the diagram.
(more…)
I decided to implement SSL in MatrixClient to let messaging clients connect securely to an ActiveMQ broker and I got a bit lost in the various SSL errors that can happen so I thought I’d summarise the flow, which is shown in the diagram.

It all hangs on each end of the connection having its own keystore and truststore. The keystore is used for signing the request and the truststore is used for verifying the signed request. So for it all to work the client’s certificate must be in the broker’s truststore and the broker’s certificate must be in the client’s truststore. (more…)
Sometimes it’s easy to get carried away with annotations and when something doesn’t work you endlessly scratch your head. I’ve just extended MatrixClient to talk SSL to an ActiveMQ broker that wants client authentication and added the appropriate test:
public class MQClientTestSSL extends ClientTest ... {
@Test
public void test() {
but Maven wasn’t running the test. I could run it manually:
mvn test -Dtest=uk.ac.uhi.it.matrix.client.MQClientTestSSL
but mvn clean install didn’t run the test. According to the surefire documentation it’s meant to run tests with a pattern ‘Test*.java’ but it clearly wasn’t. The only way to get the test to run was to rename it:
public class MQClientSSLTest extends ClientTest ... {
and Maven then picked it up and ran it.
This was a seriously obscure bug it turned out. It was so obscure I turned to stackoverflow to ask about it. I’ve written a C# assembly that wraps the Apache NMS library to provide applications with messaging functionality and the NUnit tests for the DLL run fine but when I tried using the DLL from the main Windows Service that I’m working on the connection to the broker always failed. And to boot, the exception info was not helpful:
Error in the application
(more…)