While learning EJBs, I was attempting to have an EJB return a TreeSet collection, and was unable to get it to work. I wanted to do this so the collection of data would come back ordered so the JSP (or the access bean) did not have to do the ordering. Has anybody had the need to do this and got it to work? I particularly ran into troubles on where to define and implement the compareTo/equals methods when using the Comparable interface. This was using the EJB 1.2 spec in Weblogic 5.1. Things probably work a lot differently in EJB 2.0.