Thursday, 18 August 2011

A productive week so far

One of my colleagues has been on leave this week so I have had a little more freedom to try out changes to the current project without worrying about potential conflicts when checking the changes into the version control system.

One of the changes that I had been contemplating for a while involved introducing Spring Flex so that our main integration point between BlazeDS and our Java web application can make use of the same dependency injection as the rest of the application.

As usual, the documentation was quite thorough, but due to my lack of familiarity with Flex I found some blog posts more useful.

Now that Spring had responsibility for dealing with the MessageBroker and creating the Java object that it communicates with, I was able to do away with a few dozen lines of context.getBean("someBeanName") - inversion of control is our friend :)

Running the application seemed fine, so I moved on to some memory usage profiling.

jvisualvm is a very useful tool for observing what is really going on in the memory and CPU usage of a Java application.  Over the course of an afternoon I detected that there were three instances of something that should have been a singleton, and at least one case of a new Thread being created each time a particular screen was visited - without terminating the previous Thread.

No comments:

Post a Comment