I have one thread, inside which I am calling a method.
Expand|Select|Wrap|Line Numbers
- new Thread(new Runnable() {
- public void run() {
- InvoiceVO returnedInvoiceVO = finalizeHandler.postAndPrint();
- :
- :
- }
Expand|Select|Wrap|Line Numbers
- protected InvoiceVO postAndPrint() {
- InvoiceVO returnedInvoiceVO = null;
- try {
- returnedInvoiceVO = InvoiceBL.printInvoice(invoiceVO, customerVO);
- } catch (final ApplicationException aerr) {
- SwingUtilities.invokeLater(new Runnable() {
- public void run() {
- clientApplicationContext.getMessageMgr().showMessage(finalizeDialog,
- aerr.getUserMessageID(), aerr.getUserMessageParameters(), 7);
- finalizeDialog.lblErrorMsg.setText("");
- }
- });
- }
- return returnedInvoiceVO;
- }
Is the previous thread is completing before the current thread. If this is the case then what could be the solution.
thanks and regards,
Amit