I have use case as below.
In my mule flow I have Http as inbound endpoint and jdbc(SQL Server) as outbound. I am trying to insert a record to SQL server whenever flow gets invoked.I also have roll back exception strategy in global level with "on-redelivery-attempts-exceeded" block.
But when ever my database was down I am trying to insert , my flow going throwing exception. Roll back exception with redelivery count is not happing on the flow .
Please need your advice.
*flow file :*
<!-- <jdbc-ee:mssql-data-source name="MS_SQL_Data_Source" user="sa" password="mssql" url="jdbc:sqlserver://VIKRAM-PC\MSSQLEXPRESS:1433;databaseName=testsqldb" transactionIsolation="UNSPECIFIED" doc:name="MS SQL Data Source"/> -->
<jdbc-ee:connector name="Database" dataSource-ref="MSSQLDataSourceBean" validateConnections="true" queryTimeout="-1" pollingFrequency="0" doc:name="Database"/>
<spring:beans>
<spring:bean id="MSSQLDataSourceBean" name="MSSQLDataSourceBean" class="org.enhydra.jdbc.standard.StandardDataSource" >
<spring:property name="driverName" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
<spring:property name="url" value="jdbc:sqlserver://VIKRAM-PC\MSSQLEXPRESS:1433;databaseName=testsqldb;user=sa;password=mssql;"/>
</spring:bean>
</spring:beans>
<rollback-exception-strategy name="Rollback_Exception_Strategy" maxRedeliveryAttempts="3" when="#[exception.causedBy(java.lang.Exception)]"/>
<flow name="DataBaseAsOutBound" doc:name="DataBaseAsOutBound" processingStrategy="synchronous">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8089" path="sqltest" doc:name="HTTP"/>
<logger level="INFO" doc:name="Logger" message="$$$$$$$$$$$$$ start of the flow $$$$$$$$$$$$$$"/>
<jdbc-ee:outbound-endpoint exchange-pattern="one-way" queryKey="insertque" queryTimeout="-1" connector-ref="Database" doc:name="Database">
<jdbc-ee:query key="insertque" value="insert into tesdb(colone,coltwo) values(123,'vikkione')"/>
</jdbc-ee:outbound-endpoint>
</flow>
Note:removed schema locations
Regards Vikram