One. Load the Class method during JBoss startup
A. Write Class, you want to import org.jboss.varia.scheduler.schedulable package, this package is placed in% jboss_disc% / server / all / lib directory, at the same time / ALL / LIB directory in order to load.
B. Modify% jboss_disc% / server / all / conf / jboss-service.xml file
Add a following text:
Name = "jboss. piosan.util: service = Scheduler"> C. Attachment Piosantimer.java source code example / * * CREATED ON 2003-11-6 * * To change the template for this generated file go to * Window - Preferences - Java - Code Generation - Code and Comments * / Package com.util; Import java.util.date; Import org.jboss.varia.scheduler. *; Public class piosantimer implements schedulable { PRIVATE STRING NAME; PRIVATE Long Value; Public Piosantimer (String Name, long value) { THIS.NAME = Name; THIS.VALUE = VALUE; System.out.println ("Name =" Name "Value =" Value); } / ** This function will be performed automatically. * / Public Void Perform (Date now, long remainingrepetitions) { System.out.println ("Perform, now:" Now ", RemainingRepetitions:" RemainingRepetitions ", Name:" Name ", Value:" value); } }