[jboss-dev-forums] [Design of POJO Server] - Re: Deploying Ears and Wars through ProfileService

mark.spritzler do-not-reply at jboss.com
Sat May 24 00:40:32 EDT 2008


So this is different than what you posted a couple posts before? :D



  | // Distribute the content
  |       DeploymentManager mgtView = getDeploymentManager();
  | 

So different here in that it is a different Manager rather than in the ManagementView class. 

Is it possible to get the DeploymentManager from the ManagementView class, like mgtView.getDeploymentManager(), instead of a jndi lookup. (I think you mentioned a lookup was required)


  |       DeploymentProgress progress = mgtView.distribute("testMCBeansDeployment.beans", DeploymentPhase.APPLICATION, contentURL);
  |       progress.addProgressListener(this);
  |       progress.run();
  | 

So, a listener to get callbacks on the lifecycle of the deploying? What does that interface look like, actually I can just look it up.

But the run() goes how far, in the case of a war file?


  |       DeploymentStatus status = progress.getDeploymentStatus();
  |       assertTrue("DeploymentStatus.isCompleted", status.isCompleted());
  |       // It should not be running yet
  |       assertFalse("DeploymentStatus.isRunning", status.isRunning());
  |       assertFalse("DeploymentStatus.isFailed", status.isFailed());
  | 

This confused me just a tad, if only the file has been "copied" but hasn't been fully deployed and started, how is it completed==true. Unless the definition of completed is just that the file has been fully "copied"


  |       // Now start the deployment
  |       progress = mgtView.start("testMCBeansDeployment.beans", DeploymentPhase.APPLICATION);
  |       progress.addProgressListener(this);
  |       progress.run();
  |       status = progress.getDeploymentStatus();
  |       assertTrue("DeploymentStatus.isCompleted", status.isCompleted());
  |       assertTrue("DeploymentStatus.isRunning", status.isRunning());
  |       assertFalse("DeploymentStatus.isFailed", status.isFailed());
  | 

OK, so by looking at this code, it just looks like all the steps of "deploying" a war are all covered so that any management console can keep track of the entire process, instead of a "one swooping step to follow" from a management perspective.

Overall, We are pretty flexible in "mapping" the process to fit into the JON plugin notion. So I don't forsee any issue with how you set this up, as usual it is pretty clean and easy to understand.

Mark

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4153132#4153132

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4153132



More information about the jboss-dev-forums mailing list