OSB JMS Proxy XA Transaction Rollback not occuring to queue

Hi All
We are dequeuing a message from JMS queue via an XA connection factory and then calling a web service. If any error occurs in the web service we catch the error handler, log and notify it and want to send this message back to the queue for retrial (The retry settings are defined at the Queue Level from weblogic console).
Problem is rollback is not occurring, we have tried the below:
1) There is no OSB reply with either success or failure in the error handler (This should have done the trick)
2) We have also tried addiing an explicit Raise Error (Uncaught Error) to roll the message back, but its not working.
This rollback is not occurring because JMS Resource is XA and web service call is NON XA, hence the entire message flow becomes NON XA. Is this understanding correct?
How can we fix this? Please help

Hi atheek1
Thanks for the reply, it worked. Before I mark this question as answered, pls. answer the below queries (Thanks a lot!)
1) Well, i just ticked transaction required and same transaction for response and it started working. I did not add routing options like you mentioned to QOS Exactly Once. Its working without it fine. So, my questions is what is the use of adding this QOS to exactly once. Is it mandatory?
2) I have a couple of OSB services in which rollback is working automatically (XA JMS to JCA FTP Adapter) and (XA JMS to JCA DB adapter XA data source), here rollback works automatically. I dont have to tick transaction required. So my question is, when an XA based connection factory picks a message from the queue, a transaction is started at the container level. So why tick transaction required at the message flow level, when the weblogic has already initiated a transaction. Since you said that HTTP transport commits a transaction even if 500 or 404 occurs, it makes sense to tick is transaction required and same transaction for response in OSB proxy service. But the remaining scenarios work without these options. Hence will it be wise to say that these settings are only required for HTTP transport coz of the way it behaves (commits 404 and 500).
Thanks

Similar Messages

  • OSB Dynamic Routing and Transaction Rollback

    Hi,
    I have implemented dynamic routing to different jms business services.
    That's the flow:
    1. I have a proxy service which is invoked via a message delivered to a jms queue(XA connection factory), this queue is configured with
    Error Destination, expiration policy redirect, redelivery limit 5 and redelivery delay override 100
    2. I use a dynamic routing action
    <ctx:route isProxy="false">
    <ctx:service>
    $businessServiceXXX
    </ctx:service>
    </ctx:route>
    where $businessServiceXXX is a variable to hold my target jms business service, its value depends on some incoming inbound headers.
    3. if the endpoint is not correct(business service endpoint is dynamic) I catch the error in a Error handler, I raise an Error but :
    THE MESSAGE IS NOT REDIRECTED TO THE ERROR QUEUE.
    I know I could solve the issue with another approach like an external table to capture(fix) the endpoints, but it won't be so flexible in terms of deployment capability.
    Any Ideas ?
    Thanks,
    T.

    Hi Tony,
    Tested this in ALSB 2.5 . Transaction rollbacks fine when error in dynamic routing. I am attaching the test JMS proxy we have used for this.
    We had XA enabled CF for JMS proxy service and target JMS BS. The dynamic route was configured in route node with no route error handler or service error handler. The test case was to pause the target JMS queue for production. We could see messages rolling back to the source queue and getting redelivered.
    Attaching the Sbconfig for this proxy. Proxy Name: Dynamic Routing
    <?xml version="1.0" encoding="UTF-8"?>
    <xml-fragment name="DynamicRouting">
    <ser:coreEntry isEnabled="true" isProxy="true" name="DynamicRouting" isAutoPublish="false" xmlns:ser="http://www.bea.com/wli/sb/services">
    <ser:description/>
    <ser:binding type="abstract XML"/>
    </ser:coreEntry>
    <ser:endpointConfig xmlns:ser="http://www.bea.com/wli/sb/services">
    <tran:provider-id xmlns:tran="http://www.bea.com/wli/sb/transports">jms</tran:provider-id>
    <tran:inbound xmlns:tran="http://www.bea.com/wli/sb/transports">true</tran:inbound>
    <tran:URI xmlns:tran="http://www.bea.com/wli/sb/transports">
    <env:value xmlns:env="http://www.bea.com/wli/config/env">jms://localhost:7001/XACF/InputQueue</env:value>
    </tran:URI>
    <tran:inbound-properties xmlns:tran="http://www.bea.com/wli/sb/transports"/>
    <tran:all-headers xmlns:tran="http://www.bea.com/wli/sb/transports">false</tran:all-headers>
    <tran:provider-specific xsi:type="jms:JmsEndPointConfiguration" xmlns:jms="http://www.bea.com/wli/sb/transports/jms" xmlns:tran="http://www.bea.com/wli/sb/transports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <jms:is-queue>true</jms:is-queue>
    <jms:is-secure>false</jms:is-secure>
    <jms:inbound-properties>
    <jms:response-required>false</jms:response-required>
    </jms:inbound-properties>
    <jms:request-encoding>UTF-8</jms:request-encoding>
    </tran:provider-specific>
    </ser:endpointConfig>
    <ser:router xmlns:ser="http://www.bea.com/wli/sb/services">
    <con:pipeline name="PipelinePairNode1_request" type="request" xmlns:con="http://www.bea.com/wli/sb/pipeline/config">
    <con:stage name="Configuration">
    <con:comment/>
    <con:context/>
    <con:actions>
    <con1:assign varName="input" xmlns:con1="http://www.bea.com/wli/sb/stages/transform/config">
    <con1:expr>
    <con:xqueryText xmlns:con="http://www.bea.com/wli/sb/stages/config"><![CDATA[<root>
    <type value="jms">
              <service>DynamicRouting/BusinessService/JMS</service>
         </type>
         <type value="http">
         <service>DynamicRouting/BusinessService/HTTP</service>
         <operation>Test</operation>
         </type>
    </root>]]></con:xqueryText>
    </con1:expr>
    </con1:assign>
    </con:actions>
    </con:stage>
    </con:pipeline>
    <con:pipeline name="PipelinePairNode1_response" type="response" xmlns:con="http://www.bea.com/wli/sb/pipeline/config"/>
    <con:flow xmlns:con="http://www.bea.com/wli/sb/pipeline/config">
    <con:pipeline-node name="PipelinePairNode1">
    <con:request>PipelinePairNode1_request</con:request>
    <con:response>PipelinePairNode1_response</con:response>
    </con:pipeline-node>
    <con:route-node name="DynamicRoute">
    <con:comment/>
    <con:context/>
    <con:actions>
    <con1:dynamic-route xmlns:con1="http://www.bea.com/wli/sb/stages/routing/config">
    <con1:service>
    <con:xqueryText xmlns:con="http://www.bea.com/wli/sb/stages/config">&lt;ctx:route>
         &lt;ctx:service isProxy="false">{data($input/*:type[@value=$body/*:body/*:type/text()]/*:service)}&lt;/ctx:service>
              if($input/*:type[@value=$body/*:body/*:type/text()]/*:operation) then
                   &lt;ctx:operation>{data($input/*:type[@value=$body/*:body/*:type/text()]/*:operation)}&lt;/ctx:operation>
    else()
    &lt;/ctx:route></con:xqueryText>
    </con1:service>
    <con1:outboundTransform>
    <con2:routing-options xmlns:con2="http://www.bea.com/wli/sb/stages/transform/config">
    <con2:uriExpr>
    <con:xqueryText xmlns:con="http://www.bea.com/wli/sb/stages/config">$body/*:body/*:url/text()</con:xqueryText>
    </con2:uriExpr>
    </con2:routing-options>
    </con1:outboundTransform>
    <con1:responseTransform/>
    </con1:dynamic-route>
    </con:actions>
    </con:route-node>
    </con:flow>
    </ser:router>
    </xml-fragment>
    Regards,
    Atheek
    Edited by: atheek1 on 27-Apr-2010 19:48

  • OSB JMS Proxy

    Hi ,
    can i use a Proxy service with out a Business service to write a messge onto a queue.I jus tried a sample on my local and i am able to write a message on to a queue using a proxy service .
    Flow :-
    PS1(http) using publish action invokes -> PS2 (jms uri config)
    I am clue less how this is working.when the PS2 transport has been defined as jms ,how am i able to invoke it from PS1 using publish action?
    My understanding of OSB is ProxyService is for reading message from queue and Business service is for writing or publishing a message onto a queue.
    can some body help me udnerstand how this is working.

    Basically, you're right when it comes to the difference between business and proxy services. Also, you're not the only confused when routing data from http-based proxy to JMS proxy.
    We touched the topic earlier:
    Re: Retry mechanism for HTTP Transport in OSB
    The point is your layout (HTTP PS -> JMS PS) is sound and works even without intermediate business service.

  • OSB JMS proxy.  Determine when processing is complete

    Basically, I need visibility into how many rows the JMS adapter is processing and when it is complete.
    I am doing a simple request\response proxy where the response is a second queue. Basically, it just moves messages from one queue to another.
    In our case, the source queue will be paused until a specific point in time where we resume it and let OSB process all the messages. I need to know when the process is complete. Anything I put in the pipeline is executed for each message.
    Any ideas?
    Thanks,
    Sam

    You don't have to check for every message. Why don't check once a minute or so? Alternatively, you can enqueue a special "finished" message and check for it in your proxy.
    Or you can try to describe what you need in more details. ;-)

  • Session Bean Transaction Rollback not working for RuntimeException

    Hi,
    I am calling a number of JDBC create/update statements within a method in a container managed transaction stateless session bean with transaction attribute set to required. I am running the bean within the embedded OC4J supplied with JDeveloper 10g (10.1.2). For each JDBC call, i connect to a datasource via JNDI containg a pool of connections pointing to an Oracle 10g database (standard J2EE)
    If i throw a runtime exception within the method the transaction is NOT rolled back as it should be according to the EJB spec. However, if i setRollbackOnly() on the session bean SessionContext the transaction does roll back.
    Has anybody experienced this before?
    Is this an OC4J bug?
    Thanks
    Dave

    Generally, for urgent issues it's best to open a SR with Oracle Support rather than posting to the forums.
    enlist=dynamic didnt exist in 10.2.0.2.20, but does now. I can't recall what specific version it was introduced though.
    enlist=false prevents enlistment in MSDTC transactions, so thats why it's not rolling back in that case.
    "transaction branch length 90 is illegal" was a known issue on Vista, is that the OS you're using? It takes a two part fix, and It is resolved by
    1) getting up to 10204 ODP (apply the 10204 rdbms patch to your client install)
    2) applying SP1 for Vista
    Hope it helps,
    Greg

  • OSB jms clustering - load balancing seems to be not working

    Hi All,
    I have one admin server and two managed servers running ( one of these managed server is running in the remote linux machine) in a cluster
    I have connectionfactory created with load balance enabled with round robin
    and server affinity is disabled
    I have queue created as uniformly distributed Q
    I have a proxy service with load balancing as roundrobin and endpoint URL as below
    jms://rdoelapp001011:61703,rdoelapp001013:61703/synergyConnectionFactory1/MM_gridQ0
    If I execute this proxy sending messages it always go to one server only. There is no message going to the other server.
    If I shutdown the server that receives messages then the other server is receiving messages. Seems like fail-over is working but not the load-balancing
    There is one point may be worth mentioning here is, from the admin console if I look at the servers for the clusters it has below information
    Name      State      Drop-out Frequency      Remote Groups Discovered      Local Group Leader      Total Groups      Discovered Group Leaders      Groups      Primary      
    synergyOSBServer1     RUNNING     Never     0     synergyOSBServer1     1     synergyOSBServer1     *{synergyOSBServer1}*     0          
    synergyOSBServer2     RUNNING     Never     0     synergyOSBServer1     1     synergyOSBServer1     *{synergyOSBServer1, synergyOSBServer2}* 0
    one server has groups as {synergYOSBServer1} instead of {synergyOSBServer1, synergyOSBServer2}. Does that look correct?
    here is my jms xml file
    <?xml version='1.0' encoding='UTF-8'?>
    <weblogic-jms xmlns="http://xmlns.oracle.com/weblogic/weblogic-jms" xmlns:sec="http://xmlns.oracle.com/weblogic/security" xmlns:wls="http://xmlns.oracle.com/weblogic/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-jms http://xmlns.oracle.com/weblogic/weblogic-jms/1.1/weblogic-jms.xsd">
    *<connection-factory name="synergyConnectionFactory1">*
    *<sub-deployment-name>synergySubDeploy1</sub-deployment-name>*
    *<default-targeting-enabled>false</default-targeting-enabled>*
    *<jndi-name>synergyConnectionFactory1</jndi-name>*
    *<client-params>*
    *<client-id-policy>Restricted</client-id-policy>*
    *<subscription-sharing-policy>Exclusive</subscription-sharing-policy>*
    *<messages-maximum>10</messages-maximum>*
    *</client-params>*
    *<transaction-params>*
    *<xa-connection-factory-enabled>false</xa-connection-factory-enabled>*
    *</transaction-params>*
    *<load-balancing-params>*
    *<load-balancing-enabled>true</load-balancing-enabled>*
    *<server-affinity-enabled>false</server-affinity-enabled>*
    *</load-balancing-params>*
    *<security-params>*
    *<attach-jmsx-user-id>false</attach-jmsx-user-id>*
    *</security-params>*
    *</connection-factory>*
    <uniform-distributed-queue name="errorQ">
    <sub-deployment-name>synergySubDeploy1</sub-deployment-name>
    <default-targeting-enabled>false</default-targeting-enabled>
    <jndi-name>errorQ</jndi-name>
    <load-balancing-policy>Round-Robin</load-balancing-policy>
    <forward-delay>-1</forward-delay>
    <reset-delivery-count-on-forward>true</reset-delivery-count-on-forward>
    </uniform-distributed-queue>
    <uniform-distributed-queue name="undlvQ">
    <sub-deployment-name>synergySubDeploy1</sub-deployment-name>
    <default-targeting-enabled>false</default-targeting-enabled>
    <jndi-name>undlvQ</jndi-name>
    <load-balancing-policy>Round-Robin</load-balancing-policy>
    <forward-delay>-1</forward-delay>
    <reset-delivery-count-on-forward>true</reset-delivery-count-on-forward>
    </uniform-distributed-queue>
    *<uniform-distributed-queue name="MM_gridQ0">*
    *<sub-deployment-name>synergySubDeploy1</sub-deployment-name>*
    *<default-targeting-enabled>false</default-targeting-enabled>*
    *<jndi-name>MM_gridQ0</jndi-name>*
    *<load-balancing-policy>Round-Robin</load-balancing-policy>*
    *<forward-delay>5</forward-delay>*
    *<reset-delivery-count-on-forward>true</reset-delivery-count-on-forward>*
    *</uniform-distributed-queue>*
    <saf-imported-destinations name="synergySAFImportedDest1">
    <sub-deployment-name>synergySubDeploy1</sub-deployment-name>
    <default-targeting-enabled>false</default-targeting-enabled>
    <saf-queue name="gridQ0">
    <remote-jndi-name>MB_gridQ0</remote-jndi-name>
    <local-jndi-name>gridQ0</local-jndi-name>
    <non-persistent-qos>At-Least-Once</non-persistent-qos>
    <time-to-live-default>0</time-to-live-default>
    <use-saf-time-to-live-default>false</use-saf-time-to-live-default>
    <unit-of-order-routing>Hash</unit-of-order-routing>
    </saf-queue>
    <jndi-prefix>MB_</jndi-prefix>
    <saf-remote-context>synergySAFContext1</saf-remote-context>
    <saf-error-handling>synergySAFErrorHndlr1</saf-error-handling>
    <time-to-live-default>0</time-to-live-default>
    <use-saf-time-to-live-default>false</use-saf-time-to-live-default>
    <unit-of-order-routing>Hash</unit-of-order-routing>
    </saf-imported-destinations>
    <saf-remote-context name="synergySAFContext1">
    <saf-login-context>
    <loginURL>t3://rdoelapp001013:7001</loginURL>
    <username>weblogic</username>
    <password-encrypted>{AES}z9VY/K4M7ItAr2Vedvhx+j9htR/HkbY2LRh1ED+Cz5Y=</password-encrypted>
    </saf-login-context>
    <compression-threshold>2147483647</compression-threshold>
    </saf-remote-context>
    <saf-error-handling name="synergySAFErrorHndlr1">
    <policy>Log</policy>
    <log-format xsi:nil="true"></log-format>
    <saf-error-destination xsi:nil="true"></saf-error-destination>
    </saf-error-handling>
    </weblogic-jms>
    Any help will be greatly appriciated
    Edited by: 818591 on Feb 16, 2011 11:28 AM

    I am not getting you here "the right approach is to make OSB run on the man server cluster and not on admin server. "
    I have a jms proxy service that I created from admin console
    And also I have gone thru the step 5 in the link below
    http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/deploy/config.html#wp1524235
    If I am not wrong, the proxy service endpoint URI determines where it is pointing to. If it is a cluster environment, it should point to a clustered address
    My proxy has below endpoint URI
    jms://rdoelapp001011:61703,rdoelapp001013:61703/synergyConnectionFactory1/MM_gridQ0
    and rdoelapp001011:61703,rdoelapp001013:61703 is my cluster address
    As per your suggestion "To fix your problem, *make osb to run on the cluster* and specify the same URL for the jms proxy service"
    Could you please provide some instruction how would I "make osb jms proxy service to run in a cluster"
    As a note, I have Q defined as a distributed Q and connection factory targets to the cluster. UDQ also targtes to the cluster.
    Just for a testing I have created another manged server running local to the machine where my admin server is running
    And I created a proxy by following steps as I mentioned above and with endpoint URI as below
    jms://rdoelapp001011:61703,rdoelapp001013:61703,*rdoelapp001011:61700*/synergyConnectionFactory1/MM_gridQ0
    where the new address of my cluster is rdoelapp001011:61703,rdoelapp001013:61703,rdoelapp001011:61700
    It did create consumers in both the managed servers in the cluster that are running locally, but no consumers in the remote managed server.
    So I am kind of leaning towards thinking that there is some incorrect setup for the remote managed server and may be admin server is not able to communicate to the remote server for some reason but not sure about it..
    As a note the cluster is setup to communicate using "unicast" channel
    and I created a channel in each manged server with the same name
    here is the cluster configuration
    <name>synergyCluster1</name>
    <cluster-address>rdoelapp001011:61703,rdoelapp001013:61703,rdoelapp001011:61700</cluster-address>
    <default-load-algorithm>round-robin</default-load-algorithm>
    *<cluster-messaging-mode>unicast</cluster-messaging-mode>*
    *<cluster-broadcast-channel>synergyChannel1</cluster-broadcast-channel>*
    *<number-of-servers-in-cluster-address>3</number-of-servers-in-cluster-address>*
    </cluster>
    here are the twoOSBserver configuration
    <server>
    <name>synergyOSBServer1</name>
    <machine xsi:nil="true"></machine>
    <listen-port>61703</listen-port>
    <cluster>synergyCluster1</cluster>
    <web-server>
    <web-server-log>
    <number-of-files-limited>false</number-of-files-limited>
    </web-server-log>
    </web-server>
    <server-debug>
    <debug-scope>
    <name>weblogic.jms.saf</name>
    <enabled>true</enabled>
    </debug-scope>
    <debug-jmssaf>true</debug-jmssaf>
    <debug-saf-sending-agent>true</debug-saf-sending-agent>
    </server-debug>
    <listen-address>localhost</listen-address>
    <network-access-point>
    *<name>synergyChannel1</name>*
    *<protocol>cluster-broadcast</protocol>*
    *<listen-address>localhost</listen-address>*
    *<listen-port>61702</listen-port>*
    <http-enabled-for-this-protocol>true</http-enabled-for-this-protocol>
    <tunneling-enabled>false</tunneling-enabled>
    *<outbound-enabled>true</outbound-enabled>*
    *<enabled>true</enabled>*
    <two-way-ssl-enabled>false</two-way-ssl-enabled>
    <client-certificate-enforced>false</client-certificate-enforced>
    </network-access-point>
    <jta-migratable-target>
    <user-preferred-server>synergyOSBServer1</user-preferred-server>
    <cluster>synergyCluster1</cluster>
    </jta-migratable-target>
    </server>
    <server>
    <name>synergyOSBServer2</name>
    <ssl>
    <enabled>false</enabled>
    </ssl>
    <machine xsi:nil="true"></machine>
    <listen-port>61703</listen-port>
    <listen-port-enabled>true</listen-port-enabled>
    <cluster>synergyCluster1</cluster>
    <web-server>
    <web-server-log>
    <number-of-files-limited>false</number-of-files-limited>
    </web-server-log>
    </web-server>
    <listen-address>rdoelapp001013</listen-address>
    <network-access-point>
    *<name>synergyChannel1</name>*
    *<protocol>cluster-broadcast</protocol>*
    *<listen-address>rdoelapp001013</listen-address>*
    *<listen-port>61702</listen-port>*
    <http-enabled-for-this-protocol>true</http-enabled-for-this-protocol>
    <tunneling-enabled>false</tunneling-enabled>
    *<outbound-enabled>true</outbound-enabled>*
    *<enabled>true</enabled>*
    <two-way-ssl-enabled>false</two-way-ssl-enabled>
    <client-certificate-enforced>false</client-certificate-enforced>
    </network-access-point>
    <java-compiler>javac</java-compiler>
    <jta-migratable-target>
    <user-preferred-server>synergyOSBServer2</user-preferred-server>
    <cluster>synergyCluster1</cluster>
    </jta-migratable-target>
    <client-cert-proxy-enabled>false</client-cert-proxy-enabled>
    </server>
    <server>
    Edited by: 818591 on Feb 18, 2011 11:26 AM

  • [OSB] Invoking OSB HTTP proxy as a part of a global transaction

    Hi,
    my question is, can a OSB HTTP proxy be executed in context of the global transaction?
    I did two tests. One had the following scenario:
    HTTP OSB proxy invokes JMS OSB proxy that invokes an "Insert to database" business services.
    Both of the proxies were transactional - I have set "Transaction Required" and "Same Transaction For Response" to enabled on both of them. Also, I've set QoS to "Exactly Once" in the Routing Option.
    The OSB JMS proxy's flow was executed as a part of the global transaction. I confirmed this with the following test:
    If I throw an exception in the responce pipeline of the HTTP OSB proxy, the database transaction was rolled back. If I throw an exception in the responce pipeline of the HTTP OSB proxy, but have the "Transaction Required" and "Same Transaction For Response disabled, the database transaction is commited and than the exception is thrown.
    The problem is, If I change the protocol of the second proxy to HTTP, then it doesn't seem to be executed in the context of the global transaction. If I throw an error in the response pipeline of the first OSB proxy(and "Transactions Are Required" and "Same Transaction For Response" are enabled for both proxy, and QoS is set to "Exactly once") the database transaction is not rolled back.
    So, can a OSB HTTP proxy be executed in context of the global transaction?
    Edited by: user13604541 on Dec 5, 2011 2:27 AM

    I have read on OSB doc that HTTP proxies do not support transactions... your tests seem to confirm this.

  • JMS proxy and XA connection factory

    Hi all,
    I would like to ask you what is the best practice to adopt about the scenario described below.
    A JMS proxy retrieves a message and processes it.
    Any error could occurr during processing it and, in case of errors, the JMS proxy error handler publishes the message on ad hoc recovery destination D.
    (later another app will check failed messages for fixing & republishing them into ALSB).
    In that scenario we have the JMS proxy and the jms business service that, in case of errors, publishes on destination D.
    Should the JMS proxy and the business service use both a XA connection factory in order to perform all the above steps in one transaction ?
    Otherwise if the business service itself fails publishing on destination D, the message retrieved by the JMS proxy is lost and not re-delivered to the JMS proxy.
    Or XA connection factory is not needed and could I use
    Routing Options with exactly once or both are needed ?
    Thanks
    ferp

    Hi all,
    I did some tests and follow what I've achieved.
    Scenario 1.
    - Precondition
    -- A JMS proxy with XA factory + Error Destination (MyRecoveryQueue)
    -- A business service BS with XA factory that publishes into MyOutboundQueue
    -- No "exactly once" routing option used calling BS
    -- an error is forced in the pipeline
    - Flow
    -- proxy retrieves a message and try to publish it using BS
    -- an error is forced in the pipeline:
    --- transaction is rolled back, message redelivered to proxy
    --- the message is posted to the error destination after all the retries failed
    Scenario 2.
    - Precondition
    -- As 1. but no error is forced in the pipeline
    -- the MyOutboundQueue destination queue is paused
    - Flow
    -- proxy retrieves a message and try to publish it using BS
    -- BS fails to publish it on MyOutboundQueue (because it is paused)
    --- transaction is rolled back, message redelivered to proxy
    --- the message is posted to the error destination after all the retries failed
    Scenario 2A.
    - Precondition
    -- As 2. with MyOutboundQueue paused and resumed
    - Flow:
    -- proxy retrieves a message and try to publish it using BS
    -- BS fails to publish it on MyOutboundQueue (because it is paused)
    --- transaction is rolled back, message redelivered to proxy
    --- before all the retries failed the queue is resumed
    --- BS succeeds to publish the message
    Scenario 3.
    - Precondition
    -- A JMS proxy with NO XA factory + Error Destination
    -- A business service BS with NO XA factory
    -- No "exactly once" routing option used calling BS
    -- an error is forced in the pipeline
    - Flow
    -- proxy retrieves a message and try to publish it using BS
    -- an error is forced in the pipeline:
    --- transaction is NOT rolled back, message NOT redelivered to proxy
    -- so
    --- no message delivered to MyOutboundQueue2 destination
    --- no message delivered to MyRecoveryQueue2 destination
    --- message consumed from MyQueue2 and now is lost!
    To publish message into MyRecoveryQueue2 a proxy error handler has to be added and here added explicit publish to MyRecoveryQueue2.
    But naturally in that case if in the proxy error handler, the explicit publish fails or any error occurrs no message is delivered to recovery queue.
    So if I'm not using an XAFactory the message is auto-acknowledged as soon as it is read and I've to use XA factory if I want the message to be put back in the queue in case of errors and the retry to happen.
    So both my proxy service and business service use an XA factory.
    Regards
    ferp

  • OSB JMS transaction

    I'm trying to setup a proxy service to dequeue a message from JMS and submit to a business service. If the business service fails, I want the jsm message to remain in the queue/"rollback". I setup a queue CF with "XA Connection Factory Enabled", and I have a proxy service dequeueing from a queue through that connection factory. In the proxy service I have the "Is XA Reuired" box checked on the "JMS Transport" tab, and in the message flow, I have a route node with an exception handler that is calling the business service that I have setup to fail on purpose. The exception handler has a Reply "with failure" action.
    OSB-PS -> JMS -> OSB-PS -> OSB-BS -> Failing Service
    I want this to roll back to the JMS queue.
    Did I miss anything in setting up the XA support for this process? When I invoke the proxy service, it errors off, but the message doesn't get rolled back to the original queue.
    Does anyone have an example or docs on how to set this up?
    Thanks for any help.

    Hi All,
    I have checked the Retry with Application Errors, but no change.
    Also have a Routing Option set to "Exaclty Once".
    There is also a Route error handler where I raise an error and Reply with Failure.
    The JMS Connection Factory used is XA enabled and so is the JMS Proxy service.
    The strange thing I observe is when the endpoint server is down, teh transaction gets rolled back and remains in the queue.
    However, when the server is up but the path of the URI given is either incorrect(404 HTTP Response) or there is an internal server error(500 HTTP response),
    the message is picked up from the queue and is lost.
    What I am supposing the reason would be, the proxy is able to make connection to the http uri but there is an error from the business service, while in the first case, the server is not up and hence the connection itself is failing and the transaction is getting rolled back at the request pipeline level itself.
    I compared the logs when server is down and when the path is not found-> the difference I found was
    1. Server is down: Fault occurs in the flow of the Request flow of the Route node
    2. Server is up but path not found or internal error: Fault is thrown in the response action after getting the HTTP response.
    I have even tried Raise Error and Reply with failure at the Service Error Handler level as well, but the message is lost :(
    Could anyone please help me out on this? Is there any workaround for the same?

  • OSB 1031: proxy service and publishing JMS messages with no duplicates

    Hi all,
    we have a Web Service proxy that publishes messages into a JMS queue. The queue is persistent and the related connection factory is XA enabled.
    The proxy does the call to the JMS business service from a route node.
    If a failure occurrs after the publishing returns successfully, the caller receives back an error and it will try again to call the web service proxy.
    As the message has been published successfully and was not rollbacked by the proxy, the second call could put on the JMS queue a duplicate message.
    As far as we know only with JMS proxy service, OSB starts a transaction within the pipeline or are we wrong ?
    What do you suggest in order to avoid such a scenario described above ?
    Thanks and regards
    ferp

    Try this link to depict the behavior
    http://allthingsmdw.blogspot.com.au/2012/09/osb-service-callouts-and-oql-part-1.html

  • JMS transaction rollback from Javacallout

    Hi,
    I have a proxy which insert message into queue via business service, and i have another proxy which pull message from queue and call to javacallout which returns boolean (true/false). During some processing javacallout return a boolean false. I have managed for checking if the boolean returned in false then i want to rollback the transaction and message to put back to queue.
    I have setting "Is XA required = true" and JMS proxy configured for XA connection.
    When i recieve boolean false from javacallout i am raising error which is not handled by any error handler. I dont have stage error handler, no service error handler and hence according to me error should propegate and it should rollback.
    But message is not rollback to queue.
    I have "Redelivery Delay Override", "Redlivery Limit" property set to -1 (default) and "Expiration Policy" set to "Discard" and no "Error Destination" selected for Queue setup.
    I am using Oracle Service Bus 10gR3 version.
    I am new to this type of configuration and i suppose i am missing some configuration here.
    Please help me, its little urgent.
    Thanks
    Sujit

    Hi Sujit,
    I have "Redelivery Delay Override", "Redlivery Limit" property set to -1 (default) and "Expiration Policy" set to "Discard" and no "Error Destination" selected for Queue setup.
    Change the Redelivery Limit field  to 3 ( specify the number of redelivery tries a message can have before it is moved to an error destination  like three times)
    Select Redirect as Expiration Policy.
    Select ErrorQueue ( Queue where you wants the rollback message should enqueue) as the Error Destination value.
    make sure to use XA connection factory.
    Hope it helps ..
    Regards,
    Abhinav Gupta

  • OSB Transaction RollBack

    HI,
    I have a scenario in which i have to rollback the db transaction .
    scenario : I have proxy service which intern call one DB Business service and one BPEL sync service . if the BPEL sync service is not working or down for some reasons the DB insert which i have performed before calling the BPEL service should got rollback.  i have done the following but no luck.
    1 . proxy service -- > enabled the transaction required check box in message handling.
    2 .added  exactly once QOS for business services but transaction was not rollback and giving below error:
                           "Setting quality of service to Exactly Once in service callout action is not supported for service BusinessService "

    HI,
    I have a scenario in which i have to rollback the db transaction .
    scenario : I have proxy service which intern call one DB Business service and one BPEL sync service . if the BPEL sync service is not working or down for some reasons the DB insert which i have performed before calling the BPEL service should got rollback.  i have done the following but no luck.
    1 . proxy service -- > enabled the transaction required check box in message handling.
    2 .added  exactly once QOS for business services but transaction was not rollback and giving below error:
                           "Setting quality of service to Exactly Once in service callout action is not supported for service BusinessService "

  • OSB 11g acting as a JMS Proxy

    I was hoping that someone can clear my understanding of OSB and how it interacts with JMS.
    I created a JMS server, connection and topic in WLS. It works great. I am able to subscribe and publish from a java client and from an OSB business service.
    Our use case is to use OSB as a "front end" to JMS if you will. We want JMS clients to be able to connect to OSB and subscribe to our JMS topic (durable). Is it possible to subscribe to a proxy service from a JMS client? How do I do it?
    The next thing we are going to try to do is have an OSB process listen to our JMS topic and invoke a web service when a new message is published. Any guides on this?
    Thanks so much,
    Sam

    We want JMS clients to be able to connect to OSB and subscribe to our JMS topic (durable). Is it possible to subscribe to a proxy service from a JMS client? How do I do it?I don't think subscribing to a proxy service is possible. Instead create a separate queue (or any other storage), for your client application and let OSB pull the message from source queue and pass it to target storage (may be another JMS queue)
    The next thing we are going to try to do is have an OSB process listen to our JMS topic and invoke a web service when a new message is published. Any guides on this?This approach is quite similar to what I mentioned above. Just create a JMS proxy service to let it consume messages from topic and create a Business Service (WSDL based web-service) to invoke the target web-service. In the message flow of JMS proxy you may have transformation if required, and then route the message to business service which will eventually deliver the message to target web-service.
    Regards,
    Anuj

  • OSB -11g - Calling JMS Proxy Service in a stage

    Hi,
    When we createa JMS based proxy service, the proxy service keeps on polling the JMS Queue for any new messages arriving in the queue. But I do not want the proxy service to keep on polling the Queue. Instead I want to call the JMS Proxy Service in any stage (of any other Proxy Service) using a service callout. It means that I do not want the Queue to be polled always, instead the queue should be polled only when this JMS Proxy Service is invoked.
    Is it possible to do? If so, how?
    Thanks,
    Sanjay

    Hi Anuj,
    Following is my requirement:
    The producer wants to interact with us using Web Services. The input payload has some more values (username and password) apart from the HL7 data (base64 encoded) itself. I have to receive the input payload, authenticate the call and convert the HL7 encoded message into an XML and send it to the consumer.
    What have I done till now:
    1) I have created two Proxy Services PS1 and PS2
    2) Proxy Service (PS1) will be invoked by the producer.
    3) Then I get the username, password and data from the payload
    4) Populate the username and password in the SOAP Header and HL7 data in SOAP Body
    5) Call PS2 from PS1
    6) In PS2 I have configured Message Level Security to authenticate with the username and password
    7) After authentication I make a Java Callout to decode the base64 encoded HL7 data
    8) I now have written my own HL7 sender (Java code) which wraps the decoded HL7 data with MLLP requirements and then send it to the B2B server using a Socket (TCP connection). I do a Java Callout to this Java class.
    9) In B2B I have configured a RTP (Remote Trading Partner) which has a MLLP channel.
    10) I created a ADT message document and a ACK document
    11) I created two agreements between HTP and RTP (one agreement receives the HL7 data from the TRP using MLLP and another which sends the ACK to the RTP using MLLP channel)
    12) In the receiveing agreement I have configured a JMS channel (on the HTP side) becuase of which B2B receives the HL7 Pipe delimited data and translates it and then pushes the XML data into the JMS queue (which needs to be transformed to producer XML)
    13) I have also configured a JMS channel for the RTP which I am using in second agreement to get the acknowledgement. Because of this the ACK is placed in a JMS queue.
    I need to poll this JMS queue in order to send the ACK back to the producer (which I have to do in the response pipeline of PS2). Hence I wanted to pop the message from the JMS queue in the response pipeline and then send that message.
    Please advice if my approach is correct.
    Thanks,
    Sanjay
    Edited by: Sanjay Bharatiya on 17-Mar-2011 12:06 PM

  • Increases number of JMS consumers in an OSB jms-polling proxy service

    Hi All,
    I'm looking for an option of increasing the number of JMS consumers in a JMS OSB proxy service. I know that this is possible by modifying the ejb, but I'm looking for any other option by using weblogic/proxy configuration. When I monitor the queue I have a number of 16 message consumers, but I would need to increse it to a higher number in order to improve the performance.
    Please send me any suggestion o advice to solve it.
    Thanks in advance
    Luis

    Sorry I sent it to the wrong place. I have moved it to Weblogic

Maybe you are looking for