This has been cross-posted at:
class interfaces to server
. Cross-posting is not against the rules of this forum, but I will point you in the direction of some explanations for why cross-posting is frowned upon here
With server client communication, you must be careful to pass listeners between the two, as the server/client contain different references to the same object values but not the same object. Listeners must somehow manage communication between the two, the simplest is to require the server method to return a value/object. If you have a long running task, use something like a MessageDriven bean.