Transactions over multiple application servers

Hello,
we have following situation.
We have a bunch of core services deployed on a central application server and some applications deployed on individual application servers.
The services are developed as normal remote interfaces.
The core service interfaces have special annotations, so the service locator knows, that he has to lookup them on other servers.
Now we have the following case:
This code is executed in application server 1.
Service2 is deployed in application server 2 and Service3 in application server 3.
public void doSomething() {
        ServiceLocator locator = ServiceLocator.getInstance();
        Service2 service2 = locator.getService(Service2.class);
        service2.doSomething();
        Service3 service3 = locator.getService(Service3.class);
        service3.doSomething();
}Each of the calls to service2 and service3 performs some database operations.
But, if service3.doSomething() fails, the database operations done by service2.doSomething() are not rolled back. (no surprise)
What do we have to do, so that the service2 operations are also rolled back on service3 failures?
Thanks
Dirk

Doesn't work... :(
Here my sample code:
Service1 (deployed on AS1)
@TransactionAttribute(TransactionAttributeType.REQUIRED)
    public void doSomething() {
        Logger.getLogger(getClass().getName()).info("doSomething");
        ServiceLocator locator = ServiceLocator.getInstance();
        Service1Entity entity = new Service1Entity();
        entityManager.persist(entity);
        Service2 service2 = locator.getService(Service2.class);
        service2.doSomething();
        Service3 service3 = locator.getService(Service3.class);
        service3.doSomething();
    }Service2 (deployed on AS2)
@TransactionAttribute(TransactionAttributeType.MANDATORY)
    public void doSomething() {
        Logger.getLogger(getClass().getName()).info("doSomething");
        Service2Entity entity = new Service2Entity();
        entityManager.persist(entity);
    }Service3 (deployed on AS3)
@TransactionAttribute(TransactionAttributeType.MANDATORY)
    public void doSomething() {
        Logger.getLogger(getClass().getName()).info("doSomething");
        Service3Entity entity = new Service3Entity();
        entity.setUuid("Bang");
        entityManager.persist(entity);
    }Each service has a XA datasource configured. The all access the same database.
But when I call service1.doSomething(), I get a javax.ejb.EJBTransactionRequiredException from service 2.
Does somebody has an idea?
thanks
Dirk

Similar Messages

  • How to configure single web server instance to multiple application servers..

    Hi all,
    we are running single instance of IWS6.0 SP2 on solaris, we want to comfigure this single instance to multiple application servers(JRun). Can any one advise me whether it is possible to do.
    Thanks
    Raj

    Hi Raj,
    "how to configure single web server instance to multiple application servers.."
    It's not possible for setting up multiple applicataion servers for Single iWS instance.
    Thanks,
    Dakshin.

  • R12.1.3 Upgrade from 11.5.10 and having multiple Application Servers

    Hi,
    We are in the process of upgrading the 11.5.10 Instance to R12.1.3.
    The 12.1.3 Instance will have multiple application servers.
    I will be doing an R12.1.1 Installation with Upgrade Option.
    What should be the procedure to have multiple application servers?
    Finish the upgrade on one Application Node and then clone the other Application Tiers?
    Please advise.
    Regards,
    VN

    We are in the process of upgrading the 11.5.10 Instance to R12.1.3.
    The 12.1.3 Instance will have multiple application servers.What services are running on each server?
    Do you have shared APPL_TOP or shared application file system implemented?
    I will be doing an R12.1.1 Installation with Upgrade Option.
    What should be the procedure to have multiple application servers?
    Finish the upgrade on one Application Node and then clone the other Application Tiers?
    Please advise.Please see Chapter 3, Performing an Upgrade in the installation doc, there is an example.
    Oracle E-Business Suite Installation Guide: Using Rapid Install
    http://docs.oracle.com/cd/B53825_08/current/acrobat/121oaig.pdf
    Thanks,
    Hussein

  • Session cleanup issue with multiple Application servers

    Hi ,
    I am facing a strange problem with multiple application servers. The java Webdynro session does not get cleaned up completely when user closes the browser ( without using logoff ). On re-login it gets handle of old session and then fails for consecutive view on other webdynpro iviews with an invalid session error. It again starts working with a refresh event.
    Any ideas/suggestion if you have seen something similar before ?
    Thanks and regards,
    Amit.

    Hi Amit
    It seems that issues is not server related, but caused by your client browser. I know, for example, that IE8.0 keeps user session even if two separate browser instances opened on the same client machine. IE 7.0 and lower behave differently - they are separate user sessions per browser instance.
    BR, Siarhei

  • Splitting a background job over different application servers

    I am running my program in the background and its taking long to complete. I have done some optimizations and it has greatly improved but still not running as fast as I want because its processing large amounts of data and the amount of time that I want all the data to be processed is little compared to the runtime of the program so now I want to split the background job over different application servers. Can someone tell me how do I go about doing that and example ABAP code will be greatly appreciated.
    Many thanks

    Hello, If you are interested in BANK_PP_JOBCTRL, here are some of the inputs. Its work very efficeintly, though you will have to investigate a little bit froom your end.
    With in package bank_pp_jobctrl , you will find these FM. I have mentioned the use of it as well.
    RBANK_PP_DEMO_GENERATE_DATA: To create the Business data for Parallel Processing.
    RBANK_PP_DEMO_CREATE_PACKMAN: To create Packages out of the business data.
    RBANK_PP_DEMO_START : To process data in parallel.
    RBANK_PP_DEMO_RESTART: To re-process failed records during parallel Processing.
    You will need to call above in your report program in the same sequence as shown above based on you requirement. I did used only first three.
    TO generate events you will need to execute SE38: RBANK_PP_GENERATE_APPL to create application this will create the FM with numbers as shown below.
    Events: This PPF automatically triggers various events during the execution of theStart Program. Each of this event is associated with a custom function module which contains the business logic.
    For implementing this framework, at least the below mentioned methods should be implemented .
    0205 – Create Package Templates  : This method is used to write the logic for creating packages which in turn decides the data to be processed in parallel. This function module is called in loop at the loop ends only when the exporting parameter E_FLG_NO_PACKAGE has a value ‘X’ passed back to the Parallel processing framework.
    1000 – Initialize Package :This method is the first step in processing a package. It fetches all the parameters required for the parallel processing to start. All the parameters are passed to this FM as importing parameters and it is the responsibility of this FM to save it in global parameters so that it can be utilized by Parallel processing framework.
    1100 – Selection per Range : This method is used to read data for a package. The objects selected must be buffered in global data areas of the application for later processing. The package information is stored as interval in global parameters and this information is used to select the package specific data.
    1200 – Selection for Known Object List: This method is used instead of method 1100 if it is a restart run. The objects to be processed are known already.
    1300 – Edit Objects: The processing logic to be implemented using parallel processing for the selected objects is written in this method. This function module is used to implement the business logic and
    Also, obiviously you would like to log your messages , so the framwrok provides macros to do it.
    Let me know if you need some further help as I know there is very little information provided on this.
    Regards/Ajay

  • Starting multiple application servers

    We have 4.7 system has 2 application servers as "sap1" and "sap2" installed in different Unix servers.
    I would like to start "sap1" first and "sap2" next. Is there any standard script for starting multiple application servers in a sequence. We have problem, when restarting servers after weekly off-line backup. Should we go for customised Unix shell scripting?.
    Thanks,
    Sam

    #!/bin/sh
    SYSID=ABC
    STARTSCRIPT="/sapmnt/$SYSID/exe/startsap"
    start the Central Instance (CI)
    $
    start AppServers
    remsh <app server> -n startsap <Instance name>
    stopscript
    #!/bin/sh
    SYSID=ABC
      Stop all app servers and the database.
    stop AppServers
    remsh <hostname> -n stopsap <instance name>
    stop central instance
    /sapmnt/$SYSID/exe/stopsap
    Thanks,
    Tanuj

  • Load balancing across multiple application servers not working with JCo RFC

    We have a problem where inbound messages to the Mapping Runtime engine (ABAP -> J2EE) are not load balanced over application servers. However, load balancing does take place across server nodes within one application server.
    Our system comprises of the following:
    Central Instance (2 X server nodes)
    Database Instance
    2 X Dialog Instances (with 2 X server nodes each)
    The 1st application server that starts is usually the one that is used for inbound messaging.
    We have looked at the sap gateway configuration and have tried various options without much luck:
    i.e.: local gateways vs. one central gateway, load balancing type by changing parameter gw/reg_lb_level, see: http://help.sap.com/saphelp_nw70/helpdata/EN/bb/9f12f24b9b11d189750000e8322d00/frameset.htm
    Here are our release levels:
    SAP_ABA     700     0012     SAPKA70012
    SAP_BASIS     700     0012     SAPKB70012
    PI_BASIS     2005_1_700     0012     SAPKIPYJ7C
    ST-PI     2005_1_700     0005     SAPKITLQI5
    SAP_BW     700     0013     SAPKW70013
    ST-A/PI     01J_BCO700     0000          -
    Any help would be greatly appreciated.
    Many thanks

    Tim
    Did you follow the guide here:
    How to Scale Up SAP Exchange Infrastructure 3.0  
    Learn what the most likely scaled system architecture looks like, and read about a step by step procedure to install additional dialog instances. The guide also walks you through additional configuration steps and the application of Support Package Stacks.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c3d9d710-0d01-0010-7486-9a51ab92b927
    We followed this guide for XI3.0 and PI7.0 and works successfully!

  • Issue of multiple Application servers

    I have a report which submits 5 reports(with Return
    ) inside it. Now if I have multiple application server then I do not know which server the job will get submitted and currently in my landscape the synchronisation time between the servers is 2 mins. Problem is some of my subsequent reports is dependent on the prev one and due to this if next report is getting called in diff application server before the sync then it is failing.
    I have thought about open job and close job while submitting reports because in open job FM you can specify server but then I need to wait in main program till the report finishes. 
    Is there any solution more elegant ? or am I missing something ?
    Regards
    Somnath

    Create 5 different jobs for all 5 different programs through JOB_OPEN, SUBMIT, JOB_CLOSE FM.
    You can set the start date / time for the first job.
    For the all rest jobs you can make them dependent on its predecessor job's status.
    You can use the parameter PRED_JOBNAME and PRED_JOBCOUNT of the JOB_CLOSE FM to set the predecessor job. You can set the PREDJOB_CHECKSTAT to make it state dependent.
    Regards,
    Naimesh Patel

  • Top Essentials Cache and Multiple Application Servers

    Hello,
    I'm developing a new servlets/services application in Java using tomcat and playing around with toplink essentials. Is it possible, when using multiple servers, to expire cached objects? Eg I update user account info on server 1, but 2 and 3 still have old data. The documentation and blogs I have read seem to indicate you either have to force a refresh of the object or set up readAllQueries to go direct to the db (which rather defeats the purpose of having a cache?) - for fresh data. Though I agree there are some places where up to the moment data is not always required, building a system to scale with expiry caching across multiple app servers seems like something toplink essentials SHOULD be able to do.
    Also, is there any work on when the new rev of Toplink Essentials would be out? I see posts about the 11G preview but that's regular toplink.
    Thanks in advance!

    There are several caching options in TopLink Essentials to handle stale data.
    <p>
    Some of the settings are available through properties in the persistence.xml, but for most you will need to use a DescriptorCustomizer or SessionCustomizer and use the API of ClassDescriptor (refer to JavaDocs for additional info).
    <p>
    Caching options include:
    <p>- Cache Type : (weak, hard, soft, none), a weak cache will decrease stale data.
    <p>- Isolated (shared) : You can set the descriptor to be isolated or cache not shared to avoid caching the class.
    <p>- Refresh : You can enable refreshing at the class or query level.
    <p>
    A ClassDescriptor does have an invalidation policy, but the policies for invalidating based on a time-to-live or time-of-day were not ported from TopLink to TopLink Essentials, however you could write your own pretty easily.
    <p>
    If you upgrade to using TopLink 11g (preview), which you can download and use under the Oracle OTN license, then you have support for using cache invalidation and cache coordination. This functionality is also available in the Eclipse EclipseLink project currently in incubation.
    <p>
    <p>---
    <p>James Sutherland

  • Portal pointing to Backend (Multiple Application Servers)

    Hello Experts,
    Landscape details : NW04s SP17 Portal for Travel Expense pointing to ECC 6.0 backend (running with 3 application servers). We don't have web dispather installed on the ECC 6.0 system, and client has no plan to install that also.
    We have created portal system with Load Balancing template and using logon group (all 3 backend application servers are part of this logon group). In portal system, we have configured -
    1. Connectors - using logon group.
    2. User Management with LogonTicket.
    3. ITS - pointing to specific application server - Can't we use logon group for ITS traffic going to backend
    4. WAS - pointing to specific application server  - Can't we use logon group for WAS traffic going to backend
    In ESS/MSS (Travel Expense) scenario, what kind of calls will be made to backend and will these be through Connector, or ITS, or WAS?
    As per my understanding ITS is used for transactional Iviews.
    When will Connector and WAS connections will be used?
    Thanks
    Davinder

    Hello Experts,
    1. Connectors - using logon group.
    2. User Management with LogonTicket.
    3. ITS - pointing to specific application server - Can't we use logon group for ITS traffic going to backend
    4. WAS - pointing to specific application server - Can't we use logon group for WAS traffic going to backend
    In ESS/MSS (Travel Expense) scenario, what kind of calls will be made to backend and will these be through Connector, or ITS, or WAS?
    Regarding points 3 & 4:-
    http://help.sap.com/saphelp_nw04/helpdata/en/42/5cfd3b0e59774ee10000000a114084/frameset.htm
    You can only use the SAP Message Server for HTTP load distribution, if the browser is the direct client of the message server. If another component lies between the client (browser) and the message server, (for example, the portal), you cannot use the message server to distribute the load.
    So this is a requirement to use the webdispatcher if your backend is called from the Portal. Otherwise all requests will go to the CI.
    (Q) In ESS/MSS (Travel Expense) scenario, what kind of calls will be made to backend and will these be through Connector, or ITS, or WAS?
    (A) It depneds on how you have configured the services. Usually its via HTTP, HTTPS or a SOAP adapter to a FM.
    Hope this helps 
    Michael

  • Multiple Application Servers - Same class instance

    Hi,
    Due to increasing load we have to add multiple Web Servers and Application Servers (custom built) for our Web Application.
    As currently we are using 'synchronized' for adding and releasing connection in ConnectionPool and also using static in several other classes - we have to make these few classes single instance across the application servers.
    We are using iPlanet 6.0 for Win 2000. Is there any way we can direct specific classes for a single instance. Please provide me with all sorts of alternatives.
    Thanks a lot,
    Suman Biswas

    Hi,
    Yes, we have different JVMs. Different JVM means different processes,now there can be two cases,these process running on same machines
    or on different machines.If it is in different machines then undoubtly you require to go for the Distributed Technology(RMI for java).
    As we have couple of classes which are using
    'synchronized' - cann't we use centralized classes for
    these couple of classes to maintain integrity?Yes you can do it,now this centralized class should be available in common place from where your all applications can get results,and for avoiding the data corruption your require to go for synchronized(if some global variables) block,since the same instance will be serving all the requests.
    When you say RMI - my question is how the commercial products handle these kind of issues while they are in multiple servers?I have created some application using RMI but not the same one which you had specified.I had used it for different purpose.
    vicky

  • WebDynpro Notification Service with multiple Application Servers

    Hello Experts,
    I am currently working on a project where I have to integrate a BSP Application into a new Web Dynpro ABAP Application. On the BSP Page it is possible to edit some details (for example for a customer).
    When the user start to work on the BSP Page, the Web Dynpro Page should prohibit the navigation (i.e. disable all links). After Saving the BSP page, the navigation lock is released and the Web Dynpro reloads some data, which were changed from the BSP Page.
    I have a NetWeaver 7.02 so I decided to use Shared Objects and the new Web Dynpro Notification Service to realize the given requirements. On the development system everything worked fine. The Notification Service was called and it took about 2 Seconds until the Web Dynpro Application updated.
    But we got serious problems on the testmachine, which uses a Web Dispatcher and two application servers. After some research we managed that the application is running, and works.
    But the Notification Service takes now up to 1 Minute until it fires the registered actions. And I good frequently an ASSERTION_FAILED from the method CL_WDR_NOTIFICATION=>ATTACH_FOR_READ in the ST22 as long as the application is running.
    Can anybody help me how to solve this issue. It is a real blocker for the project.
    If there is another way to establish eventing between Web Dynpro and BSP I would also go for another solution. But I don't think there are many other possibilities (SAP Portal and NWBC are no options - Maybe the new Web Dynpro PageBuilder?).
    Best Regards
    Daniel

    Hello Guys,
    we decided to do a workaround for the moment. We use a refresh button on the Web Dynpro screen. That is not very nice, but sufficient for the moment.
    Anyway: I am still interessted in the BSP-Web Dynpro Interaction Issue. So if somebody has any ideas, please let me know.
    @PageBuilder: Currently the page builder does not work on the system, because of an 403 - Error when I try to call the Application-Configurator (the SICF service is active). But I will try this also as soon as this problem is solved.
    Best regards
    Daniel

  • Check SITSPMON at multiple application servers at once

    Dear Sirs,
    we are in a setting with close to 10 application servers. To the memory consumption and current status on my system, I need to check SITSMON on every application server.
    Is there an easy way to get a STISPMON like (e.g watch memory) on all the application servers in one go?
    best regards,
    Jørgen

    Dear Jørgen,
    at the moment we do not have an easy way to monitor more than one application server  within SITSPMON. I am the developer of SITSPMON and happy to read your question. I do agree in your wish to have a feature like this.
    How to implement? I would suggest to provide an additional check box in the dialog panes for
    *the memory staistics,
    *the HTML templates cache directory, and
    *the Mutex lock statistics.
    This checkbox allows to switch between 'system' and 'application server mode' checking it will result in an enhaced table, containing an additional column for the appl server...
    Do you agree? Better ideas? If this fits to your  requirement, I will implement this. And ideas are welcome always.
    BTW: Did you already check the CCMS? There a technical experts monitor for the internal ITS. This might be helpful four you.
    best regards
    Tobias

  • Broadcasting with Multiple Application Servers

    Hi, If I schedule a query broadcast to fill olap cache and I have multiple production servers which App server(s) will get the cache filled?  What ever server the broadcast job runs on?
    If anyone can give some insight it is greatly appreciated.
    Thanks,
    Ken Murray

    1. If the OLAP cache is set to main memory than the OLAP Cache only gets created on the server in which it is run? So if I have 4 servers with load balancing then it is possible for the next 3 people who run the query to not benefit from the initial OLAP Cache created.
    <i>--> Next 3 people will benefit only if they log in to the same server, if cache was created in app server 1 and next 3 login to app server 2, 3 and 4 they wont hit the cache from app server 1.</i>
    2. If I change it to BLOB than any of the query runs on any server would access the initial OLAP Cache Entry that was created?
    <i>--> Yes.</i>
    3. Where is this BLOB Cached created and made available from? The DB Server or on 1 of the APP Servers?
    <i>--> DB Server</i>
    http://help.sap.com/saphelp_nw04/helpdata/en/00/241da12ef84f40bb6ecd3ae73d8b58/content.htm
    4. If SAP can make BLOB Cache available to all servers then why couldn't they make Main Memory Cache available to all servers?
    <i>Main memory is specfic to a server like how you have RAM for your PC, this is not accessible by other system. BLOB is Database and can be accessed by multiple systems.</i>
    Thanks.

  • Transactions with multiple weblogic servers

    Hi
              I've got two weblogic 5.1 sp9 servers running identical copies of my
              application but pointing to different database instances (both Oracle
              8.1.6). I have a transaction which requires creating entity beans on
              both the servers (the first server calls the second in a "b2b"
              transaction)
              In a prior thread someone mentioned that in this scenario, the second
              server will actually use the first server to do all its JDBC work. Could
              someone please explain the rationale behind this to me? If my second
              weblogic server belongs to a different entity, it has no business
              writing to the database on my first machine.
              Is there any way to get this not to happen - would manually suspending
              and resuming the transaction before and after the call to the second
              machine work?
              Thanks!
              regards,
              Meherzad
              

    "Meherzad Gotla" <[email protected]> wrote in message news:[email protected]...
              > Hi
              >
              > I've got two weblogic 5.1 sp9 servers running identical copies of my
              > application but pointing to different database instances (both Oracle
              > 8.1.6). I have a transaction which requires creating entity beans on
              > both the servers (the first server calls the second in a "b2b"
              > transaction)
              >
              > In a prior thread someone mentioned that in this scenario, the second
              > server will actually use the first server to do all its JDBC work. Could
              > someone please explain the rationale behind this to me?
              Hi Meherzad.
              You're correct, this is the way WebLogic 5.1 works with distributed transactions.
              Release 6.0 introduced a two-phase commit engine that can atomically commit across
              two database instances, whether they're accessed from one or two servers.
              This capability involved significant additions to the server that are too big for a
              5.1 service pack.
              > If my second
              > weblogic server belongs to a different entity, it has no business
              > writing to the database on my first machine.
              >
              > Is there any way to get this not to happen - would manually suspending
              > and resuming the transaction before and after the call to the second
              > machine work?
              Suspending/resuming should "work," but two database updates would not be part of the
              same atomic transaction.
              So one option is to upgrade to WebLogic 6.0/6.1, another is to use a single database
              instance with WebLogic 5.1, and another is to suspend/resume but not have an atomic
              transaction. Sorry, no easy answer...
              > Thanks!
              Hope this helps.
              Regards,
              -- Ed Felt
              BEA Product Engineering
              [email protected]
              +1 908-580-3142
              

Maybe you are looking for

  • DNS/web-server hosted off-site. How to set up Leopard server for mail?

    Hey Everyone, Brand new xserve with leopard server 10.5.2. Currently, Our web and DNS server for our domain,"company.com" is co-located off-site with an MX record of "mail.company.com" pointed at the static IP of the office where our mail server is.

  • User did not respond (not another one!!!)

    Hello, I recently purched a Macbook Pro and I can't get the video chat feature in iChat to work. I have tried all the tutorials, everything to try and get this **** thing to work. I have turned my firewall off, changed the port that AIM uses, and jus

  • Ora-01427 error

    Hi , i am getting Ora-01427 error when i ran below script . my sub query returns more than 1 row . please help me in fixing this . update registrant_address a set a.text_res_address_nbr = (select c.street_number from registrant_address e , registrant

  • Code navigator stuck on

    Hi all, I hope you can help. I'm on a Mac using CS5. Somehow my code navigator (the little popup that shows html, css, etc) thinks it's always on and I can't turn it off or get it back to normal funtion. Every time I click in a page I am editing a wa

  • SIM card needed?

    Okay - since Verizon doesn't seem to want to sell a WP7 device with a slideout keyboard, and I seriously need a phone, I'm thinking of picking up a used Touch Pro 2.  The thing is, it has a SIM card slot and no thinking person would dare sell the pho