[jboss-svn-commits] JBL Code SVN: r26391 - labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed May 6 04:55:42 EDT 2009


Author: beve
Date: 2009-05-06 04:55:42 -0400 (Wed, 06 May 2009)
New Revision: 26391

Modified:
   labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbConfigParser.java
   labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployer.java
   labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployment.java
   labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbMetaData.java
Log:
Modified the archive name of the EsbMetaData to be the simpleName of the deployment unit. This was causing the load_generator quickstart to malfunction and 
I would not have noticed this other wise. 
Ran the integation test once more and they passed. I've had a failure one integration test to which I cannot determine the reason. Will keep my eye out for it though.


Modified: labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbConfigParser.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbConfigParser.java	2009-05-06 03:01:06 UTC (rev 26390)
+++ labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbConfigParser.java	2009-05-06 08:55:42 UTC (rev 26391)
@@ -163,7 +163,7 @@
     protected EsbMetaData parse(final VFSDeploymentUnit deploymentUnit, final VirtualFile file, final EsbMetaData metadata) throws Exception
     {
         final String esbConfigXml = readEsbConfigFile(file);
-        final String archiveName = file.getPathName();
+        final String archiveName = deploymentUnit.getSimpleName();
         final String deploymentName = getDeploymentName(deploymentUnit);
         final ModelAdapter model = JBossDeployerUtil.getJbossEsbModel(esbConfigXml);
         

Modified: labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployer.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployer.java	2009-05-06 03:01:06 UTC (rev 26390)
+++ labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployer.java	2009-05-06 08:55:42 UTC (rev 26391)
@@ -126,11 +126,12 @@
      */
     private BeanMetaData createBeanMetaData(final VFSDeploymentUnit deploymentUnit, final EsbMetaData esbMetaData) throws DeploymentException, IOException
     {
+        log.info(esbMetaData);
         BeanMetaDataBuilder bmdBuilder = BeanMetaDataBuilder.createBuilder(BEAN_PREFIX + "." + deploymentUnit.getName(), EsbDeployment.class.getName());
         // Setup the first constructor argument (esb config xml).
         bmdBuilder.addConstructorParameter(String.class.getName(), esbMetaData.getEsbConfigXml());
         // Setup the second constructor argument (esb archive name).
-        bmdBuilder.addConstructorParameter(String.class.getName(), esbMetaData.getDeploymentName());
+        bmdBuilder.addConstructorParameter(String.class.getName(), esbMetaData.getArchiveName());
         // Setup the third constructor argument (the name of the mbean).
         final String mbeanName = BEAN_PREFIX + ":deployment=" + deploymentUnit.getSimpleName();
         bmdBuilder.addConstructorParameter(String.class.getName(), mbeanName);

Modified: labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployment.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployment.java	2009-05-06 03:01:06 UTC (rev 26390)
+++ labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbDeployment.java	2009-05-06 08:55:42 UTC (rev 26391)
@@ -75,7 +75,6 @@
 
     public void setPublishers(final List<ContractReferencePublisher> publishers)
     {
-        log.info("Setting contract publishers : " + publishers);
         this.publishers = publishers;
     }
 

Modified: labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbMetaData.java
===================================================================
--- labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbMetaData.java	2009-05-06 03:01:06 UTC (rev 26390)
+++ labs/jbossesb/workspace/dbevenius/jbossas5/product/rosetta/src/org/jboss/soa/esb/listeners/deployers/mc/EsbMetaData.java	2009-05-06 08:55:42 UTC (rev 26391)
@@ -28,16 +28,13 @@
 
 import javax.management.ObjectName;
 
+import org.jboss.internal.soa.esb.assertion.AssertArgument;
 import org.jboss.internal.soa.esb.publish.ContractReferencePublisher;
 import org.jboss.soa.esb.listeners.config.model.ModelAdapter;
 
 /**
  * Metadata for an ESB deployment.
  * <p/>
- * This metadata is intended to be created by a Deployment Parser. 
- * A deploymentparser could read an xml configuration file, or it could gather the same
- * information in some other way, perhaps using annotations on class files, another
- * language, etc.
  *
  * @author <a href="mailto:dbevenius at jboss.com">Daniel Bevenius</a>
  */
@@ -55,24 +52,29 @@
     /** The deployments dependencies */
     private final Set<ObjectName> dependencies ;
     
-    /** The deployment name */
+    /** The deployment name. The .esb archive name without the .esb suffix */
     private final String deploymentName;
     
     /** The adapter for querying the model */
     private ModelAdapter model;
     
+    /** The publishers for this deployment */
     private List<ContractReferencePublisher> publishers = new ArrayList<ContractReferencePublisher>();
     
     /**
-     * Creates a EsbMetaData with the jboss-esb.xml as a VirtualFile and
-     * the name of the .esb archive.
+     * Sole constructor.
      *
      * @param esbConfigXml      The xml configuration for the ESB.
      * @param archiveName       The name of the .esb archive from which this deployment comes from.
      * @param dependencies      Dependencies of this deployment. This might be object names or simply bean names.
+     * @param model             The ModelAdapter for the deployment.
      */
     public EsbMetaData(final String esbConfigXml, final String archiveName, final String deploymentName, final Set<ObjectName> dependencies, final ModelAdapter model)
     {
+        AssertArgument.isNotNullAndNotEmpty(esbConfigXml, "esbConfigXml");
+        AssertArgument.isNotNullAndNotEmpty(archiveName, "archiveName");
+        AssertArgument.isNotNullAndNotEmpty(deploymentName, "deploymentName");
+        
         this.esbConfigXml = esbConfigXml;
         this.archiveName = archiveName;
         this.deploymentName = deploymentName;
@@ -90,34 +92,64 @@
         return archiveName;
     }
 
+    /**
+     * Gets the esb xml configuration. This is the actual xml
+     * and not a file path or anything else.
+     * @return String The esb xml configuration.
+     */
     public String getEsbConfigXml()
     {
         return esbConfigXml;
     }
     
+    /**
+     * Gets a set of dependencies of this deployment.
+     * 
+     * @return Set<ObjectName> A set of object names that the deployment represented by this instance depends on.
+     */
     public Set<ObjectName> getDependencies()
     {
         return Collections.unmodifiableSet(dependencies);
     }
     
+    /**
+     * The deployment name is the name of the .esb archive without the .esb suffix.
+     * 
+     * @return String The name of the deployment. This is the archive name without the .esb suffix.
+     */
     public String getDeploymentName()
     {
         return deploymentName;
     }
     
+    /**
+     * The model adapter for the configuration.
+     * 
+     * @return ModelAdapter The model adapter for the configuration.
+     */
     public ModelAdapter getModel()
     { 
         return model;
     }
     
+    /**
+     * Sets the publishers for this deployment.
+     * 
+     * @param publishers The publishers for this deployment.
+     */
     public void setPublishers(final List<ContractReferencePublisher> publishers)
     {
         this.publishers = publishers;
     }
     
+    /**
+     * Gets the publishers for this deployment.
+     * 
+     * @return List<ContractReferencePublishers> List of publishers for this deployment.
+     */
     public List<ContractReferencePublisher> getPublishers()
     {
-        return publishers;
+        return Collections.unmodifiableList(publishers);
     }
 
     /**




More information about the jboss-svn-commits mailing list