Don't like ads? PRO users don't see any ads ;-)
Guest

Felipe Cardoso Martins

By: a guest on Aug 1st, 2012  |  syntax: Java  |  size: 0.42 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. package br.com.caelum.loja.session;
  2.  
  3. import javax.annotation.PostConstruct;
  4. import javax.ejb.Schedule;
  5. import javax.ejb.Singleton;
  6. import javax.ejb.Startup;
  7.  
  8. @Singleton
  9. @Startup
  10. public class AppInit {
  11.  
  12.         @PostConstruct
  13.         public void init() {
  14.                 System.out.println("Iniciando a aplicacao.");
  15.         }
  16.        
  17.         @Schedule(minute = "*")
  18.         public void taskAbobrinha() {
  19.                 System.out.println("Rodando a task abobrinha.");       
  20.         }
  21.        
  22. }