Rollback of Messages in OSB

I have a usecase as below -
jms.Q1 (nonxa) -- [ proxy service -- publish to a jms.Q2 (xa) -- raise an error ]
A proxy service receives request from non-xa queue (Q1) ,
then the proxy service publish that message to another queue (Q2) via XA enabled business service (i use connection factory as XA) ,
then i raise an error in the message flow.
What i need is, I want to rollback the message which i published to "Q2" once i raise an error in message flow.
Can anyone please help me out whether this is possible by using any of the routing option,etc..?
Regards
Sesha

Configure these:
1. Enable the option Same Transaction For Response in the Proxy Service configuration.
2. Use QoS as Exactly Once in the publish action which calls the JMS business service.
3. Use XA connection factory for connection between businsss service and target JMS Queue
4. Make sure that the error reaches System Error Handler. To ensure this you need to make sure that the flow does not encounter any Reply action after the Raise Error action you have configured in the message flow.
Once you configure like above:
1. Message will be deleted from source queue as soon as OSB Proxy picks up the message (since this is not XA enabled)
2. Message will be published to target JMS queue but not committed till the message flow is completed. So it can rollback in case there is an error after the publish action.
3. If based on a condition a Raise error action is executed (or any other error happens in the flow) message will be rolled back from target queue in case the error reaches the System Level error handler. So message will not be present in neither source queue nor the target queue.

Similar Messages

  • Maximum Message size OSB can handle

    Hi,
    I am trying to find out the maximum message size OSB can handle without any problems.
    I know this may be dependant on JVM settings etc,but what is a safe limit.Can the payload size be of 1 GB etc , say for a WSDL based proxy service.
    Any formal documentation on the size of messages?
    Thanks.

    Hi ,
    Please check the following links
    https://kr.forums.oracle.com/forums/thread.jspa?threadID=2125210
    https://kr.forums.oracle.com/forums/thread.jspa?threadID=2167494

  • Reliable Messaging in OSB

    Hi all,
    Do we need to create a WS-Policy and attach it to the WSDL in both the proxy service and business service to enable WS-RM in OSB?
    Anybody implemented Reliable Messaging in OSB? Any tutorials or examples?
    Thanks,
    Firas

    Hi Peter,
    The links are referring to 10g which is different from the current 11g. For example there is no "ws" protocol in 11g and it still does not talk about how to implement it except may be for creating the policies and references to these policies in WSDL files but for example it does not talk if this should be implemented at client, proxy, business and backend service.
    Thanks,
    Firas

  • How to get invalid message in OSB?

    Hi,
    I have OSB Proxy Service which reads XML messages from JMS Queue.
    Is it possible to handle non xml bad messages in my proxy service ? I want to get them, write into log
    and put it another queue which contains all buggy messages? I use validate, but non XML messages don't fall
    into my Proxy Service from JMS, and stay in jms queue.

    Create the messaging type proxy service with input type as "Text" to read messages from JMS queue. Then in it's message flow route the message to your existing proxy. In the route node of first proxy put an error handler and add a check for XML validation failure. From inside the error handler call a business service which will put that message into buggy queue. You may also log the message in error handler.
    Regards,
    Anuj

  • Serial Processing of Messages in osb

    Hi,
    I have a scenario in OSB where i m getting the orders from a queue or database, which are not in sequence.
    Can anyone let me know if we can align the orders based on the ordernos.
    Thanks,
    Sarat

    Do you want to sequentially process messages of same order number?
    For ex. Lets say you are getting 3 messages for order number A and B both. A1,A2,B1,A3,B2,B3
    and you want to process them as A1, A2, A3 and B1,B2,B3 in parallel (i.e. messages or order A and B can be processed in parallel, but messages of order A will get processed in the same sequence as they arrive and messages of Order B will get processed in the same sequence they arrive irrespective of messages of Order A).
    This can be achieved using Unit Of Order feature of Weblogic.
    Or do you want to actually process messages BY order number?
    For ex. If you have 5 orders coming in this sequence: 5,3,2,4,1 and you want to process them in following order: 1,2,3,4,5 ?
    This is not possible out of the box in OSB, you will need to store the messages in a DB and poll them back in OSB in correct order.

  • Custom fault message from OSB is not throw in BPEL

    Hi,
    I have created a custom fault error in OSB which is sent to BPEL.
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <env:Header/>
    <env:Body>
    <env:Fault>
    </env:Fault>
    </env:Body>
    </env:Envelope>
    If my namespace in FAULT tag is "http://schemas.xmlsoap.org/soap/envelope/",
    message is understood as fault IN BPEL. But if I change namespace, BPEL understands as reply message.
    How can I use my custom fault message with different namespace as http://schemas.xmlsoap.org/soap/envelope/ ?
    Regards,

    SOAP Fault has a defined structure and defined namespaces. It does provide a placeholder for custom data though. Just like you can not change the namespace of Envelope of Body, similarly you cant change the namespace of Fault(if you want it to be recognized by the client apps). Any custom data you want to send in the SOAP Fault needs to be set as a child of 'detail' element of SOAP Fault. This custom data can have any namespace you wish. This Custom XML will be the element you define as Fault element in your WSDL
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <env:Header/>
    <env:Body>
    <env:Fault>
    <faultcode>env:Client</faultcode>
    <faultstring>some error string</faultstring>
    <faultactor>somedata</faultactor>
    <detail>
    {here you can put your custom XML content in any namespace which you have defined in the WSDL}
    </detail>
    </env:Fault>
    </env:Body>
    </env:Envelope>

  • How to do service callout with the incoming JMS message in OSB 11g

    Hello All,
    I have a specific requirement for which I am creating a kind of POC where I need some help in OSB, however am new to OSB.
    My Environment:
    1> I have a request queue (deployed on a WLS domain) - WFReq_WS
    2> I have a response queue (deployed on a WLS domain) - WFRes_WS
    3> I have created a ProxyService (request/response type) in OSB 11g which is simply mapping the incoming message in WFReq_WS to WFRes_WS
    4> I have a WebService (it is currently a simple hello WebService for testing) which takes a string and returns the same string with an added 'Hi' in front of it (e.g. If you send Jack, it will return 'Hi Jack')
    My Requirement:
    1> I have to do some mechanism in OSB, by which while mapping the message from WFReq_WS to WFRes_WS (through the proxy service I have), it will pick the JMS message (which will be a string/text) and will make a service callout to the Webservice I mentioned using the message as the input parameter of the WebService.
    2>Now when the response of the WebService will come, OSB should send this response as the message in the response queue (WFRes_WS) I mentioned above.
    To simplify the requirement using an example:
    A> I will send a text/String message (say Jack) to the request queue (WFReq_WS)
    B> OSB should pick the message (Jack) and make a service callout to the webservice
    C> webservice will return 'Hi Jack'
    D> OSB should send this to the response queue (WFRes_WS)
    I know the above might look very basic question to the PROs, but please elaborate (step by step) what need to be done, since I do not know OSB.
    Thanks a lot for your help !

    Your example points A and D are easily done by having a "Proxy Service" which has the following details:
    Service Type = Messaging Service
    Request and Response type = Text
    Protocol = jms
    Endpoint URI = your request queue (format like 'jms://localhost:7013/weblogic.jms.XAConnectionFactory/QueueJNDIName')
    Checkmark "response" so that the proxy service automatically delivers the response to another queue - your response queue
    Response URI = jms://localhost:7013/weblogic.jms.XAConnectionFactory/QueueResponse
    Now since your "Hello" webservice is (probably) a SOAP xml service you need to "convert" your text based JMS message to xml before sending it on to the "Hello" service.
    Your JMS proxy can do that by just doing a "Assign <whom>{$body/text()}</whom>" to a variable (lets call it 'reqHello')
    Now your JMS proxy should actually call the Hello service and since your JMS proxy is text and the Hello service is SOAP you cannot just "pass" on to the Hello service in a "Route to". Instead you can do a Service Callout where you can specify your "reqHello" variable as payload and a "respHello" as response variable.
    Now you have the "<whom>Hi jack</whom>" in the response variable and since the JMS response needs to be text format you can "extract" the text value into the body variable of the JMS proxy (use "replace /* in body with $respHello/text()" - replace node contents)
    The actual Hello service is a simple "SOAP" based Proxy Service. Add a pipeline and add a stage in the reponse pipeline. Do a ...
    Assign fn:concat("Hi ",$body/whom/text()) to $whomVar
    Replace whom in body with $whomVar (replace node contents)

  • Response message in OSB

    I have developed a sample process in OSB having the policy "oracle/wss_username_token_service_policy" attached to the proxy service.I could able to test the service form OSB test console and from SOAP UI as well.However,if i want to do a negative test by passing invalid username/password in the SOAP header from SOAP UI,i am getting the response as "General web service security error".I want to customozie this message like "The user have provided invalid username/password".How can i achieve this.How to have a response structure in the OSB service,so that i can hardcode my message during the excution.Please throw some clarity and suggestions.

    I could able to find out the solution for this

  • Consume JMS Unit-Of-Work message through OSB proxy service

    Hi,
    Anyone know how to consume a JMS Unit-Of-Work (UOW) message using an OSB Proxy Service of JMS type?
    I can submit a unit-of-work JMS message (which consists of multiple constituent messages) using an OSB proxy & business service combination and setting the UOW transport headers appropriately. I can also separately produce and consume Java objects via a JMS queue where the consumption is done via OSB proxy (of java request message type), but these aren't UOW messages.
    Apparently as soon as it is a UOW message then the message consumed is an ObjectMessage ArrayList and one has to use the "Java" request message type for the JMS consumer proxy, but I'm unsure of how to create the concurrent client jar to use it in the same proxy service's JMS transport configuration in order to output the ObjectMessage ArrayList (UOW message). 
    Ideally I'd like to consume a single UOW XML message via an OSB JMS proxy service.
    Any pointers would be appreciated.
    R

    Finally got this working!!
    For posterity: Needed to insert Java Object JMS messages on the OSB JMS producer (Business Service) side with correct UOW jms transport header set in route node. Then consume the Unit-Of-Work message on the other side via jms proxy service with "java" request message type, with appropriate jar containing the Object class as the "Client jar" in the JMS Transport configuration. In the same JMS consumer proxy I had to do a java callout, passing the contents of $body, using java.util.ArrayList and javax.jms.ObjectMessage, as input into a method (.. decodeJavaMessage(ArrayList<ObjectMessage> ...)). In this java callout class you can get to each individual ObjectMessage via typecasting the get() method on the Arraylist to (ObjectMessage) and then just typecast the getObject() on this Objectmessage into your original Java Class (same as what you inserted onto queue originally).
    Hope this saves someone some time in future!

  • Ws reliable message in OSB

    To utilize WS-ReliableMessaging in OSB, I created a OSB proxy by setting Protocol to ws and Get All Headers to Yes. When a message arrives, I want to extract all the header information in the message flow by querying $header. $header is always empty. Seems that OSB removes all the headers even though Get All Headers is set to Yes. Does anyone know why the headers are removed by using ws protocol? Is there any way I can create some sort of interceptor to retrieve the header?

    Hi Peter,
    The links are referring to 10g which is different from the current 11g. For example there is no "ws" protocol in 11g and it still does not talk about how to implement it except may be for creating the policies and references to these policies in WSDL files but for example it does not talk if this should be implemented at client, proxy, business and backend service.
    Thanks,
    Firas

  • Sending Transport-level Secured messages to OSB

    Hi all,
    I'm working with OSB, I created a proxy service to expose a Business Service as HTTP, the Proxy has Transport-level security set with XACMLAuthenticator for a Role. I can test it in the test console perfectly however I don't know how to call it any other way.
    I would need to call it from an SCA and from a JSP. I'd like to know how to add the credentials to the message.
    Thanks,
    Pablo

    Hi Pablo,
    If it is a WSDL based web-service then you may use SOAPUI (http://www.soapui.org/) to test this service.
    I would need to call it from an SCA May I know which type of proxy service you have created and what is the input and output type expected?
    and from a JSP. I'd like to know how to add the credentials to the message.http://blogs.oracle.com/mneelapu/2010/09/how_to_serve_html_through_osb.html
    Quite a similar implementation could be done to call it from a JSP.
    Regards,
    Anuj

  • JMS messaging with OSB

    Hi Forum, So far I have not been able to find any useful information hence the question:
    1. Is OSB an implementation of JMS?
    2. To use JMS with OSB do I need to install separate JMS? If not does JMS install by itself when installing OSB?
    Thanks!

    JMS (Java Messaging Service) is a transport protocol (like File, FTP, email, HTTP etc.) which is supported by OSB (Oracle Service Bus - which is a service bus product used for transport protocol mediation).
    Once you have installed OSB, you may use it to configure services which use JMS transport. Please refer to know more -
    http://download.oracle.com/docs/cd/E14571_01/doc.1111/e15866/jms.htm#i1051082
    http://en.wikipedia.org/wiki/Java_Message_Service
    Regards,
    Anuj

  • How to poll for a message using OSB ?

    Hi,
    I have created a queue in weblogic JMS . I have a Java client to push messages to that queue. I want my OSB to act like a listener and pick up the messgaes from that weblogic queue . I already have messages being pushed into the queue . How do i configure my OSB to pick up those messages ? Should i have to configure it through Proxy service or business service ? Once my OSB reads those messages , how do i know that proxy has picked those messages?
    Could you please explain it with screen shots if possible ?
    Thanks
    Prarthana.

    http://www.xenta.nl/blog/2010/04/12/eaioracle-service-bus-testing-with-citrus-framework-part2/
    in this blog i pretty much did the same.
    only in my case the testframework stores the messages on the queue.
    but the proxy service enqueues them from the queue and the business services stores them on the filesystem.
    proxyservices are used for the input/start of your process and the business service is used to 'request/trigger/invoke' other processes.
    i hope this is a bit clear definition to know the difference between both.
    if you want to check wether or not the message is retrieved from the queue, you can login in the console of weblogic to see if the message is still in the queue, if not, some processes (in your case the proxy service enqueued it). In your proxy service you can add logging to see the message went through the osb service and eventually you could for example check the file system if the file is stored there (but this depends on what functionality your business service has. In my case it's a file business service, so it stores all messages on the file system.

  • Generate NanoSecond timestamp message in OSB ..?

    Hi,
    In my current project we have to generate a timestamp message string upto nano second.
    Using this function, I can get time stamp till MS but not NanoSecond.
    fn-bea:dateTime-to-string-with-format("SSmmssHHddMMyyyy", fn:current-dateTime())
    do we have an option with OSB to generate a nanosecond time stamp, pls advice ..

    KumarB,
    You can try building your custom xpath functions in OSB.
    http://docs.oracle.com/cd/E21764_01/doc.1111/e15866/custom_xpath.htm
    http://eelzinga.wordpress.com/2010/05/10/oracle-service-bus-11g-using-custom-xpath-functions/
    http://www.xenta.nl/blog/2010/05/10/oracle-service-bus-11g-using-custom-xpath-functions/
    Regards,
    Abhinav

  • Reliable messaging through OSB

    Hi.......
    Can any one help me to find out the answer regarding OSB.
    Whether OSB provide reliable messaging when calling to a Bpel process, without using JMS and MQ websphere?
    thanks in advance........

    This question should be asked in the SOASuite forum.
    Here is the answer I would expect you'd get:
    http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/bpelpmtransport/transport.html

Maybe you are looking for

  • Ora -06502 from forms application

    I have medical application developed by forms 9i, But its responds error ORA-06502 while running a form with enter query mode. it displys the said error while execute the query . I dont the exeact SQL query returns this error. How to debug this? Is t

  • PALM Z22 HOW TO CREATE CALENDAR EVENTS THEN UPLOAD THEM TO THE PALM Z22

    Hello, I would like to know if anyone can advise me on how to create calendar events in say, excel, and then upload them to my Palm Z22.  The reason I want to create them in excel is so that I can also update the file information to my cell phone as

  • Weblogic webservices and JSP

    Hi Folks, I have been stuck with this issue for quite sometime now. I have developed a simple webservice using a java class. It looks something like this.. public class ReceiveMessageClass{    public void receiveMessage(String msg){       logIt(msg);

  • Can't upload images from iPhone 4S to LR3

    Hi, I upgraded my iPhone 4S to ios 6 yesterday.  When I tried to backup images from the iphone to LR 3, at first it wouldn't recognize the device.  I opened iTunes, let it sync, then closed it. Next, I opened LR and it recognized the device, went thr

  • Home Sharing not working on Verizon iPhone 4s?

    I just bought a iPhone 4s from Verizon and I got the home sharing but when I go into my family's library nothing is there. It is currently plugged into my families computer. How do I get the movies from here onto my phone? Ive done all the steps appl