-
1. Re: JBoss6 MainDeployer equivalent in Jboss as7?
wdfink Jul 2, 2012 2:28 PM (in response to pragalathan)JBoss AS7 is a (mostly) new implementation so everything might be different.
So what you want to achieve? Most of the administration can be managed by the CLI or even the management API.
-
2. Re: JBoss6 MainDeployer equivalent in Jboss as7?
alesj Jul 2, 2012 7:01 PM (in response to wdfink)Perhaps look at how IntelliJ does it (afaik, it's oss), or how Arquillian remote container is impled.
-
3. Re: JBoss6 MainDeployer equivalent in Jboss as7?
pragalathan Jul 3, 2012 12:57 AM (in response to pragalathan)@Wolf-Dieter Fink
Thanks for the reply.
Netbeans has a functionality to
- register a jboss server instance
- start/stop server
- deploy/undeploy modules
- run server in debug mode, etc
The entire idea behind this, is built on RMI. Becaue of this, JBoss As 7 is not recognized as a valid server. So I have modified the plugin code (http://netbeans.org/bugzilla/show_bug.cgi?id=200132) to register, start and stop the new AS 7.
However, the remaining part of the code looks for certain RMI attributes/operation (such as the one I asked) for deployment management.
I clearly understand that CLI is the best way to handle this. However, at this point, rewriting the entire plugin may not be feasible unless otherwise RMI is not possible at all in AS 7.
Need your advice and direction.
@Ales Justin
Can you please give me the link for IntellJ plugin source?
-
4. Re: JBoss6 MainDeployer equivalent in Jboss as7?
sfcoy Jul 3, 2012 8:48 AM (in response to pragalathan)1 of 1 people found this helpfulYou can use the ModelControllerClient for this purpose. We're doing something like the following in an embedded solution:
{code:java} ModelControllerClient modelControllerClient = ModelControllerClient.Factory.create(InetAddress.getByName("localhost"), 9999);
ModelControllerClientServerDeploymentManager deploymentManager = new ModelControllerClientServerDeploymentManager(
modelControllerClient);
DeploymentPlanBuilder deploymentPlanBuilder = deploymentManager.newDeploymentPlan();
for (File deployment : deployments) {
deploymentPlanBuilder = deploymentPlanBuilder.add(deployment).andDeploy();
}
DeploymentPlan deploymentPlan = deploymentPlanBuilder.build();
Future<ServerDeploymentPlanResult> deploymentResult = deploymentManager.execute(deploymentPlan);
ServerDeploymentPlanResult result = deploymentResult.get(2, TimeUnit.MINUTES);
for (DeploymentAction deploymentAction : deploymentPlan.getDeploymentActions()) {
ServerDeploymentActionResult deploymentActionResult = result.getDeploymentActionResult(deploymentAction.getId());
}
{code}
I found many of the clues for this in the JBoss Tools source.
-
5. Re: JBoss6 MainDeployer equivalent in Jboss as7?
pragalathan Jul 16, 2012 12:39 PM (in response to sfcoy)The problem I have is, I wont be able to use these classes as I cant introduce dependency on any particular version of JBoss client jar files. Because this module should be able to register any version of JBoss instance with the IDE.
Is there any other way to query the status of the server/applications without introducing dependency?
-
6. Re: JBoss6 MainDeployer equivalent in Jboss as7?
pragalathan Sep 17, 2012 4:30 AM (in response to pragalathan)Thanks guys for your inputs. I found jsr88 being useful for this requirement. So i started using JSR88Client.
More details at https://community.jboss.org/wiki/JSR88Client