How to map sync EJB call to async JMS req/resp pair

Folks,
Basically, we have the situation our session bean synchronous
transactions map to asynchronous JMS transactions.
In other words, a session bean method call would have the
following implementation logic:
1. marshall params and send async JMS message.
2. wait around for a reply message to be ready
3. receive a reply JMS message, unmarshall response.
4. return.
The problem, clearly, is that we can't do step 2 in the EJB method itself for fear
of tying up threads.
This seems like a classic problem of mapping synchronous EJB calls to asynchronous
backends.
Any suggestions how to do this?
Thanks,
Jabir

I don't know if there are any great solutions, short of making everything
async
(even to the EJB client) which should be considered if possible. E.g., EJB
sends
JMS message and immediately returns. Then an MDB gets the JMS response,
and calls back the client. If you can't modify the client, maybe you can
write a
"proxy" service between the client and the EJB layer.
Otherwise you'll need to bump the number of threads, knowing that a certain
amount of them will be sleeping.
regards,
-Ade
"Jabir" <[email protected]> wrote in message
news:3d2d14aa$[email protected]..
>
Folks,
Basically, we have the situation our session bean synchronous
transactions map to asynchronous JMS transactions.
In other words, a session bean method call would have the
following implementation logic:
1. marshall params and send async JMS message.
2. wait around for a reply message to be ready
3. receive a reply JMS message, unmarshall response.
4. return.
The problem, clearly, is that we can't do step 2 in the EJB method itselffor fear
of tying up threads.
This seems like a classic problem of mapping synchronous EJB calls toasynchronous
backends.
Any suggestions how to do this?
Thanks,
Jabir

Similar Messages

  • Sync Mediator calling Async BPEL

    Hi,
    I have an Synchronous mediator which will invoke an Async BPEL. Aync BPEL will do some processing and need to send the response back to the mediator which is not happening.
    Any ideas on how to get the response from the Async BPEL pass on to the Sync Mediator which is calling the Async BPEL.

    Its async. It would not synchronize with a response. it doesnt matter if you link sync to async. In case, if you really want a response , please change your async to sync.

  • I have an old iphone 3 32gb and don't use it to make calls as I have a 4s but would like to use the 3 for music any suggestions as to how I can sync two phones with I tunes

    I have an old iphone 3 32gb and don't use it to make calls as I have a 4s but would like to use the 3 for music any suggestions as to how I can sync two phones with I tunes

    Plug the device into the computer.
    Select the content desired to sync.
    Sync.

  • Sync RFC call from XI

    Hi
    I've a requirement for a XI Inbound Order that I need to check for each MATNR on the Order Line it's associated Division (SPART).  Once I know the Division I'll then split up the Order per Division.
    Can I from my BPM collect the message, call a RFC via Send Sync Step to return the Divisions and then continue with my transformation ?
    I was looking for an example of how to call an RFC from a BPM.  NOT using Sync<>Async bridge.
    Does anybody have a link to a blog etc for that.?

    Hi,
    You can either use RFC lookup in mapping or use Sync RFC call in the BPM.
    Refer the Blog RFC Scenario using BPM --Starter Kit By Arpith Seth for Sync RFC call in BPM.
    Refer this document [Mapping Lookups: Remote Function Calls API|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439] for making RFC lokup from mapping.
    Thanks
    SaNv...

  • How to Migrate OC4J EJB Web service to Weblogic

    Hello,
    We have a J2EE app developed under OC4J that needs to be migrated to weblogic 10.x. It uses web services mapped to EJB's with the oracle.j2ee.ws.SessionBeanWebService class, example setup:
    <servlet>
    <servlet-name>CreditCardManager</servlet-name>
    <servlet-class>oracle.j2ee.ws.SessionBeanWebService</servlet-class>
    <init-param>
    <param-name>jndi-name</param-name>
    <param-value>CreditCardManagerBean</param-value>
    </init-param>
    </servlet>
    Can someone point me to any docs on how to create the equivalent objects in Weblogic?
    Thanks,
    Leor

    Microsoft webservices uses HTTP sessions to maintain state. That means that the webservice sends a token to the client to be passed back on subsequent calls.
    Unfortunately, the webservice control in 8.1 doesn't know how to send the session token back to the MS webservice. The webservice control knows how to talk SOAP only. It doesn't know about session tokens. The reason for this is the different protocols available to transmit SOAP. Most of them are not HTTP session aware.
    Workshop webservices uses conversation ID's that are contained within the SOAP header to maintain state. That way, we don't have the dependency on the session state for maintaining state.
    The way to handle Microsoft's stateful webservice implementation is to create a custom webservice control that uses an HTTP client. Query the HTTP client for the session cookie. Store the session token and send it with subsequent calls to the MS webservice.
    Thanks,
    David Gorton
    Workshop Customer Centric Engineering

  • How would you solve the following Synch Async scenario?

    Hi,
    I have the following use case and would like to know thoughts from the community on how to solve it -
    There is a web based portal sending a create order request to ESB and the ESB does some message processing and passes it to a CRM to complete the order processing and generate a order id to be sent back to the portal user.
    Non Functional Requirements -
    1) Reliability
    2) Performance in terms of response time to the user.
    Issues -
    1) The web service exposed by CRM takes a long time to process the request and it is not acceptable that the Portal end user waits for that long to get the Order ID back..
    2) If we make a SOAP/HTTP call from Portal --> ESB and then another SOAP/HTTP call from ESB ---> CRM then the reliability is compromised.
    Solution -
    The solution that we are proposing is as follows -
    1) Make a SOAP/HTTP call from Portal to ESB and then put the message in a JMS Queue which will persist it. This will provide reliability and QOS.
    2) Generate a random unique number (which will act as the order id for the user) inside the ESB and send it back to the user immediately after persisting the message in the queue. Also persist this interim order id in a database.
    3) Pick the message from the queue using MDB or Proxy service (specific to Oracle Service Bus because that is what we have as an ESB) and send the message to CRM.
    4) CRM takes its own time to process the request from MDB and sends the response (actual OrderID in CRM) which is then persisted corresponding to the row in step#2. Thus for future search by the user we can use this mapping to get the actual order details from CRM.
    I do not see this as a scenario which is unique or unusual, where an Asynch request needs to made to look as synch to the user. But the solution we are proposing seems to be crude to me and with loopholes (like how to handle scenarios where CRM returns an error etc.) which would require lot of effort to be fixed.
    Questions -
    1) What is your opinion about the solution and suggestions about a better/cleaner way to implement it?
    2) Is there any standard approach to solve such kind of issue without creating so much of complexity (where we have to write code to keep the mapping and take care of all other issues)?
    3) Is there any pattern that can help solve this problem?
    4) Have you ever faced this issue and how did you solve it?
    Regards
    Ananya

    Hi Ananya,
    If its not required to give Order ID to Portal user immediately, you can update Portal with Order ID in async manner.
    What I propose is,
    1. Let Portal call in Async manner, thread is released. (JMS can be used as well to improve reliability.)
    2. CRM takes the request and responds with order id or an error, calls webservice of AIA.
    3. AIA's WS then update Portal with Order ID or error in proper format.
    Thanks,
    Manish

  • I have a i tunes account but laptop is broken . how do i sync my ipod to a new laptop?

    i have a i tunes account but laptop is broken . how do i sync my ipod to a new laptop?

    Sync is only oneway, from PC to your device. Unless you have the music on your PC, iTunes is going to wipe out what you have on your device if you are syncing to a new library.
    You can only transfer Purchased music over to Itunes on your PC.
    iTunes Store: Transferring purchases from your iOS device or iPod to a computer
    http://support.apple.com/kb/HT1848
    As for you own music, you may have to use a third party software to copy over. A good Free one is called Sharepod which you can download from Download.com here:
    http://download.cnet.com/SharePod/3000-2141_4-10794489.html?tag=mncol;2

  • How do I sync my Ipod Classic 160gb with my new computer (windows 8). It synced with my old computer (windows XP) but not with my new one (windows8)

    How do I sync my Ipod Classic 160gb with my new computer (Windows8).? It synced with my old computer (WindowsXP) but will not do so on the new computer?

    Hi Lechwe,
    I had this issue recently, due to changing HD for an SSD.
    In my case, since the library in my iPod was synced to the HD it was not syncing to the library in the SSD, though they were the same (had the same contents).
    I found there's this checkbox in iTunes > iPod > [Settings] Music, called "Sync Music". Mine was unchecked, I guess due to iPod being synced to the old library. I marked the checkbox and clicked then in Sync. iTunes asked me if I was sure I wanted to sync the iPod with the "new" library, i clicked yes, and the it started determining the song to sync. Since the library was essentially the same (just a couple songs more in the new one), it synced the couple new songs and that was it.
    Hope it helps!
    Regards,
    Awlo.

  • How to only sync selected items from library

    *I am a new owner of a 120GB iPod classic. How do I sync only certain songs from the itunes I currently have ? I removed the check mark from the box and those songs still downloaded to the ipod. Not sure how to set itunes to only snyc those items selected. Any help is appreciated.*

    Hey there,
    One thing you want to check is to make sure you have your iPod set to only sync checked songs. To do this, plug your iPod in and when it appears in iTunes, on the Summary tab, you will see a section called "Options" below. You want to make sure you have a check mark next to "Sync only checked songs and videos" and then hit Apply and see if that helps.
    B-rock

  • How to map back charge process

    Hello friends,
    I need help to map below scenario in SAP:
    We have third party business process, where vendor V1 is supplying material to customer. When customer receives material; V1 invoices us and we make payments to V1.At this point PO is closed for vendor V1.
    Now if customer faces any problem with material, then we call local vendor V2 to repair or service the material. What ever charges come from local vendor is suppose to reimburse by vendor V1.
    Now how can we link V2 vendor invoice amount to V1 invoice. What will be the document flow? How to map back charge process . 
    Note:
    We have considered adding negative line items to the existing PO but understand this is not possible once payment has been issued and the PO is closed.
    We have considered creating a u201Creverse sales orderu201D but do not want to create a separate order or handle the vendor under a separate sold-to account (as a customer)
    We have considered a manual FI invoice but do not want to handle the vendor under a separate sold-to account (as a customer)
    Seeking valuable inputs from experts.
    Regards
    Ravi

    Hi Raghavendra
    Yes V2 exist in SAP, right now we create new purchase order to V2 for services for material at customer location, after his service we do payment to V2 and same amount is charged to V1.
    While charging V1 , we need to treat V1 as a customer( sold to party ) , which we donu2019t want , and direct clearing from FI is also not fusible as we again need to treat V1 as customer ( sold to party ) .
    Our requirement is to map using some credit memo or debit memo or any other documents.
    regards
    Ravi

  • Sync RFC call from BPM - message expired

    Hi guys,
    I have a scenario with BPM where I'm doing a sync RFC call to ECC and then I want to process the result. However, the processing of BAPI take approx 5 minutes and my messages get expired after 3 minutes.
    How to resolve this issue?
    Thanks a lot,
    Olian

    Hello,
    Problem might be at BAPI end.  Please check BAPI by executing with your set of inputs. If BAPI goes for exception for yoru set of input values.. you may not get response from R3. So you might have error..
    secondly.. Please post the error in the communication channel and errro in the SXMB_Moni as well.
    Thanks,
    subbu

  • How to map XML File input to VO (eventually to update table) upon fileupld

    Reqirement: I am downloading an XML File (basically name-value pair) from user using OAMessageFileUploadBean. I need to take this file and update to an existing record in the table (cs_incidents_all). XML File schema is well-known in advance.
    Approach: Don't know what is the best, but I'm thinking if there is an OAF way to map the XML File (Blobdomain) to VO and get the rowIMPL.getColumn1Value to fetch all the datavalues then loop thru all the columns (xml-tags) and finally call plsql APIs which will update/insert into table (cs_incidents_all)
    Is this possible in OAF? If so please shed some light as to how to map XML File to VO.
    If this is not possible then please let me know the other way. I have to do this inside the oaf.
    Thank you,

    Can someone please let me know if this is possible in OAF?

  • How to map a custom enum list to a custom form property in an extended incident class

    Hi,
    I'm struggeling to understand how to map a custom enum list to a custom form property in an extended incident class.
    Here's what i want to have happen:
    I am going to publish a request offering on my SMPortal for allowing users to submit basic IT incidents. I want the form to include "Whom does this problem affect" (answers(This is the custom enum list): Me, Multiple Users, Whole department or Whole
    company), "What is the problem about", "Description" and "Attachments".
    Here's what i've done:
    In the authoring tool i created a MP for the custom enum list and put only the list in it. I sealed the MP and imported it.
    I created another unsealed MP called TST.Incident.Library for storing incident library customizations and extended the incident class to add an extension class i called ClassExtension_Affected scope with a custom property i called AffectedScope. Then i am trying
    to set the datatype of this property to "list". In the "select a list" dialog i cannot chose my previously sealed MP with the custom enum list in it. Why?
    - Do i need to scratch the sealed MP and put the custom enum list in the latter TST.Incident.Library MP instead?
    - If so, can i do that and keep this MP unsealed, or will i get an error on import saying "Unsealed management packs should not contain type definitions"
    - Should i create one sealed MP for both the custom enum list and the extension class + custom property?

    Hi,
    Authoring Tool simply isn't informed about your list. Open the sealed management pack where you define the root of the list in the Authoring Tool and in the same time open TST.Incident.Library. You will have two opened MPs in the Authoring
    Tool and be able to add a custom list for your custom field.
    Cheers,
    Marat
    Site: www.scutils.com  Twitter:
      LinkedIn:
      Facebook:

  • How to map the appointment date in CRMXIF_ORDER_SAVE_M02-4x ?

    Hi Team,
    I want to map the field in CRMXIF_ORDER_SAVE_M02-4X, how to map..please help ..where we need to do ..could you please tell me the steps.
    CustomerAppointmentDate  
    CRMXIF__ORDER__SAVE__M02-4x/ E101CRMXIF__BUSTRANS/ E101CRMXIF__APPOINTMENT__XT/E101CRMXIF__APPOINTMENT/ TIMESTAMP__FROM
    Thanks
    Kalpana  

    Hi Kalpana,
    Below is a sample code. Modify this as per your input.
    * Header details
      CLEAR itab_edidc40. 
    MOVE sy-mandt TO itab_edidc40-mandt .
    MOVE sy-saprl TO itab_edidc40-docrel. 
    itab_edidc40-docnum = '0000000000000001'.
    itab_edidc40-direct = '2' . 
    CONCATENATE 'SAP' sy-sysid INTO itab_edidc40-rcvpor. 
    itab_edidc40-rcvprt = 'LS'. 
    itab_edidc40-rcvprn = t000-logsys. 
    CONCATENATE 'SAP' sy-sysid INTO itab_edidc40-sndpor. 
    itab_edidc40-sndprt = 'LS'. 
    itab_edidc40-sndprn = t000-logsys. 
    itab_edidc40-mestyp = 'CRMXIF_ORDER_SAVE_M' . 
    itab_edidc40-idoctyp = 'CRMXIF_ORDER_SAVE_U02' . 
    itab_edidc40-arckey = ' '.
    itab_edidc40serial = l_serial . 
    APPEND itab_edidc40  .  CLEAR itab_edidc40  .
      CLEAR: itab_edidd40 ,e101crmxif_bustrans. 
    itab_edidd40-segnam = 'E101CRMXIF_BUSTRANS'. 
    itab_edidd40-docnum = '0000000000000001'.
    e101crmxif_bustrans-object_task = ’I’.
    e101crmxif_bustrans-object_type = eg: 'BUS2000117'.
    e101crmxif_bustrans-process_type = process type of your transaction.
    e101crmxif_bustrans-description = ’Test’.
    MOVE e101crmxif_bustrans TO itab_edidd40sdata . 
    APPEND itab_edidd40  .  CLEAR itab_edidd40  .
    itab_edidd40-segnam = 'E101CRMXIF_APPOINTMENT_XT'.
    itab_edidd40-docnum = '0000000000000001'.
    e101crmxif_partner_xtdatax =  'X' . 
    MOVE  e101crmxif_partner_xt TO itab_edidd40-sdata . 
    APPEND itab_edidd40  . 
    CLEAR: itab_edidd40,e101crmxif_bustrans  .
    *** Pass the Value   
    itab_edidd40-segnam = 'E101CRMXIF_APPOINTMENT'.   
    itab_edidd40-docnum = '0000000000000001'.
    e101crmxif_appointmenttimestamp_from = ‘01/03/2015’.   
    MOVE e101crmxif_appointment TO itab_edidd40sdata .   
    APPEND itab_edidd40  .    CLEAR itab_edidd40  .
    * Create IDoc
    CALL FUNCTION 'IDOC_INBOUND_ASYNCHRONOUS'   
    TABLES    
    idoc_control_rec_40 = itab_edidc40     
    idoc_data_rec_40    = itab_edidd40.
    SELECT  * FROM edidc   WHERE serial = l_serial .  
    l_range-low = edidc-docnum.    l_range-sign = 'I'.    l_range-option = 'EQ'.    APPEND l_range.  ENDSELECT .
    * report program to create transaction 
    SUBMIT rbdapp01 WITH docnum IN l_range                WITH p_output = ' '  AND RETURN.  COMMIT WORK.
    WAIT UP TO 2 SECONDS. 
    SELECT  status countr statyp stapa4     INTO (l_status, l_countr, l_statyp,l_stapa4)    UP TO 1 ROWS     FROM  edids     WHERE docnum = edidc-docnum      ORDER BY countr DESCENDING . 
    ENDSELECT. 
    SELECT SINGLE object_id guid INTO (lv_object_id , lv_object_guid)     FROM crmd_orderadm_h     WHERE guid = l_stapa4+0(32).
    IF lv_object_id IS NOT INITIAL.  
    object_id = lv_object_id.
    ENDIF. 
    COMMIT WORK.
    You can test it using WE02 or WE05 transaction.
    Give Points if useful.
    Regards,
    Abi

  • How to map text from Request Offering to custom textbox

    Hi!
    I have new custom Tab in Incident form with new textbox. I need this textbox fill with text added by user on Portal, but I can't figure out how to map user input to this text box. I can't see it in Request Offering form. Also when I create binding from this
    form to extension of Incident Class, I can't change older Request Offering mapped to Incidents.
    What can I do to make this work correctly?
    Thanks

    User's answers from Request OFfering are stored in one field called UserInput. As result:
    You can't bind control to specified answer
    You can create your own control\converter to parse UserInout field (this is XML text)
    SCSMSolutions
    email: freemanru (at) gmail (dot) com

Maybe you are looking for

  • Can you help me about change data captures in 10.2.0.3

    Hi, I made research about Change Data Capture and I try to implement it between two databases for two small tables in 10g release 2.MY CDC implementation uses archive logs to replicate data. Change Data Capture Mode Asynchronous autolog archive mode.

  • Problem in mapping while using Do not Use SOAP Envelope

    Hi All, This is wrt my thread 'Removing and adding SOAP Envelope' I am currently working on SOAP-XI-Proxy Scenario. For some un avoiadable reason, I had to use the option 'DO not use SOAP Envelope' .So the SOAP Envelope came withen the payload and in

  • Can't see menu in IDVD 7 with Ilife 08

    I installed Ilife 08 today for the new DVD themes...I can't see any of the themes, just a black screen. I purchased my expensive mac last year...it would be nice if I can find a way to figure this out. I bought Ilife just for the new themes...and now

  • JPasswordField is not visible in applet

    Hi there, I've written this program to display some images with a copyright word layered on top of the original image. SO when you enter the correct password the copyright image will disappear. Problem is if I were to use the JPasswordField the field

  • Can my serial number to my ipod be located on my itunes account?

    Can my serial number to my ipod be located on my itunes account?