-
1. Re: Run a class method when JBoss startup/an EAR is deployed
gulaplaarajasekhar Sep 7, 2005 4:41 AM (in response to gioele)I can just suggest you an idea, But I am sure that it will work, if done correctly.But there may be even other ways better thatn what I say??.
The way i am saying is that You have to touch the source of Jboss. Find the method where it says or prints the statement JBOSS started/ Find the place in the class where it really starts the jboss. At that place try to call you method.
and Similarly there should be another place where it says the ear/war file is successfully deployed.
Thanks
G.Rajasekhar -
2. Re: Run a class method when JBoss startup/an EAR is deployed
raja05 Sep 7, 2005 5:15 AM (in response to gioele)You can write listeners to listen for specific events. In your case, there are events that are generated when a EAR is deployed.
http://wiki.jboss.org/wiki/Wiki.jsp?page=ExampleMinimalNotificationListener
The link above gives info on how to create a notification. The various Deployer classes in JBoss (Maindeployer,Eardeployer, JarDeployer) send out various events and can be captured .