File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JBoss/WildFly and the fly likes Startup/Shutdown class in JBOSS 4.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Startup/Shutdown class in JBOSS 4.0" Watch "Startup/Shutdown class in JBOSS 4.0" New topic

Startup/Shutdown class in JBOSS 4.0

Rajesh MadhanGopal
Ranch Hand

Joined: Jan 19, 2006
Posts: 70

Could someone tell me how to write a simple startup class which would start when i start the app server.

The following are the steps i performed :

1. Wrote a Mbean interface.
2. Wrote a Startup class implementing the Mbean interface.
3. Created a JAR of the 2 class files.

Now, where do i add the JAR file and also where is the jboss-service.xml in which i need to make an entry for the MBean.

Thanks<br />Rajesh
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

jboss-service is located in the server/yourConfig/conf directory.

You would place the jar file in the deploy directory of server/yourConfig directory. "yourConfig" is whatever you are using. It might be minimal, default, all, or a copy of one of those that you customized for your environment (which is highly recommended to do).


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
I agree. Here's the link:
subject: Startup/Shutdown class in JBOSS 4.0
It's not a secret anymore!