There is no direct support for hot deploying MBeans
in 2.4.4, it is there in 3.0 Service Deployer.
I believe the new brand new unified deployer in 3.0
allows MBeans, wars, ears, etc. etc. to be deployed and
started together all sharing the same classloader.
You can however do some of what you want manually in
2.4.4 using either http://localhost:8082 or the RMI JMX connector.
if you have services that depends on EJB, then the simple is to create a "SAR" that contains the classes like a jar and the META-INF/jboss-service.xml file that contains the snippet of XML from the jcml file (just copy over). Then the EJB classes in fact the whole JAR can be embedded in the SAR (at the top level) and that will make sure that the service will be deployed with the bean and after the bean.
You can do it the other way around, have the JAR, standard from teh spec and include a SAR in it and the service will deploy.
I am about to write whitepapers on this.
I tried this hot deploy. Put in a sar-file the classes of a simple MBean and a META-INF/jboss-service.xml
with following code:
<?xml version="1.0" encoding="UTF-8"?>
But I get this exception:
[10:47:22,694,ServiceDeployer] Problem deploying url file:/C:/jboss-Tomcat/jboss/deploy/lib/Hotdeplo
ytest.sar, no valid service.xml file found.
org.jboss.deployment.DeploymentException: No META-INF/jboss-service.xml found in alleged sar!
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.Thread.run(Unknown Source)
What did I wrong?
Many thanx in advance!!
Looks ok from your description.
Can you post the output for
jar -tf Hotdeploytest.sar
Thank you very much, warjort!!!!! 8-))))
I found the error. When I tried
jar -tf Hotdeploytest.sar:
So it was only an error with the capital-letters in the batch-file to make this sar...
But now it works!!