Using threading to do processing. Improving the User Experience.
One great thing about Java is that it’s easy to create Threads. My UML diagrams are showing how I am now splitting processing away from the user interface.
Why make a user wait, when a background thread could be fired to do a calculation, produce a report and it’s not only users that can benefit from background processing. I have a comms routine which basically get’s a UDP message, puts it in a database and responds to the unit. Then, in the background, runs a thread that processes the data into the system.
To create a thread is very easy. You can either use an EJB timer function to start a threaded routine, or create a class that extends a Thread, and then use new Thread(new yourClass()).start();