[jboss-user] [EJB 3.0] - Re: How to run code on deployment?

pmpm do-not-reply at jboss.com
Fri Aug 18 04:54:16 EDT 2006


AFAIK there is no standard way do this.
My solution on JBoss looks like this:


  | @Service
  | @Depends( { 
  | //things i need before my startup code executes 	"jboss.j2ee:ear=baks-erp.ear,jar=baks-erp-ejb3.jar,name=TheBeanINeedInStartupCodeEJB,service=EJB3",
  | 	})
  | public class StartupClass implements StartupClassManagement
  | {
  | 	public void start() throws Exception
  | 	{
  | 		//code to be executed on startup
  | 	}
  | }
  | 


  | @Management
  | public interface StartupClassManagement
  | {
  | 	public void start() throws Exception;
  | }
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965977#3965977

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965977



More information about the jboss-user mailing list