// Generate unique id for choice
if(choiceRange == null) {
Context ctx = new InitialContext();
SequenceServiceHome home = (SequenceServiceHome)ctx.lookup("nordija.portal.sequence");
SequenceService seq = home.create();
choiceRange = seq.getSequenceRange("Choice",true,1);
}
ChoicePK pk = new ChoicePK(choiceRange.getNextUniqueNumber());
System.out.println("Adding Choice with key: "+pk.choiceId);
Choice choice = fetchChoiceHome().create(pk, Portlet.getId(), user.getId());