Can I use RequestDispatcher to invoke services in another context?

Hello I have two web applications one using JAXM (App A) and the other a JSP application (App B).
Both applications need to update the same database. What is the best way to do this? I was thinking that I should create a third servlet based web app (App C) that handles all the database interaction, but can I then use a RequestDispatcher to send database update requests to 'App C' from 'App A' and 'App B'. This way 'App C' can handle all database interaction.
Any view/ideas? Am I talking rubbish? What's the standard way to do this?
Thanks.

Hi ..if the word "singleton" sounds confusing to you ... what you need to do in easier words is to create only one instance of a class that would deal with the database . That class would take care of all the database transactions and you need to ensure that both AppA and Appb use the same instance.You shouldnt create two objects/instances of that class.
All this is same as what Rachel said..just put a bit in detail (and perhaps simpler words).
thx.

Similar Messages

  • How can I using tpcall from one service to another service in the same server

    When I using tpforward between two services in one server, it's working ok. However,
    when I using tpcall from one service to another service, it's failed?
    anybody can tell me why?
    thanks
    george

    "george" <[email protected]> wrote:
    >
    When I using tpforward between two services in one server, it's working
    ok. However,
    when I using tpcall from one service to another service, it's failed?
    anybody can tell me why?Basically, tpcall:ing another service in the same server is a no-no, unless you
    a) are running a multi-threaded server (requires TUXEDO 7 or newer + compilation
    options) or
    b) use tpacall() instead of tpcall() and specify the flag TPNOREPLY. This is probably
    not what you want to accomplish, though.
    The reason is that TUXEDO servers by default (and always in versions before 7)
    are single-threaded. If service A and B both reside in server X, server X will
    be busy taking care of the call to A. If A makes a call to B, the call will be
    put on the queue to X, but X will not look at the queue until it is done with
    A, which won't happen until B returns... deadlock!
    You can play tricks with starting multiple instances of X, but in the end you
    will always face a risk (something lika a race-condition) for a dead-lock.
    Solution: Move service B to another server (usually quite easy) OR switch to multi-threading,
    if that's possible. Just make sure all code your service calls is MT-safe as well...
    thanks
    georgeHope this helps you,
    /Per

  • HT204053 Can I set up icloud services on multiple iphones under a single account? More specifically, can I use- find my iphone services -under one account?

    Can I use Find My iphone service with multiple iphones under one account? I have 4 iphones in my family and I want to monitor all phones by logging into one account!

    You can create and use different iCloud accounts on the same computer, whether they are single or multiple user.
    There is a limit of 3 accounts you can create from a device but I thought this was only iOS devices - maybe not.
    iCloud accounts can only be created using a valid email address, so I guess I'd start there to retrace what accounts you have.
    My Apple ID and iForgot.com may be useful sites for you.

  • Can I use my sprint iPhone 4S with another carrier if it's unlocked

    Can I use my sprint iPhone 4S with another carrier if it's unlocked. Sprint will only unlock it if it's international. they will not unlock it if I want to use the iphone4s with another USA carrier.  Why? I have paid for the phone and don't have a contract.  I wanted to switch the SIM card and use tmobile or another provider because I am very dissatisfied with sprint service. Lots of drop calls and texting takes 15 to reach the other person.  It is horrible,,,, I hate sprint!,

    Sorry, what others here have said is wrong, wrong, wrong. There is nothing about the hardware of the iPhone 4S that would prevent a Sprint 4S from being used on T-Mobile, or any GSM carrier, international or domestic. Nothing. Zero. Zip. Zilch. Nada. Each and every 4S is 100% hardware capable of doing both GSM and CDMA out of the box. The only impediment is that Sprint would have to authorize an unlock for you. This is something they simply refuse to do. If anyone at Sprint has told you that they can't unlock a 4S for domestic use with another carrier, they have lied to your face. This, by the way, is something they're doing with everyone who asks the question - just Google search "Sprint unlock iPhone 4S", and you'll see dozens of internet threads where people talk about being lied to by Sprint about this issue. The good news is that Sprint signed an agreement with the FCC regarding letting off-contract customers unlock their phones. The agreement takes effect in mid-March, and Sprint is dragging its feet until then. Once that deadline passes, if Sprint still hasn't agreed to unlock your phone, then they're in violation of the agreement, and you can and should report them to the FCC. I sure plan to. Then I'm going to switch carriers, to one that doesn't lie to me and keep fraudulent liens on my property.

  • Can i use REALTIME EQUALIZER of AUDIGY from another application? API of AUDIGY?? H

    Hi to all,?Can i use EQUALIZER of AUDIGY from another application? need SDK? Help me?For example, VIDEOLAN hasn't a REALTIME EQUALIZER.... i want REALTIME EQUALIZER under VIDEOLAN or other application... can i use API of SOUNDBLASTER AUDIGY from another application and how?

    ? Isn't the Audigy EQ working 'globally' (meaning, if it's enabled then it effects on all audio outputted through Audigy)?
    If you mean programming those API calls into your own software then you'll propably need to dig those functions by 'disassembling' the EQ code (it's maybe not very easy...).
    jutapaMessage Edited by jutapa on 05-08-200705:4 PM

  • Can I use T-Mobile contract free with another operator in another country?

    Can I use T-Mobile contract free with another operator in another country?

    No. You need an officially unlocked iPhone. Contract free DOES NOT equal officially unlocked. All contract free means is that you are not obligated to a contract, nothing more.
    In the US, only Apple sells officially unlocked iPhones.

  • HT201068 Can I use this to have someone in another state do my QuickBooks input?

    Can I use this to have someone in another state do my QuickBooks input?

    Hi examinernews,
    After reading your post it seems you would like the ability to allow a remote user to control your Mac. That can be done by using Screen Sharing, a feature of your Mac. I have linked to an article which explains how to use it:
    OS X Mavericks: Share your screen
    You can let others view your computer screen on their own Mac. While your screen is being shared, the user of the other Mac sees what’s on your screen and can open, move, and close files and windows, open apps, and even restart your Mac.
    Open Sharing preferences if it isn’t already open (choose Apple menu > System Preferences, then click Sharing).
    Select the Screen Sharing checkbox.If Remote Management is selected, you must deselect it before you can select Screen Sharing.
    To specify who can share your screen, select one of the following:            
    Option
    Description
    All users:
    Anyone with a user account on your Mac can share your screen.
    Only these users:
    Screen sharing is restricted to specific users.
    If you selected “Only these users,” click Add (+) at the bottom of the Users list, then do one of the following:
    Select a user from Users & Groups, which includes all the users of your Mac.
    Select a user from Network Users or Network Groups, which includes everyone on your network.
    To let others share your screen without having a user account on your Mac, click Computer Settings, then select one or both of the following:
    Option
    Description
    Anyone may request permission to control screen:
    When other computer users begin screen sharing your Mac, they can ask for permission instead of entering a user name and password.
    VNC viewers may control screen with password:
    Other users can share your screen using a VNC viewer app—on iPad or a Windows PC, for example—by entering the password you specify here.
    If this computer’s screen is shared only by other OS X users, turn off these options and add accounts for the other users.
    Thank you for contributing to Apple Support Communities.
    Take care,
    Bobby_D

  • I forgot my password and email Forgot your private cloud small my daughter and I can not use the device jewelery Is there another way to run the machine?

    I forgot my password and email Forgot your private cloud small my daughter and I can not use the device jewelery Is there another way to run the machine?
    I hope there is a solution to this problem note that I can not use the iPad now

    Your question makes no sense and I'm not sure if you typed very quickly and autocorrect went nuts on you, or if you are not a native English speaker and Google Translate didn't work properly. If you are saying that you forgot the passcode to unlock the iPad, follow the instructions here.
    Forgot passcode for your iPhone, iPad, or iPod touch, or your device is disabled - Apple Support

  • Can I use my iPad 3g service internationally - is international plan available?

    Anticipating some international travel in the near future.  Want to take my ipad, but not sure if I can use the 3g service internationally.  Generally, phones require a special plan for international use.  Is that available for the ipad or can I use it in europe on my existing 3 g plan - would use it for face time, email, and internet?

    Generally, yes. It's up to your service-provider and depends where you are going and which model you have.
    For example, if you have a Verizon model, it uses a CDMA-based mobile technology that is not widely used outside the US (except for parts of Asia). If you have an AT&T model, there's GSM service pretty much everywhere on the planet.
    That said, it's almost certainly cheaper to use a SIM (with the GSM models) from the country you are going to. You can get various prepaid ones.
    For example, AT&T charges $15/mo for 2GB of data service at home, but $20/mo for 50MB Internationally -- the international plan is more than 50x as expensive as domestic data service.
    A little research on the Internet will turn up some pre-paid data SIMs for your desitination that are compatible with a GSM-model iPad.

  • Can I use third party web services that communicate via http-post with webui builder?

    Hi, 
    I have 5 computers (services) that are controlled via http-post. 3 of these services are implemented as labview webservices, 1 is labview socket (with python http-wrapper) and the last one is implemented with c# (lighttpd + cgi). 
    Can I use webui builder to controll all of them? Or, what is the simplest change so I can use webui builder?
    What I would like to do, is to change the current javascript-UI to labview-webui. For the interfaces implemented with labview webservices, this is not a problem. For non-labview services, I don't know if it is even possible.
    br,
    Juha

    To add to Mike's answer, the only caveat is that the server needs an appropriate clientaccesspolicy.xml file at the root level (http://yourserver/clientaccesspolicy.xml), or a completely open crossdomain.xml file, for the editor and built apps to be able to communicate with it. There's a help topic which explains this in the context of LV web services, but it's true for Web UI Builder to be able to communicate with arbitrary web servers also.
    Since it sounds like you control all the web servers in question, it shouldn't be too difficult to get this file in place, though.

  • Can I use FaceTime with 3G service

    Can I use face time on ipad2 connecting with 3G?

    There are a couple of apps that do video calls on 3g.   One in particuplar called tango.  The quality is not very good on 3g, but that is pretty much what you should expect.  Both parties need the app installed.  Works on phones, and the pad.

  • How can I use footage from one project in another?

    The best format for saving your video from one project so that it can be used in another Premiere Elements project is DV-AVI. For hi-def video, the format is HDV.
    To save your video as a standard-definition DV-AVI, go to Share, Personal Computer and select the AVI output option with the DV preset. When you're ready to mix together these segments open a new project using the DV settings and assemble them on that timeline.
    To save your video as a high-definition M2T video, go to Share,  Personal Computer and select the MPEG output option with the 1440x1080 MPEG preset. When you're ready  to mix together these segments open a new project using the HDV settings  and assemble them on that timeline.

    The best format for saving your video from one project so that it can be used in another Premiere Elements project is DV-AVI. For hi-def video, the format is HDV.
    To save your video as a standard-definition DV-AVI, go to Share, Personal Computer and select the AVI output option with the DV preset. When you're ready to mix together these segments open a new project using the DV settings and assemble them on that timeline.
    To save your video as a high-definition M2T video, go to Share,  Personal Computer and select the MPEG output option with the 1440x1080 MPEG preset. When you're ready  to mix together these segments open a new project using the HDV settings  and assemble them on that timeline.

  • HT3354 how can i use one table for reference to another

    how can i use a table for a referance to another eg when i type a word in a cell, i will like it to match the word with another table then return the information in the cell i am using

    you can use vlookup() (or any of the lookup family of functions) to locate an item based on a key value:
    Here is an example of something you can do with two tables:
    The table on the right is title "Data" and stores a list of names with age and favorite color.
    The table on the left uses the value in the first column to lookup up information in the table Data
    in the table on the left:
    B2=IFERROR(A2&" is " & VLOOKUP(A2, Data :: A:D, 2, 0)&" years old and likes the color "& VLOOKUP(A2, Data :: A:D, 3, 0), "NOT FOUND")
    I know this look complicated.  so I'll break it up into smalled pieces:
    first the "&" is called the concatenate operator and joins two strings.  like this:
    a string is a set of characters between double quotes.
    so "string 1" & "string 2" becomes "string 1string2"  or "Sam " & "Jones" becomes "Sam Jones"
    you can use cell references instead of strings directly in which case the concatenation is performed on the contents of the cells.
    so if cell A1 contains "Hi " and the cell A2 contains "There"  then A1 & A2 will result in "Hi There"
    so you could add the formula
    A3=A1 & A2
    this is short hand for select cell A3 then type everything including the A3 so that A3 contains "=A1 & A2" (omit the double quote)
    OK.  So the formula I provided concatenates several items together:
    it concatenates A2, then the string " is " then a formula, then the string " years old and likes the color " then a formula
    the two formulas (highlighted in blue) perform a lookup of the value in cell A2 in columns A thru D of the table named "Data".  If if finds the value in cell A2 in the first column of the lookup range in the table Data (column A) then it returns the value from the same row but in the second or third column.
    all that is in a function calld iserror() to trap the condition where the calue you enter in A2 does not exist in the table Data:
    You will find the Numbers users guide and function reference helpful.  You can download then from Apple here:
    http://support.apple.com/manuals/#productivitysoftware

  • My daughter has a ipodtouch that we have set up now i need to set up a ipod shuffle how do i do this can i use the same account or start another one

    my  daughter has a ipod touch now i need to add a ipod shuffle i have no idea how to get started can i use the same account i can't even figure out how to sync it  HELP

    yes you can have multiple devices on one account just not in the same library before you sync it create a new library by:
    If you are using Windows, hold down the Shift key and from the Start menu and choose All Programs > iTunes > iTunes.
    Then add the songs you want
    THen yuo can sync sync it by plugging in the usb cord the computer then plug in the ipod to the cord that it came with

  • Can I use the same power charger in another country (South Africa) and just but a socket adapter?

    I am moving to South Africa from the US for a year and want to know if I can use the same power charger in South Africa and just but a socket adapter or do I need to get a new power charger for S.A.?
    This question was solved.
    View Solution.

    Hi,
    Nowadays laptop chargers can be used for normal electricity around the world (110V to 250V). All we need is a small plug adapter similar the the ones we use to travel overseas. Most electrical shops, travel agents and airports ... sell them.
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

Maybe you are looking for