Fixing a problem with transaction handling and bean creation