Issue Details (XML | Word | Printable)

Key: MULE-3342
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Dirk Olmes
Reporter: Jason Carreira
Votes: 1
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Mule

Messages stuck in AMQ when used with jms:transaction tag

Created: 15/May/08 10:16 AM   Updated: 01/Jul/08 07:15 AM
Component/s: Transport: JMS
Affects Version/s: 2.0.0, 2.0.1
Fix Version/s: 2.0.2

Time Tracking:
Not Specified

Environment: ActiveMQ 5.1.0
  • verified with AMQ 4.1.1 by Andrew Perepelytsya

Labels:
User impact: High
Configuration:
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesource.org/schema/mule/core/2.0"
      xmlns:file="http://www.mulesource.org/schema/mule/file/2.0"
      xmlns:jms="http://www.mulesource.org/schema/mule/jms/2.0"
      xmlns:management="http://www.mulesource.org/schema/mule/management/2.0"
      xmlns:spring="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:tx="http://www.springframework.org/schema/tx"

      xsi:schemaLocation="http://www.mulesource.org/schema/mule/core/2.0 http://www.mulesource.org/schema/mule/core/2.0/mule.xsd
		http://www.mulesource.org/schema/mule/file/2.0 http://www.mulesource.org/schema/mule/file/2.0/mule-file.xsd
		http://www.mulesource.org/schema/mule/jms/2.0 http://www.mulesource.org/schema/mule/jms/2.0/mule-jms.xsd
		http://www.mulesource.org/schema/mule/management/2.0 http://www.mulesource.org/schema/mule/management/2.0/mule-management.xsd
		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
		http://www.springframework.org/schema/tx http://www.springframework.org/schema/beans/spring-tx-2.0.xsd">

    <description>JMS Test</description>
    
    <!--=====================================================================================================
		Transformers
	-->
    <custom-transformer class="org.mule.transport.file.transformers.FileToString" name="fileToString"/>

    <!--=====================================================================================================
		Connectors
	-->
    <file:connector name="HFS-InboundMetadataConnector" pollingFrequency="10000" fileAge="1000"
                    moveToDirectory="c:/Data/retention/inbound/metadata"/>

    <file:connector name="HFS-InboundImageConnector" pollingFrequency="10000" fileAge="1000"
                    moveToDirectory="c:/Data/retention/inbound/images"/>

    <file:connector name="outboundConnector" outputPattern="${ORIGINALNAME}"/>

    <jms:activemq-connector name="jmsConnector" eagerConsumer="true"/>

    <!--=====================================================================================================
		Endpoints
	-->
    <file:endpoint name="inboundMetadataDirectoryScannerEndpoint" connector-ref="HFS-InboundMetadataConnector"
                   address="file:///c:/data/faxes/inbound" />

    <file:endpoint name="inboundImageDirectoryScannerEndpoint" connector-ref="HFS-InboundImageConnector"
                   address="file:///c:/data/faxes/inbound"/>

    <file:endpoint name="outboundEndpoint" connector-ref="outboundConnector" address="file:///c:/data/outgoing"/>

    <jms:endpoint name="feederQueue" queue="hfs.feeder.queue"/>
        <!--<jms:transaction action="ALWAYS_BEGIN" timeout="3000"/>-->
    <!--</jms:endpoint>-->

    <!--=====================================================================================================
		Models
	-->
    <model name="HFS-InboundModel">
        <service name="HFS-InboundMetadataScanner">
            <inbound>
                <inbound-endpoint ref="inboundMetadataDirectoryScannerEndpoint" transformer-refs="fileToString">
                    <custom-filter class="org.mule.transport.file.filters.FilenameWildcardFilter">
                        <spring:property name="pattern" value="*.xml"/>
                        <spring:property name="caseSensitive" value="false"/>
                    </custom-filter>
                </inbound-endpoint>
            </inbound>

            <!--<component>-->
                <!--<spring-object bean="fileContentsComponent"/>-->
            <!--</component>-->

            <outbound>
                <outbound-pass-through-router>
                    <jms:outbound-endpoint ref="feederQueue"/>
                </outbound-pass-through-router>
            </outbound>
        </service>

        <service name="HFS-InboundImageScanner">
            <inbound>
                <inbound-endpoint ref="inboundImageDirectoryScannerEndpoint" transformer-refs="fileToString">
                    <base64-encoder-transformer/>
                    <custom-filter class="org.mule.transport.file.filters.FilenameWildcardFilter">
                        <spring:property name="pattern" value="*.tif"/>
                        <spring:property name="caseSensitive" value="false"/>
                    </custom-filter>
                </inbound-endpoint>
            </inbound>

            <!--<component>-->
                <!--<spring-object bean="fileContentsComponent"/>-->
            <!--</component>-->

            <outbound>
                <outbound-pass-through-router>
                    <jms:outbound-endpoint ref="feederQueue"/>
                </outbound-pass-through-router>
            </outbound>
        </service>

        <service name="ReceivedFileProcessor">
            <inbound>
                <jms:inbound-endpoint ref="feederQueue"/>
            </inbound>

            <outbound>
                <outbound-pass-through-router>
                    <file:outbound-endpoint ref="outboundEndpoint"/>
                </outbound-pass-through-router>
            </outbound>
        </service>
    </model>
</mule>


 Description  « Hide
When defining a <jms:endpoint> without an embedded <jms:transaction> tag, messages are written to and read from the JMS Queue. When the <jms:transaction> tag is added, messages do not go through.

 All   Comments   Work Log   Change History   Transitions   FishEye      Sort Order: Ascending order - Click to sort in descending order
Jason Carreira added a comment - 15/May/08 10:16 AM

Andrew Perepelytsya added a comment - 15/May/08 10:54 AM
The test can be simplified to inbound-VM(non-TX) -> outbound-JMS (TX).

Dirk Olmes added a comment - 01/Jul/08 06:56 AM
I have created a simple test that extracts the bug described above. I only have trouble writing a unit test that confirms that a message was sent to the queue.

Dirk Olmes added a comment - 01/Jul/08 07:15 AM
This was fixed by some transaction fixes added after 2.0.1.

Unit test: http://fisheye.codehaus.org/changelog/mule/?cs=12211