geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sachin Patel <sppat...@gmail.com>
Subject Re: How do I get the configID from deploymentPlan?
Date Wed, 04 Oct 2006 16:38:47 GMT
So though some debug, the configID is retrieved for all of J2EE is  
retreived from the EARConfigBuilder.  But looks like there is alot of  
overhead involved in getting this.  Is there a simple way I can get  
to the configID?


On Oct 4, 2006, at 11:43 AM, Sachin Patel wrote:

> I must be overlooking something but I'm having trouble using  
> XMLBeans to get to the EnvironmentType for a given deployment plan.
>
> If I have...
>
> XmlObject xmlObject = XmlBeansUtil.parse(planFile.getLocation 
> ().toFile());
>
> from there if I cast to a particular DocumentType (WebAppDocument,  
> etc..) there are no methods to get me to the EnvioronmentType..
>
> So I looked at the o.a.g.deployment.Deployer and in there... and  
> what got me even more confused was the following code...  There are  
> only two implementations of ConfigurationBuilder,  
> (ServiceConfigBuilder and EARConfigBuilder), so how is the configID  
> being retrieved? Where is the getConfigurationID implementation for  
> the other plan types?
>
>
> Object plan = null;
>            ConfigurationBuilder builder = null;
>             for (Iterator i = builders.iterator(); i.hasNext();) {
>                 ConfigurationBuilder candidate =  
> (ConfigurationBuilder) i.next();
>                 System.out.println("***********" +  
> candidate.getClass().getName());
>                 plan = candidate.getDeploymentPlan(planFile,  
> module, idBuilder);
>                 if (plan != null) {
>                     builder = candidate;
>                     break;
>                 }
>             }
>             if (builder == null) {
>                 throw new DeploymentException("Cannot deploy the  
> requested application module because no deployer is able to handle  
> it. " +
>                         " This can happen if you have omitted the  
> J2EE deployment descriptor, disabled a deployer module, or if, for  
> example, you are trying to deploy an" +
>                         " EJB module on a minimal Geronimo server  
> that does not have EJB support installed.  (" +
>                         (planFile == null ? "" : "planFile=" +  
> planFile.getAbsolutePath()) +
>                         (moduleFile == null ? "" : (planFile ==  
> null ? "" : ", ") + "moduleFile=" + moduleFile.getAbsolutePath()) +  
> ")");
>             }
>
>             Artifact configID = builder.getConfigurationID(plan,  
> module, idBuilder);
>
> Thanks
>
> -sachin
>
>


-sachin



Mime
View raw message