-
1. Re: MainDeployer through JMX in JBoss 5
wolfgangknauf May 3, 2010 8:09 AM (in response to abuantar)Hi,
though it will not really help ;-): https://jira.jboss.org/jira/browse/JBAS-5643
My guess is that "listDeployed" only returns something if the app is deployed using the MainDeployer. An app deployed by copying to the deploy folder will not be returned. But I never verified this guess.
Best regards
Wolfgang
-
2. Re: MainDeployer through JMX in JBoss 5
emuckenhuber May 6, 2010 5:20 AM (in response to wolfgangknauf)Wolfgang Knauf wrote:
Correct. The MainDeployer exposed through JMX is deprecated and only handles deployments directly deployed through it.
As an alternative you could try to use the ProfileService ManagementView to list deployed applications and the ProfileService DeploymentManager in 5.x to deploy/undeploy applications.
-
3. Re: MainDeployer through JMX in JBoss 5
yaserk Aug 23, 2010 3:58 AM (in response to emuckenhuber)Hi Emanuel,
Can DeploymentManager be used to deploy/undeploy applications in Jboss 5.1?
As per the following thread there were some issues with the old JBoss release. (http://community.jboss.org/thread/147362)
I am getting the following exception while trying to run the sample program "DeploymentTest.java":
javax.naming.CommunicationException
[Root exception is java.lang.ClassNotFoundException: org.jboss.aspects.security.SecurityClientInterceptor (no security manager: RMI class loader disabled)]
at org.jnp.interfaces.NamingContext.lookup(
NamingContext.java:845)
at org.jnp.interfaces.NamingContext.lookup(
NamingContext.java:686)
at javax.naming.InitialContext.lookup(Unknown Source)
at tester.DeploymentTest.getProfileService(
DeploymentTest.java:70)
at tester.DeploymentTest.getDeploymentManager(
DeploymentTest.java:63)
at tester.DeploymentTest.deployAndUndeploy(
DeploymentTest.java:17)
Br,
Yaser
-
4. Re: MainDeployer through JMX in JBoss 5
emuckenhuber Aug 24, 2010 5:13 AM (in response to yaserk)Yaser Khursheed wrote:
Can DeploymentManager be used to deploy/undeploy applications in Jboss 5.1?
As per the following thread there were some issues with the old JBoss release. (http://community.jboss.org/thread/147362)
Yes, it can be used for deployment/undeployment of applications, however there haven't been any updates to 5.1 - so in case there are issues you should give AS6 a try. AFAIK you would need to have the following .jars as part of your client classpath:
"client/jbossall-client.jar",
"client/trove.jar",
"client/javassist.jar",
"common/lib/jboss-security-aspects.jar",
"lib/jboss-managed.jar",
"lib/jboss-metatype.jar",
"lib/jboss-dependency.jar" -
5. Re: MainDeployer through JMX in JBoss 5
boblepepeur Sep 8, 2010 11:12 AM (in response to abuantar)synchronized static public void redeployProject(String _project){System.out.println("redépoiement manuel de "+_project);try{InitialContext ctx = new InitialContext(); // From jndi.propertiesProfileService ps = (ProfileService) ctx.lookup("ProfileService");org.jboss.deployers.spi.management.deploy.DeploymentManager deploymentManager = ps.getDeploymentManager();DeploymentProgress redeploy = deploymentManager.redeploy(_project);redeploy.run();}catch (Exception e){e.printStackTrace();System.out.println("Impossible de redéployer l'application "+_project+".");}}if that can help some one :
synchronized static public void redeployProject(String _project)
{
System.out.println("redépoiement manuel de "+_project);
try
{
InitialContext ctx = new InitialContext(); // From jndi.properties
ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
org.jboss.deployers.spi.management.deploy.DeploymentManager deploymentManager = ps.getDeploymentManager();
DeploymentProgress redeploy = deploymentManager.redeploy(_project);
redeploy.run();
}
catch (Exception e)
{
e.printStackTrace();
System.out.println("Impossible de redéployer l'application "+_project+".");
}
}
_projet = "yourproject.war"
that's work with jboss6 and i think 5 too