This content has been marked as final.
Show 1 reply
-
1. Re: How to instantiate a user defined class during JBOSS startup
ktfan Mar 15, 2012 6:10 AM (in response to ktfan)I found that I can use EJB startup bean to do this.
@Singleton
@Startup
public class StartUpClass{
static{System.out.println("StartUpClass............");}
public StartUpClass()
{
System.out.println("starting startup class...");
}
@PostConstruct
private void startup()
{
System.out.println("startup...");
}
@PreDestroy
private void shutdown()
{
System.out.println("shutdown...");
}
}