Package org.jboss.seam.example.quartz

Examples of org.jboss.seam.example.quartz.Payment


   
    public String scheduleAndSaveAsynchronously()
    {
        String result = persist();
       
        Payment payment = getInstance();
       
        log.info("scheduling instance #0", payment);
        QuartzTriggerHandle handle = processor.schedulePayment(payment.getPaymentDate(),
                                                payment.getPaymentFrequency().getInterval(),
                                                payment.getPaymentEndDate(),
                                                payment);
       
        payment.setQuartzTriggerHandle( handle );

        return result;
    }
View Full Code Here


                    assert ((Boolean)getValue("#{accountHome.idDefined}"));               
                    Account account = (Account) getValue("#{selectedAccount}");               
                    assert account !=null;
                    assert account.getId() == 1;
                    assert account.getPayments().size() == 1;
                    Payment payment = account.getPayments().get(0);
                    assert new BigDecimal("100.00").equals(payment.getAmount());
                    //assert !payment.getActive();
                    //assert payment.getLastPaid() != null;
                    assert new BigDecimal("901.46").equals(account.getBalance());
                }
               
View Full Code Here

                    Account account = (Account) getValue("#{selectedAccount}");               
                    assert account !=null;
                    assert account.getId() == 1;
                    assert account.getPayments().size() == 1;              
                   
                    Payment payment = (Payment) getValue("#{newPayment}");
                    assert payment.getPayee().equals("IRS");
                    assert payment.getAmount().equals(new BigDecimal("100.00"));
                    assert payment.getAccount() != null;
                    assert payment.getAccount().getId() == 1;
                    quartzTriggerHandle = payment.getQuartzTriggerHandle();
                }
               
            }.run();
           
            // Wait, let quartz execute the job (async but straight away)
            pause(500);
           
            new FacesRequest("/search.xhtml", id)
            {
   
                @Override
                protected void beforeRequest()
                {
                    setParameter("accountId", "1");
                }
               
                @Override
                protected void renderResponse() throws Exception
                {
                    assert ((Boolean)getValue("#{accountHome.idDefined}"));               
                    Account account = (Account) getValue("#{selectedAccount}");               
                    assert account !=null;
                    assert account.getId() == 1;
                    assert account.getPayments().size() == 1;
                    Payment payment = account.getPayments().get(0);
                    assert new BigDecimal("100.00").equals(payment.getAmount());
                    assert !payment.getActive();
                    assert ONCE.equals(payment.getPaymentFrequency());
                    assert payment.getLastPaid() != null;
                    assert new BigDecimal("901.46").equals(account.getBalance());
                }
               
            }.run();
        }
View Full Code Here

                Account account = (Account) getValue("#{selectedAccount}");
                assert account !=null;
                assert account.getId() == 1;
                assert account.getPayments().size() == 0;
              
                Payment payment = (Payment) getValue("#{newPayment}");
                assert payment.getPayee().equals("Somebody");
                assert payment.getAccount() != null;
                assert payment.getAccount().getId() == 1;
               
            }           
        }.run();
       
       
View Full Code Here

TOP

Related Classes of org.jboss.seam.example.quartz.Payment

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.