I need to write a Stateess Session Bean which has Methods that return file-contents to the client. The files are text-files (<100 kb) or binary files (<2mb). Just returning a stream or reader isn't possible, because these classes aren't serializable. So how can I do this? Or am I on the wrong track and should do it completely different?
simply use a byte array.