I'm looking for some kind of design pattern that can help solve the following problem:
How can you thread a call to an EJB in a Swing application? in a generic fashion, without using reflection to discover EJB services?
I realize threading a Swing application should be avoided, but we have no choice in this case.
Basically, our problem is this:
We have many internal frames in a Swing program.
If an internal frame invokes an EJB method that will take a long period of time - we don't want the operation to lock
up any part of the application.
The question boils down to:
How can you thread a call to an EJB - keeping in mind that
there are many EJB's. We were originally using reflection to solve the problem, but to be blunt the reflection API is just too slow.
Any comments/suggestions would be greatly appreciated.