Hi everyone.
This is kind of a J2EE question, but with a specific MDM context so I'm asking it here. I'm not looking for an intro to J2EE, just a direction in which I should be looking at -- I'll do the digging and self-teaching myself.
I created a simple Java application that uses the EventDispatcher of the new API to react to events happening in the repository (specifically it reacts to record modifications). I want to explore the option of converting this application to an EE application.
My problem is how do I convert my listening thread in the standard Java app to the EE world? I currently have a simple listening loop:
while(true) {
Thread.yield();
}
which lets the EventDispatcher wait and fire events. How do I do this in an EE application given that threading is something i shouldn't touch? In which component would I initialize the EventDispatcher and how would it wait for events without a yield() loop?
Thanks 😊
Alon