[jboss-dev-forums] [Design of POJO Server] - Re: Deploying Ears and Wars through ProfileService
scott.stark@jboss.org
do-not-reply at jboss.com
Fri May 23 10:20:24 EDT 2008
See the latest api in the server trunk along with the org.jboss.test.profileservice.test.DeployUnitTestCase which has tests for deploying an ear, war, sar, and mbeans archive. Currently only the mcbeans archive has any content and illustrates the api basics:
| public void testMCBeansDeployment()
| throws Exception
| {
| URL contentURL = super.getDeployURL("testMCBeansDeployment.beans");
|
| // Distribute the content
| DeploymentManager mgtView = getDeploymentManager();
| DeploymentProgress progress = mgtView.distribute("testMCBeansDeployment.beans", DeploymentPhase.APPLICATION, contentURL);
| progress.addProgressListener(this);
| progress.run();
| 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());
|
| // 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());
| }
|
The currently implementation does upload the content, but its being started by the hot deployment service behavior, so its not the two step process it should be.
This api differs from the jsr88 javaee deployment manager in that the targets(servers) to which a deployment manager applies are implicit rather than explicit. Its also different in that you obtain the DeploymentManager interface from jndi which implies some type of running server. We probably need a DeploymentManagerFactory to allow for different modes of operation.
Take a look at the api and let me know if it fits with the jon notions of profile content management.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4152976#4152976
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4152976
More information about the jboss-dev-forums
mailing list