[jboss-dev-forums] [Design of POJO Server] - Re: Bringing the trunk profile service changes to 5_x

emuckenhuber do-not-reply at jboss.com
Wed Feb 25 08:55:45 EST 2009


Hmm we could do it somehow like this:

  | public interface DeploymentTemplate
  | {
  |    // Get the deployment info
  |    DeploymentTemplateInfo getInfo();
  | 
  |    // Get the deployment name
  |    String getDeploymentName(String baseName);
  | 
  |    // Apply template
  |    VirtualFile applyTemplate(DeploymentTemplateInfo info);
  | }
  | 

Where managementView is more or less doing this:

  |    // Create a temp deployment
  |    VirtualFile vf = template.applyTemplate(deploymentInfo);
  |    // Get the deployment name
  |    String deploymentName = template.getDeploymentName(baseName);
  |    // Distribute deployment
  |    deploymentMgr.distribute(deploymentName, vf.toURL(), true);
  |    // Start deployment
  |    deploymentMgr.start(deploymentName);
  |    // Delete temp deployment
  |    vf.delete();
  | 

Although now i really don't know where to put this updateTemplateDeployment(VFSDeployment ctx, DeploymentTemplateInfo values);
IMO a deployment template does not need to know where it gets copied to. Furthermore it won't have access to the DeploymentContext until it's deployed anyway.
Also adding something to the deployments attachment would not make much sense, as it will get lost during the next startup.
I think additional updates to this template should use updateComponent() and be stored as a attachment.

There is also this in the SPI:

  |  * TODO: this needs to be fleshed out in terms of the various pieces, raw deployment
  |  * files, ManagedObjects, etc. 
  | 

not sure what you mean by that - so is there still something missing?

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

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



More information about the jboss-dev-forums mailing list