Question about using the db DataSource

InitialContext ctx = new InitialContext();
DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/MySQLDB");
When I am calling the above code, is the DataSource going to be reused?
or it actually creating a new DataSource everytime?
Thanks.

If the code
InitialContext ctx = new InitialContext();
DataSource ds = (DataSource)ctx.lookup("java:comp/env/jdbc/MySQLDB");
entered inside the init method of Servlet or jsp . Data source can be reused again.
otherwise it is creater every time.

Similar Messages

  • Questions about using the Voice Memos app

    I'm currently an Android user, but will be getting an iPhone 6 soon. My most used app is the voice memos app on my Android phone. I have a couple questions about the iPhone's built-in voice memos app.
    -Am I able to transfer my voice memos from my Android phone to my iPhone, so my recordings from my Android app will show up in the iPhone's voice memos app?
    -When exporting voice memos from the iPhone to computer, are recordings in MP3 format? If not, what format are they in?
    -In your opinion, how is the recording quality of the voice memos app?

    You cannot import your Android voice memos to your iPhone's voice memo app.  You might be able to play the Android memos and have the iPhone pick up the audio and record it.
    Here is the writeup about sending voice memos from the iPhone to your computer (from the iPhone User Guide):
    App quality is excellent.

  • Question about using the JBIBRIDGE in MIDM project

    I am in the process of implementing the ESB based MIDM. I am trying to use a JBIBridge in the process. I have 3 different projects that need to the PersonEJB in their JCD's. The question is do I use the same JBIBridge External Application in each of the connection maps? Then do I deploy those JBIBridges to the same JBIBRIDGE External System and add each of thos 3 deployment Profiles to the same Composite Application? Or do you create three seperate JBIBridge External Applications, Systems and Composite Application?
    John Bidwell

    Regarding calls when roaming internationally, the following was copied from this link.
    http://www.wireless.att.com/learn/international/roaming/faq.jsp
    When your device is on:
    Calls that you do not answer that are routed to the AT&T voicemail system will be charged as an international roaming incoming call to your device.
    In addition, the foreign carrier's routing of that call to the AT&T voicemail system may generate an outgoing call charge from your device's location to the U.S.
    These charges apply even if the caller disconnects from the voicemail system without leaving a message.

  • Question about using the Captivate KO

    My colleague and I are trying to get our course published,
    using the Captivate KO. (We have tried inserting the Captivate quiz
    using ActiveX, but neither of us have any experience with ActiveX,
    so this seemed to be the better option.)
    We are trying to publish the Authorware file now to test it,
    and are running into problems. We have to publish our courses so
    they play over the web (for testing) and through Plateau LMS (for
    students to receive credit for the classes). The file location for
    our courses is a shared server.
    When we publish the file, from the web, we can't see the
    Captivate KO quiz at all, and from Plateau we get a Runtime error
    when the quiz begins to play. Basically, it is a failure across the
    board.
    We are thinking the problem lies in the literal/relative path
    question when we first upload the quiz into the KO. Does anyone
    have any idea what the right method for this would be?
    (Everything works when the file is on one of our hard drives,
    and that person publishes the file. It plays just fine for that
    person, from her hard drive. So, that's how we've narrowed it down
    to a path problem, when we move it to the server.)
    Thanks!
    SO

    Hello,
    You need to enter a valid Adobe ID, which consists of an e-mail address and your password. You can use the same ID as for the forum. The file to be reviewed will be stored on acrobat.com, reviewers get a link where they can download the file and the (free) Reviewer. It works fine.
    Lilybiri

  • A question about using the history tool after using the extraction tool in photoshop cs3..

    For example:
    http://www.layersmagazine.com/photoshop-...
    When I use the history tool, it erases the image instead. Whats up with that?

    G'day Chris
    I can't tell from the link exactly which tutorial you mean!
    If the original layer is a white background and the snapshot is set to this then the history tool will paint back white even if you then paste or drag an image onto the layer above this.
    You would have to take a seperate snapshot of your image layer and set this layer as the snapshot you want the history tool to use before you start working on it.
    One neat thing you can do is if you paint back some detail with the history brush you can immediately go to Edit > Fade and fine tune how much of the effect you want to apply.
    Hope this helps.
    regards
    John

  • Question about using the iPhone in Europe without making calls.

    I wanted to know if I could use my iPhone on a trip to Europe. I don't plan to use the phone to make any kind of calls, just to check and send e-mail and maybe use a messenger to communicate.
    Would I be charged in anyway? What steps could I take to avoid any.
    Thank you.

    Regarding calls when roaming internationally, the following was copied from this link.
    http://www.wireless.att.com/learn/international/roaming/faq.jsp
    When your device is on:
    Calls that you do not answer that are routed to the AT&T voicemail system will be charged as an international roaming incoming call to your device.
    In addition, the foreign carrier's routing of that call to the AT&T voicemail system may generate an outgoing call charge from your device's location to the U.S.
    These charges apply even if the caller disconnects from the voicemail system without leaving a message.

  • Question about using the Combo Box feature!

    I have a form that I am trying to create for our company that will allow our field nurses to select what they need and print it more effieciently.  The problem is that some of the selections are too long and I can't get the Combo box feature to allow them to be printed on multiple lines:
    I have spoken to my supervisor about redoing the form to look like this:
    But in order for us to meet state guidelines it has to be formated like the first because that is the state form given to us.  I want to be able to either:
    A) have the combo box multi-line auto text sized so it will get all the information into each box
    OR
    B) create text boxes at the end of the form that auto enteries the selected data from the second picture into boxes that look like the first picture.
    Is there any way to do either of these?

    A) No.
    B) Yes. Create a text box with the following code as the custom calculation
    script (assuming the name of the combo is "Combo Box1"):
    event.value = this.getField("Combo Box1").value;
    That way, when the user makes a selection in the combo-box, the value will
    also appear in the text box. Just make sure to make the text box read-only
    and set the combo-box to apply the selection immediately.

  • I have a question about using multiple ipads in our school.  Each of our teachers have a iPad and AppleTV in their classroom.  The issue is, with our classrooms so close in proximity to one another, is there a way to pair teacher

    I have a question about using multiple ipads in our school.  Each of our teachers have a iPad and AppleTV in their classroom.  The issue is, with our classrooms so close in proximity to one another, is there a way to pair teacher #1 iPad to its AppleTV without effecting/projecting onto the adjacent teachers #2 classroom AppleTV?

    Not as such.
    Give the AppleTV units unique names and also enable Airplay password in settings with unique passwords for each teacher.
    AC

  • Hi, I have quick question about use of USEBEAN tag in SP2. When I specify a scope of SESSION for the java bean, it does not keep the values that I set for variable in the bean persistent.Thanks,Sonny

     

    Make sure that your bean is implementing the serializable interface and that
    you are accessing the bean from the session with the same name.
    Bryan
    "Sandeep Suri" <[email protected]> wrote in message
    news:[email protected]..
    Hi, I have quick question about use of USEBEAN tag in SP2. When I
    specify a scope of SESSION for the java bean, it does not keep the
    values that I set for variable in the bean persistent.Thanks,Sonny
    Try our New Web Based Forum at http://softwareforum.sun.com
    Includes Access to our Product Knowledge Base!

  • Where Would be the best category to ask a question about using dashboard?

    Where Would be the best category to ask a question about using dashboard?

    However, don't ask it in this topic. Create a new topic for the question with a title describing that you are looking for Dashboard help.

  • Questions about using Bitlocker without TPM

    We currently use Bitlocker to encrypt our Windows 7 computers with TPM. Now we are looking at encrypting some Windows 7 computers without a TPM. I see how to change the group policy setting to allow Bitlocker without a TPM. I have looked at a lot of other
    threads and I have a few questions about how the Bitlocker without TPM works.
    1) I see a USB drive containing a key is required for Bitlocker configurations without a TPM, say the end user loses this USB drive, what are the recovery options for their computer? 
    This article seems to indicate that without the USB drive connected, you are unable to even access recovery options http://blogs.technet.com/b/hugofe/archive/2010/10/29/bitlocker-without-tpm.aspx
    We have recovery backed up to AD when Bitlocker is enabled, but how could we do this recovery on a computer on computer where it's USB is lost? Would we have to remove the HD itself and attach it to another computer to access?
    2) After enabling Bitlocker on a computer without a TPM and using the USB Drive for the key, is there a way to also add a PIN or password protection at bootup?

    Hi,
    Sorry for my dilatory reply, 
    Configuring a startup key is another method to enable a higher level of security with the TPM. The startup key is a key stored on a USB flash drive, and the USB flash drive must be inserted every time the computer starts. The startup key is used to provide
    another factor of authentication in conjunction with TPM authentication. To use a USB flash drive as a startup key, the USB flash drive must be formatted by using the NTFS, FAT, or FAT32 file system.
    You must have a startup key to use BitLocker on a non-TPM computer.
    From: http://technet.microsoft.com/de-de/library/ee449438(v=ws.10).aspx#BKMK_Key
    For more Q&A about BitLocker, you can refer to the link above.
    hope this is helpful.
    Roger Lu
    TechNet Community Support

  • Question about using new battery in old Powerbook

    I have a pre-intel Powerbook G4, and the battery is pretty much toast (lasts about 15 minutes now). I have ordered a new battery for it, and I have this question about using it:
    Am I smarter to keep the new strong battery out of the PB most days (as I usually work with it plugged in at home) and just pop it in when I know I will be out surfing on batteries? Or is it just as good living in my laptop 24/7 and only occasionally being called upon to do its job?
    Current bad Battery Information below:
    Battery Installed: Yes
    First low level warning: No
    Full Charge Capacity (mAh): 1144
    Remaining Capacity (mAh): 1115
    Amperage (mA): 0
    Voltage (mV): 12387
    Cycle Count: 281
    thanks folks, Shereen

    Hi, Shereen. Every Powerbook battery wants to be used — drained and then recharged — at least every couple of weeks. If you've always used your Powerbook on AC power nearly all the time, and not followed that pattern of discharging and recharging the battery every week or two, it's possible that your use habits have shortened the lifespan and prematurely diminished the capacity of your old battery. Of course it's also possible that your battery is merely old, as a battery's capacity also diminishes with age regardless of how it's used. You didn't say how old the battery is in years, so this may or may not be an issue. I mention it only because it can be an issue.
    For general information on handling a battery for the longest possible lifespan, see this article. My advice on the basis of that article and long experience reading these forums is that it would be OK to do as you propose, but I doubt that you'd derive any significant benefit from it. You would still want to be sure of putting the new battery through a charge/discharge cycle every week or two, even if you didn't have a reason to use the Powerbook away from home or your desk, because sitting unused outside the computer is just as bad for a battery as sitting unused inside it. And you should never remove the battery from your computer when it's completely or almost completely discharged and let it sit that way any longer than a day or two.
    Message was edited by: eww

  • Question about using TVARV in an ABAP program

    Hello gurus, Im sorry about the silly question.
    I have a question about using TVARV in an ABAP program.
    A program is presenting a problem and I think that in this code:
    SELECT SIGN OPTI LOW HIGH
      FROM TVARV
      INTO TABLE R_1_163431035_VELOCIDADE
      WHERE  NAME = '1_163431035_VELOCIDADE'
      AND    TYPE = 'S'.
      IF ZMM001-VELOCIDADE_B   IN R_1_163431035_VELOCIDADE AND
          ZOPERADORAS-OPERADORA = 'ABCD' AND
          ZMM001-MATERIAL       IN R_1_163431035_PRODUTO.
      ELSE.
      ENDIF.
    What happens is that the value "ZMM001-SPEED" B not exist in "R1_163431035_VELOCIDADE" but the program executes commands under the IF and not under the ELSE, as I imagine it would work. Is this correct ?
    I am new to ABAP programming, but I have a lot of XP in other programming languages ​​and this makes no sense to me.
    Anyone know where I can find some documentation of the use of "TVARV" in ABAP programs?
    I search the Internet if other programmers use TVARV this way, but found nothing, which leads me to think that was a quick and dirty solution that used here.
    If this is a bad way to program, what would be the best way?
    Regards
    Ronaldo.

    Hi Ronaldo,
    But in this case, the range is not empty, there are 17 records, in this way.:
    For the column "SING" all values ​​are "E"
    It means that the result is false if ZMM001-VELOCIDADE_B has the same value as one of the 17 records (E = exclude).
    For instance, if it has value 'C' and one of 17 records matches C, then the result is false.
    The "IF" with "IN" using "TVARV" as used in the program of the post above has the same behavior of a selection screen?
    Yes, the same behavior as the selection criterion to be exact. You can press the help key in the complex selection dialog for more info.
    I know it's a silly and very basic question, but other language that I used, only the SQL has the "IN" operator, but I think they work in different ways, so I would like to understand how it works in ABAP.
    Not silly ;-). Yes they work differently.
    More info here:
    - http://help.sap.com/saphelp_nw70/helpdata/en/9f/dba74635c111d1829f0000e829fbfe/frameset.htm
    - http://help.sap.com/saphelp_nw70/helpdata/en/9f/dba71f35c111d1829f0000e829fbfe/frameset.htm
    BR
    Sandra

  • Question about using Macbook in Vietnam.

    I have a question about using Macbook in Vietnam. I bought my mac here in the US, and I'm going to visit Vietnam, but I'm wondering if I can plug in the power directly into the wall or I have to need any convert power modem for my mac. The only thing I know that Vietnam use 220V so, can anyone help me?

    You may need a plug adaptor, but you don't need a power converter.
    (43828)

  • I have a question about using adobe CS files in CS6 edition

    I am a graphic artist . I have a question about using adobe CS files in CS6 edition. when I am gonna open thse adobe CS created files in CS6 Edition i get a color variation than i made with the CS version.Please give me an idea about this issue as soon as possible.If you need i can upload my problem as a screenshot to clearity

    donrulz,
    Are your Edit>Color Settings the same?
    Are you using spot colours, such as Pantone (there have been some changes in CMYK values with new colour books)?

Maybe you are looking for

  • Possible to view Keynote files / presentations as read only ?

    Keynote has been a wonderful study tool: I can tap the screen on my iPad2 or iPhone4, and the next bit of information appears (using the "builds" effects to make new info appear, eg: answers to questions). It's just like flash cards, but on an Apple

  • I want to view my apple ID

    <Edited by Host>

  • Retreiving accounting Doc number based on PO number

    Hi, In my abaprogram I need to retrieve the accounting document number for a given PO number which has been GR'd. I need to know the table which stores there details. I need acounting document number because I need to read the BKPF table for getting

  • About  Fixing of Exchange Rate

    hi i has purchase order with usd purchase order currency ,i used Fixing of Exchange Rate with this purchase order with fixing exchange rate for good receipt. as sap said "If you fix the exchange rate, the purchase order currency and the exchange rate

  • Inserting records using DB link

    Hi, I'm trying to insert a record using a db_link into a table which has EXTRAFIELDSTYPE column and I'm getting the error PLS-00453: remote operations not permitted on object tables or user-defined type columns. Is there anyway I can insert records i