[jboss-dev-forums] [Design of POJO Server] - Re: Deployment through the ProfileService api

scott.stark@jboss.org do-not-reply at jboss.com
Thu Jan 4 17:02:55 EST 2007


The base deploymentURL is the raw deployment content location (user supplied ear, war, sar, rar, etc.). It has not admin edits associated with it.

See the current org.jboss.system.server.profileservice.VFSScanner for how the current basic ProfileImpl is feed the deployment contexts from the standard bootstrap, deployers and deploy directory contents.

The Profile api is being refactored to tie together repository support so that there is a base deployment notion coming from the addProfileContent method:


  | package org.jboss.profileservice.spi;
  | 
  | import java.io.IOException;
  | import java.util.Collection;
  | import java.util.Map;
  | import java.util.zip.ZipInputStream;
  | 
  | import org.jboss.deployers.spi.structure.DeploymentContext;
  | 
  | /**
  |  * A profile represents a named collection of deployments on a server.
  |  * 
  |  * @author Scott.Stark at jboss.org
  |  * @version $Revision$
  |  */
  | public interface Profile
  | {
  |    /** The class of deployment */
  |    public enum DeploymentPhase {
  |       /** A deployment loaded during the server bootstrap phase */
  |       BOOTSTRAP,
  |       /** An mc/service deployment for a Deployer to be loaded after the BOOTSTRAP phase */
  |       DEPLOYER,
  |       /** Any deployment content to be loaded after the DEPLOYER phase */
  |       APPLICATION
  |    };
  | 
  |    /**
  |     * The x.y.z version of the profile
  |     * 
  |     * @return the version if known, null if its unspecified.
  |     */
  |    public String getVersion();
  | 
  |    /**
  |     * Add raw content (bootstrap, deployers, deployments, libraries, etc) to a
  |     * profile.
  |     * 
  |     * @param name - a logical name for the content added
  |     * @param contentIS - a zip input stream of the content layout as it is
  |     * to be added to the profile.
  |     * @param phase - the phase of the deployment as it relates to when the
  |     * deployment is loaded
  |     * @throws IOException
  |     */
  |    public void addProfileContent(String name, ZipInputStream contentIS, DeploymentPhase phase)
  |       throws IOException;
  | 
  |    /**
  |     * Add a deployment
  |     * 
  |     * @param d the deployment
  |     * @param phase - the phase of the deployment as it relates to when the
  |     * deployment is loaded
  |     */
  |    public void addDeployment(DeploymentContext d, DeploymentPhase phase)
  |       throws Exception;
  | 
  |    /**
  |     * Remove a deployment
  |     * 
  |     * @param name the name
  |     * @param phase - the phase of the deployment as it relates to when the
  |     * deployment is loaded
  |     */
  |    public void removeDeployment(String name, DeploymentPhase phase)
  |       throws Exception;
  | 
  |    /**
  |     * Get a named deployment.
  |     * 
  |     * @param name - the deployment name
  |     * @param phase - the phase of the deployment as it relates to when the
  |     * deployment is loaded
  |     * @return the named bootstrap
  |     * @throws NoSuchDeploymentException - if there is no such bootstrap
  |     */
  |    public DeploymentContext getDeployment(String name, DeploymentPhase phase)
  |       throws NoSuchDeploymentException;
  | 
  |    /**
  |     * Get the names of the deployments in the profile
  |     * @return names of deployments
  |     */
  |    public Collection<String> getDeploymentNames();
  | 
  |    /**
  |     * Get the names of the deployments for the given phase defined in this profile
  |     * @param phase - the phase of the deployment as it relates to when the
  |     * deployment is loaded
  |     * @return names of deployments
  |     */
  |    public Collection<String> getDeploymentNames(DeploymentPhase phase);
  | 
  |    /**
  |     * Get all deployments for the given phase defined in this profile
  |     * 
  |     * @param phase - the phase of the deployment as it relates to when the
  |     * deployment is loaded
  |     * @return the bootstrap instances in this profile.
  |     */
  |    public Collection<DeploymentContext> getDeployments(DeploymentPhase phase);
  | 
  | 
  |    /**
  |     * Get all deployments defined in this profile
  |     * 
  |     * @return the deployment instances in this profile.
  |     */
  |    public Collection<DeploymentContext> getDeployments();
  | 
  |    /**
  |     * Get the config
  |     * 
  |     * @return the config
  |     */
  |    public Map<String, Object> getConfig();
  | }
  | 

The DeploymentTemplate notion has been moved to the ManagedView since it depends on the ManagedObject/ManagedProperty notions. These have been updated to the new mc versions of the classes.

I'm still working to finalize this by tieing together the Profile, ManagentView and repository notions with the aspects that map the admin edits to a ManagedProperty back to the profile repository in the form a DeploymentContext Attachment overrides to the base DeploymentContext Attachments.

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

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



More information about the jboss-dev-forums mailing list