After struggling for couple more days I have finally implemented my own EJB Function ListSorter. For the case that someone faces the same issue and does not get any response as I didn't here is my solution.
Since my first question about the default sorter was not answered I wont mark this as the "right answer".
public class ListSorter implements ListSorterLocal {
@SuppressWarnings("unchecked")
public DataObject invokeSdo(DataObject inputDO,
InvocationContext invocationContext) {
List<DataObject> list = inputDO.getList(0);
List<DataObject> sortedList = new ArrayList<DataObject>();
sortedList.addAll(0, list);
Collections.sort(sortedList, new CustomComparator());
DataObject outputDO = invocationContext.createOutputDataObject();
outputDO.setList(0, sortedList);
return outputDO;
}
public class CustomComparator implements Comparator<DataObject> {
@Override
public int compare(DataObject o1, DataObject o2) {
return o1.getString("appointmentID").compareTo(o2.getString("appointmentID"));
}
}
}