Hi,
I've question - how do you implement callbacks (event listeners) using JBoss & EJB? I mean case, where server is event source, and client is an listener.
I think there is a great place for AOP & JBossRemoting,
I wanted to implement such aspect, but before, I want to ask if there is any existing solution
Question is - is it possible with tools we have, or I need to create new one?
test code would be:
Client:
@SomeCallbackAnnotation
IMyCallback my_c = new IMyCallback() {
onEvent(Object evt) {
System.out.println("Event!" + evt);
}
}
IRemoteApp app = ...
app.foo(my_c);
class AppImpl {
foo(IMyCallback c) {
...
c.onEvent("Server says hello");
...
}
}
Event! Server says hello