imageDataManagerBean.saveImageToCache(filename, imageData);
imageDataManagerBean.uploadImage(filename, imageData);
// Create image entry
Image image = new Image();
CommentThread ct = new CommentThread();
ct.setComments(new LinkedList<Comment>());
image.setCommentThread(ct);
image.setImageLocation(filename);
image.setRatings(new LinkedList<Rating>());
image.setUser(user);