IntelliJ Java IDE
The moose likes JBoss and the fly likes Programmatically undeploy an ear Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » JBoss
Reply Bookmark "Programmatically undeploy an ear" Watch "Programmatically undeploy an ear" New topic
Author

Programmatically undeploy an ear

Archanaa Panda
Greenhorn

Joined: Dec 10, 2004
Posts: 3
Hi,

Is it possible to programmatically undeploy an ear by using EARDeployer or any other means?

We have a strange requirement in our project as follows-

"We have an EAR file, there has an InitServlet which check some external
resources ( like SMS server blah blah ) whether they are available or not
while starting the server.

Now I want an application which won't allow application server to deploy the
whole EAR file if some external entities are missing. Also if the
application is running ( deployed ) and in-between the same external
entities becomes unavailable then it should undeploy the whole EAR file and
whenever any user try to access the application ( at this time when the
application is undeployed ) s/he should get a message that xxx application
is unavailable because of XXX problem."
Jeff Shelley
Ranch Hand

Joined: May 21, 2003
Posts: 70
That shouldn't be too bad. If you can do something from the JMX-console, you can do it by invoking methods on the underlying mbeans. You just need to lookup the service you wish to use, from the MBeanServer and invoke. If you're not familiar with MBean concepts, there are some JMX tutorials out there that should help.

Have a good one!
--Jeff


It's almost Friday
Rafael Forte
Greenhorn

Joined: Dec 07, 2004
Posts: 8
Why don't you block requests using servlet-filter?
Regards,
Rafael Forte
 
 
subject: Programmatically undeploy an ear
 
Threads others viewed
Problem to run the Cilent about HFEJB chapter1
UnDeploy task is not working properly
Integrating jBoss 4.0.4 with Netbeans 6
Best practice for application configuration
Classloader problem in Websphere
IntelliJ Java IDE