Author: scabanovich
Date: 2011-04-05 15:27:32 -0400 (Tue, 05 Apr 2011)
New Revision: 30339
Added:
trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.2/jboss-esb-listener.xml
Modified:
trunk/esb/tests/org.jboss.tools.esb.core.test/src/org/jboss/tools/esb/core/test/ESBModelTest.java
Log:
JBIDE-8616
https://issues.jboss.org/browse/JBIDE-8616
Added:
trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.2/jboss-esb-listener.xml
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.2/jboss-esb-listener.xml
(rev 0)
+++
trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.2/jboss-esb-listener.xml 2011-04-05
19:27:32 UTC (rev 30339)
@@ -0,0 +1,113 @@
+<?xml version="1.0"?>
+<jbossesb
+
xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc...
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://anonsvn.labs.jboss.com/labs/jbossesb/trun...
http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/etc/schem...
+ <providers>
+ <fs-provider name="flat-file">
+ <fs-bus busid="flat-file-channel">
+ <fs-message-filter directory="C:\soa\input" input-suffix="in"
+ post-delete="true" work-suffix="work"/>
+ </fs-bus>
+ </fs-provider>
+ <jms-provider connection-factory="ConnectionFactory"
name="arrival-queue-provider">
+ <jms-bus busid="arrival-queue-channel">
+ <jms-message-filter dest-name="queue/ArrivalQueue"
dest-type="QUEUE"/>
+ </jms-bus>
+ </jms-provider>
+ <bus-provider name="custom-provider">
+ <bus busid="custom-provider-channel"/>
+ </bus-provider>
+ </providers>
+ <services>
+ <service category="com.example.soa" description="Example SOA
Service"
+ invmScope="GLOBAL" name="soa-test">
+ <listeners>
+ <fs-listener busidref="flat-file-channel" is-gateway="true"
+ name="fs-example" poll-frequency-seconds="5"/>
+ </listeners>
+ <actions mep="OneWay">
+ <action class="com.example.soa.soa.action.ExceptionActionHandler"
name="exceptionHandler">
+ <property name="exceptionMethod"
value="exceptionHandler"/>
+ </action>
+ <action class="org.jboss.soa.esb.actions.SystemPrintln"
name="sysout">
+ <property name="message" value="MESSAGE"/>
+ <property name="printfull" value="true"/>
+ </action>
+ <action class="org.jboss.soa.esb.smooks.SmooksAction"
name="transform">
+ <property name="smooksConfig"
value="/META-INF/smooks/example1.xml"/>
+ <property name="resultType" value="JAVA"/>
+ <property name="javaResultBeanId" value="arrivalBean"/>
+ </action>
+ </actions>
+ </service>
+ <service category="com.example.soa" description="ArrivalQueue"
+ invmScope="GLOBAL" name="arrival-service">
+ <listeners>
+ <jms-listener busidref="arrival-queue-channel"
is-gateway="true" name="arrival-queue-listener"/>
+ </listeners>
+ <actions mep="OneWay">
+ <action class="com.example.soa.soa.action.ExceptionActionHandler"
name="exceptionHandler">
+ <property name="exceptionMethod"
value="exceptionHandler"/>
+ </action>
+ <action class="com.example.soa.soa.action.ExtendedLogActionHandler"
name="logBody">
+ <property name="logLevel" value="INFO"/>
+ </action>
+ <action class="org.jboss.soa.esb.actions.ContentBasedRouter"
name="cbr-router">
+ <property name="cbrAlias" value="Drools"/>
+ <property name="ruleSet"
value="/META-INF/drools/airport-code.drl"/>
+ <property name="ruleLanguage"/>
+ <property name="destinations">
+ <route-to destination-name="ERROR"
+ service-category="com.example.soa"
service-name="error-service"/>
+ <route-to destination-name="SUCCESS"
+ service-category="com.example.soa"
service-name="successful-record"/>
+ </property>
+ <property name="object-paths">
+ <object-path
esb="body.'org.jboss.soa.esb.message.defaultEntry'"/>
+ </property>
+ </action>
+ </actions>
+ </service>
+ <service category="com.example.soa" description="Error Service"
+ invmScope="GLOBAL" name="error-service">
+ <actions mep="OneWay">
+ <action class="com.example.soa.soa.action.ExtendedLogActionHandler"
name="logBody">
+ <property name="logLevel" value="INFO"/>
+ <property name="logMessage" value="ERROR"/>
+ </action>
+ <action class="com.example.soa.soa.action.ExtractArrival"
name="extractPrevAirport"/>
+ <action class="org.jboss.soa.esb.services.jbpm.actions.BpmProcessor"
name="bpm-action">
+ <property name="command"
value="StartProcessInstanceCommand"/>
+ <property name="process-definition-name"
value="soa-process"/>
+ <property name="transition-name" value="start"/>
+ <property name="esbToBpmVars">
+ <mapping bpm="previousAirport" esb="previousAirport"/>
+ </property>
+ </action>
+ </actions>
+ </service>
+ <service category="com.example.soa" description="Error Service"
+ invmScope="GLOBAL" name="successful-record">
+ <actions mep="OneWay">
+ <action class="com.example.soa.soa.action.ExtendedLogActionHandler"
name="logBody">
+ <property name="logLevel" value="INFO"/>
+ <property name="logMessage" value="SUCCESS"/>
+ </action>
+ </actions>
+ </service>
+ <service category="com.example.soa"
+ description="Custom Listener Example" invmScope="GLOBAL"
name="custom-listener-example">
+ <listeners>
+ <listener busidref="custom-provider-channel"
name="custom-listener" is-gateway="true">
+ <property name="gatewayClass"
value="com.example.soa.listener.MyFileListener"/>
+ </listener>
+ </listeners>
+ <actions mep="OneWay">
+ <action class="com.example.soa.soa.action.ExtendedLogActionHandler"
name="logBody">
+ <property name="logLevel" value="INFO"/>
+ <property name="logMessage" value="SUCCESS"/>
+ </action>
+ </actions>
+ </service>
+ </services>
+</jbossesb>
Property changes on:
trunk/esb/tests/org.jboss.tools.esb.core.test/projects/Test/esb-1.2/jboss-esb-listener.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified:
trunk/esb/tests/org.jboss.tools.esb.core.test/src/org/jboss/tools/esb/core/test/ESBModelTest.java
===================================================================
---
trunk/esb/tests/org.jboss.tools.esb.core.test/src/org/jboss/tools/esb/core/test/ESBModelTest.java 2011-04-05
19:15:13 UTC (rev 30338)
+++
trunk/esb/tests/org.jboss.tools.esb.core.test/src/org/jboss/tools/esb/core/test/ESBModelTest.java 2011-04-05
19:27:32 UTC (rev 30339)
@@ -58,7 +58,27 @@
assertTrue("Cannot find objects at " + errorCount + " paths\n" +
sb.toString(), errorCount == 0);
}
*/
-
+
+ public void testListener() {
+ XModelObject object = getFileObject("esb-1.2",
"jboss-esb-listener.xml", ESBConstants.ENT_ESB_FILE_120);
+
+ StringBuffer errorList = new StringBuffer();
+
+ checkAttributeValue(object,
+ "Services/custom-listener-example/Listeners/custom-listener",
+ "is gateway",
+ "true",
+ errorList);
+
+ checkAttributeValue(object,
+ "Services/arrival-service/Listeners/arrival-queue-listener",
+ "is gateway",
+ "true",
+ errorList);
+
+ assertTrue(errorList.toString(), errorList.length() == 0);
+ }
+
public void testJMSExample() {
XModelObject object = getFileObject("esb-1.0.1",
"jboss-esb-jms.xml");