[jboss-svn-commits] JBL Code SVN: r21330 - in labs/jbossesb/trunk/product: tools/console/management and 1 other directory.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Sat Aug 2 06:13:30 EDT 2008


Author: tfennelly
Date: 2008-08-02 06:13:30 -0400 (Sat, 02 Aug 2008)
New Revision: 21330

Modified:
   labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/Generator.java
   labs/jbossesb/trunk/product/tools/console/management/build.xml
Log:
https://jira.jboss.org/jira/browse/JBESB-1894

Modified: labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/Generator.java
===================================================================
--- labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/Generator.java	2008-08-02 07:56:12 UTC (rev 21329)
+++ labs/jbossesb/trunk/product/rosetta/src/org/jboss/soa/esb/listeners/config/Generator.java	2008-08-02 10:13:30 UTC (rev 21330)
@@ -271,12 +271,20 @@
             List<Service> services = getServices();
 
             for(Service service : services) {
-				for(Listener serviceListener : service.getListeners().getListenerList()) {
-					if(serviceListener == listener) {
-						return service;
-					}
-				}
-			}
+                ListenersDocument.Listeners listeners = service.getListeners();
+
+                if(listeners != null) {
+                    List<Listener> listenerList = listeners.getListenerList();
+
+                    if(listenerList != null) {
+                        for(Listener serviceListener : listenerList) {
+                            if(serviceListener == listener) {
+                                return service;
+                            }
+                        }
+                    }
+                }
+            }
 			
 			throw new IllegalStateException("No Service instance found for the supplied Listener instance.  This should not be possible if the Listener instance was provided by this configuration.  Where has this Listener instance come from?");
 		}

Modified: labs/jbossesb/trunk/product/tools/console/management/build.xml
===================================================================
--- labs/jbossesb/trunk/product/tools/console/management/build.xml	2008-08-02 07:56:12 UTC (rev 21329)
+++ labs/jbossesb/trunk/product/tools/console/management/build.xml	2008-08-02 10:13:30 UTC (rev 21330)
@@ -2,9 +2,8 @@
 <project name="jboss-esb-console" default="jar" basedir=".">
 	<property name="esb.root.dir" location="../../.."/>
 	<property name="console.dir" value="${esb.root.dir}/tools/console"/>
-	<property file="${esb.root.dir}/tools/console/management-esb/db.properties"/>	
+	<property file="${esb.root.dir}/tools/console/management-esb/db.properties"/>
 	<property name="mgmt.dir" location="."/>
-	<property name="lib.dir" location="${mgmt.dir}/../../../lib"/>
 	<property name="mgmt.build.dir" location="${mgmt.dir}/build"/>
 	<property name="src.java.dir" location="${mgmt.dir}/src/main/java"/>
 
@@ -12,19 +11,40 @@
 		<delete dir="${mgmt.build.dir}"/>
 	</target>
 
+    <!-- Are we embedded in a source hierarchy? -->
+    <condition property="hierarchy.source">
+      <available file="${esb.root.dir}/build-distr.xml"/>
+    </condition>
+    <!-- Are we embedded in a jbossesb distribution hierarchy? -->
+    <condition property="hierarchy.jbossesb">
+      <available file="${esb.root.dir}/JBossORG-EULA.txt"/>
+    </condition>
+
+    <target name="dependencies" depends="dependencies.source, dependencies.jbossesb"/>
+    <target name="dependencies.jbossesb" if="hierarchy.jbossesb">
+        <property name="lib.dir" location="${mgmt.dir}/../../../lib"/>
+    </target>
+    <target name="dependencies.source" if="hierarchy.source">
+        <available file="${esb.root.dir}/build/jbossesb" property="dist.exists"/>
+        <fail unless="dist.exists"
+              message="JBossESB must be built. Please run 'ant dist' in ${esb.root.dir}"/>
+
+        <property name="lib.dir" location="${mgmt.dir}/../../../build/lib"/>        
+    </target>
+
         <target name="define-lib">
-		<condition property="esb.lib.dir" 
+		<condition property="esb.lib.dir"
 			value="${esb.root.dir}/lib/ext">
 			<available type="dir" file="${esb.root.dir}/lib/ext"/>
 		</condition>
 		<condition property="esb.lib.dir"
 			value="${esb.root.dir}/server/default/deploy/jbossesb.sar/lib">
 			<available type="dir" file="${esb.root.dir}/server/default/deploy/jbossesb.sar/lib"/>
-		</condition>	
+		</condition>
                 <condition property="esb.lib.dir"
                          value="${esb.root.dir}/server/all/deploy/jbossesb.sar/lib">
                          <available type="dir" file="${esb.root.dir}/server/all/deploy/jbossesb.sar/lib"/>
-                </condition> 
+                </condition>
 		<condition property="esb.lib.dir"
                          value="${esb.root.dir}/server/all/deploy/jbossesb.sar/lib">
                          <available type="dir" file="${esb.root.dir}/server/all/deploy/jbossesb.sar/lib"/>
@@ -34,7 +54,7 @@
                         <available type="dir" file="../../../server/default/lib"
 />
                 </condition>
-                <property name="server.lib.dir" value="${esb.lib.dir}"/>	
+                <property name="server.lib.dir" value="${esb.lib.dir}"/>
 		<path id="build.classpath">
 			<fileset dir="${esb.root.dir}/tools/console/management-web/lib">
 				<include name="*.jar"/>
@@ -73,22 +93,22 @@
                 <property name="lib.dir" location="lib.dir.path"/>
         </target>
 
-	<target name="init" depends="define-lib">
+	<target name="init" depends="dependencies, define-lib">
 		<mkdir dir="${mgmt.build.dir}"/>
 		<mkdir dir="${mgmt.build.dir}/classes"/>
 	</target>
 
-	<target name="compile" depends="init" 
+	<target name="compile" depends="init"
 			description="Build the management war">
 		<echo>${esb.root.dir}</echo>
 		<mkdir dir="${mgmt.build.dir}/classes"/>
-		<javac classpathref="build.classpath" 
-			        destdir="${mgmt.build.dir}/classes" 
-			        debug="on" 
+		<javac classpathref="build.classpath"
+			        destdir="${mgmt.build.dir}/classes"
+			        debug="on"
 				includes="org/jboss/soa/esb/monitoring/**"
 				source="1.5"
 				target="1.5"
-			    	deprecation="${javac.deprecation}" 
+			    	deprecation="${javac.deprecation}"
 			        nowarn="on">
 			<src path="${rosetta.src}"/>
 			<src path="${src.java.dir}"/>
@@ -98,14 +118,14 @@
 		</copy>
 	</target>
 
-	<target name="jar" depends="compile" 
+	<target name="jar" depends="compile"
 			description="Build the distribution .jar file">
 		<mkdir dir="${mgmt.dir}/build"/>
 		<property file="${db}.properties"/>
 		<echo>${db}</echo>
 		<echo>${console.dir}</echo>
 		<copy file="monitoring.cfg.xml" todir="${mgmt.build.dir}" overwrite="true">
-			<filterset>	
+			<filterset>
 				<filter token="connection.datasource" value="${connection.datasource}"/>
 				<filter token="db.dialect" value="${db.dialect}"/>
 			</filterset>




More information about the jboss-svn-commits mailing list