Your code is wrong if you try to call getUserSession inside a service constructor, when your plugin bundle is being deployed.
I am not sure what you are trying to do by calling this too early, you cannot access the user name unless your method is called as part of a service call from the Flex client.