Is there any practical reason to use DB helper class?

Is there any practical reason to use database helper class ( e.g. database.bookDB in Duke's bookstore)in servlet design? What if I setup a DB connection for every servlet?

to ken_robinson
I am currently setup DataSurece in servlet init().Usually (I know WebLogic is this way), if you configure the DataSource through the app server's configuration app, it is available to all applications.
The most efficient way to look up the DataSource in a particular app is have a ServletContextListener lookup the DataSource from JNDI and set it in the Context as an Attribute. Each servlet would then, in it's init() method, get the DataSource from the ServletContext (faster than using JNDI for each Servlet. The ServletContextListener requires the container you are running in support the 2.3 spec. If it does not, simply use a startup servlet (servlet that is loaded when the app is loaded) and do the same thing.

Similar Messages

  • Are there any possible reason RMAN generates some corrupt archive log files

    Dear all,
    Are there any possible reason RMAN generates some corrupt archive log files?
    Best Regards,
    Amy

    Because I try to perform daily backup at lunch time and found out it takes more than 1 hour had no any progress. Normally we take around 40 minus. The following is the log file:
    RMAN> Run
    2> {
    3> CONFIGURE CONTROLFILE AUTOBACKUP ON;
    4> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/u03/db/backup/RMAN/%F.bck';
    5> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;
    6> allocate channel ch1 type disk format '/u03/db/backup/RMAN/backup_%d_%t_%s_%p_%U.bck';
    7> backup incremental level 1 cumulative database plus archivelog delete all input;
    8> backup current controlfile;
    9> backup spfile;
    10> release channel ch1;
    11> }
    12> allocate channel for maintenance type disk;
    13> delete noprompt obsolete;
    14> delete noprompt archivelog all backed up 2 times to disk;
    15>
    16>
    using target database controlfile instead of recovery catalog
    old RMAN configuration parameters:
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    new RMAN configuration parameters:
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    new RMAN configuration parameters are successfully stored
    old RMAN configuration parameters:
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/u03/db/backup/RMAN/%F.bck';
    new RMAN configuration parameters:
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/u03/db/backup/RMAN/%F.bck';
    new RMAN configuration parameters are successfully stored
    old RMAN configuration parameters:
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;
    new RMAN configuration parameters:
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;
    new RMAN configuration parameters are successfully stored
    allocated channel: ch1
    channel ch1: sid=99 devtype=DISK
    Starting backup at 31-MAR-09
    current log archived
    After that I go to archive log directory "/u02/oracle/uat/uatdb/9.2.0/dbs" and use ls -lt command to see how many archive logs and my screen just hang. After we found out that we cannot use ls -lt command to read arch1_171.dbf
    archive log, the rest of archive logs able to use ls -lt command.
    We cannot delete this file as well. We shutdown database abort and perform check disk...... and fix the disk error and then open database again. Everything seems back to normal and we can use ls -lt command to read arch1_171.dbf.
    The strange problem is we have the same problem in Development and Production..... one ore more archive logs seems to be corrupted under the same directories /u02/oracle/uat/uatdb/9.2.0/dbs.
    Does anyone encounter the same problem?
    Amy

  • I want to buy a new apple tv but it used hdmi cables and my house is only wired for analog.  Is there any way I can use the apple tv on analog cables?

    I want to buy a new apple tv but it used hdmi cables and my house is only wired for analog.  Is there any way I can use the apple tv on analog cables?

    Welcome to the Apple Community.
    It's do-able, but I don't think it's a great idea.
    DVI
    Some users with DVI have managed to get their TV's to work with DVI-HDMI cables. DVI carries no audio, so alternative connections need to be explored to enable audio. DVI doesn't necessarily support HDCP as well as other standards used by HDMI (which may or may not be an issue)
    Analogue
    There are hardware converters that will convert HDMI to various other types of output, however there are some issues with doing so that you should be aware of.
    HDCP
    HDCP compliant converters will not allow you to watch HDCP protected content such as that from the iTunes Store. Non compliant converters exist but we cannot discuss them under the Terms of Use for these communities.
    Resolution and aspect ratio
    I'm not aware of any converters that will scale the output from the Apple TV, any TV or projector which is used will need to be widescreen and support resolutions of 720p (Apple TV 2), 720p/1080p (Apple TV 3)
    DAC
    DAC (Example Only - Not a recommendation or suggestion that this is suitable in your circumstances)

  • Is there any way I could use my own apple ID to buy in-app purchases even if I used my aun'ts apple ID to install the app?

    I have an Apple Account registered in the U.S & no credit card linked (since im under 18). I always use my Aunt's account because I buy in-app purchases and other stuffs in the app store, I also used her account to download the app I play but she changed her password and gifted me a gift card to redeem in my own apple ID...
    But whenever I wanted to buy something from the game it asks for her password and not mine, I changed the logged in apple account in the iTunes & Apple Store hoping not to re-install the app because I achieved so much in the game..
    Is there any way I could use my own apple ID to buy in-app purchases even if I used my aun'ts apple ID to install the app?

    No, all apps are tied to the account that downloaded them, so only that account will be able to make in-app purchases within them - you would need to delete the game (which would also delete your progress/settings in it) and buy/download it with your account to be able to make in-app purchases with your own account.

  • I don't have a wireless keyboard or mouse for my 2007 iMac, is there any way that can use remote desktop and access it from my 2010mbp.

    i don't have a wireless keyboard or mouse for my 2007 iMac, is there any way that can use remote desktop and access it from my 2010mbp

    Hi champrider,
    You can use an application such as Apple Remote Desktop to control your iMac remotely. See this article -
    OS X Mavericks: Allow access using Apple Remote Desktop
    This help page will provide you with some other useful resources for Apple Remote Desktop -
    Remote Desktop Help
    Thanks for using Apple Support Communities.
    Best,
    Brett L 

  • I have Acrobat 9.5 and when I try to create pdf from scanner, it displays an error "Adobe acrobat has stopped working". Is there any way I can use this functionality?

    I have Acrobat 9.5 and when I try to create>pdf from scanner, it displays an error "Adobe acrobat has stopped working". Is there any way I can use this functionality?

    Provide you have Acrobat 9 installed in an OS for which Acrobat 9 is compatible then you can use the functionality.
    As well, you need a scanner connected, powered up, and the software installed. Acrobat 9 "prefers" TWAIN drivers.
    Always visit the scanner vendor's site and download - install the latest greatest software.
    n.b., The Acrobat 9.x product family passed into "End of Support" mid-year 2013.
    As well the Acrobat 9.x product family is not compatible with contemporary OSs.
    Be well...

  • Is there any limitation of memory uses for apps in iPad2 or iPad3 ?

    Hi,
       Is there any limitation of memory uses for apps in ipad2 or ipad3 .For example an application can use 10% or 20% of available memory , is there anything like that or the apps can use the total available memory or like 90% of it ?
    I want to know about the memory distribution to the apps in ios .
    Would anyone suggest a right way ?
    Thanks

    iOS manages all memory. You should test your app in Instruments to be sure it is playing nice.
    See Advanced Memory Management Programming Guide

  • Is there any (easy) way to use Pages to edit documents imported via iFiles?

    Is there any (easy) way to use Pages to edit documents imported via iFiles?

    That is a question better answered by the developer:
    http://www.ifilesapp.com/
    Peter

  • I usually have annexes in my outlook tasks, but I can´t see them in the apps I downloaded, is there any app I can use yo do this?

    I usually have annexes in my outlook tasks, but I can´t see them in the apps I downloaded, is there any app I can use yo do this?

    With the iPad connected to the computer, while iTunes is running, click on the iPad name on the left side under devices. Click on the Movies tab and look for Movie Rentals. You want to "Move" the films to the iPad.

  • I only have the trial version of adobe after effects cc but is there any way I can use plugins on it?

    I only have the trial version of adobe after effects cc but is there any way I can use plugins on it? Specifically trapcode particular cc

    The trial version is in no way different from the full version, except that it only works for 30 days.

  • Is there any program i can use to batch delete the inbound delivery ?

    Hello, everyone.
        Is there any program i can use to batch delete the inbound delivery ? Thanks.
    Xinzhou gao.

    Hi,
       VL66 is used for deleting temporary inbound deliveries that have been marked with the deletion flag in the database, the temporary deliveries should have the deletion flag selected in the database, but i want to delete the normal inbound delivery without deletion flag now, is there any  other solutions? Thanks.
    Xinzhou gao.

  • Are there any libraries can be used to generate Type 1 font postscript file

    I am trying to create a Type 1 font postscript file. But I found it is hard to find the library to generate the Type 1 font postscript file. I just found a library named iText which can create the Type 1 font PDF file.
    Are there any libraries can be used to generate Type 1 font postscript file?
    Thanks!

    I don't see much benefit with the current ODI adaptors for planning if it is an EPMA type planning application.
    They have been specifically designed to work with classic planning applications.
    It certainly is possible to load into EPMA interface tables using ODI though there are no direct adaptors and it takes quite a bit of effect to get them into the correct format.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Is there any way we can use our macbook to see Lindon Olympics without pay?

    Is there any way we can use our macbook to see Lindon Olympics without pay?

    If you use the LiveSDK to authenticate the user and specify the wl.signin scope, when the user signs into your app and provides consent to single sign-in when they can go to any Microsoft Account supported app or website they will not have to enter their
    credentials.  The wl.signin scope enables single sign-in behavior.

  • Is there any advantage to use database helper class

    Is there any advantage to use database helper class ( e.g. database.bookDB in Duke's bookstore)in servlet design? What if I setup a DB connection for every servlet?

    If there is not much relation between servlets.For example one servlet working on authentication againist user name/password in database another one work on searching book by keywords?
    and if we want to have servlets written by difference programmers?

  • Are there any know issues with using multiple (2) apple tv's in the same household??

    I'm thinking of getting a second Apple TV. Are there any known issues with using multiple (2) apple tv's in the same household? Thank you in advance.

    No, shouldn't have any problems

Maybe you are looking for

  • Artisteer Runs slowly in Dreamweaver - help required

    Hi I recently purchased a html template builder called Artisteer. As a Dreamweaver user of some years I wanted to use this tool to speed up the design of simple html websites whilst preserving my Dreamweaver workflow. In short I want to take Artistee

  • No sound with DVI

    Set up ATV today...great picture, no sound. Old SONY HDTV, had to go from HDMI to DVI. What do I need to do to get sound? Can I somehow hook up through my Motorola TWcable box? Would wireless speakers work? Not looking for a new TV. Thanks for any in

  • IPhone calendar not syncing to iCal or MobileMe

    Using Lion and the latest software version on my iPhone:  syncing iCal to MobileMe works in either direction. However, when a calendar event is typed on my iPhone it does not sync to anything on my iMac.  Does anyone know of a solution?

  • Using Oracle as a resource allocation tool

    Does anyone have any experience of using HRMS to assist in resource allocation etc? (storing skills data and matching it against role profiles etc)

  • Abap routing in infopackage data selection

    Hi guys I'm using an ABAP routin for the Data selection in my infopackage. I want to fetch all the records which is having value Less than 'IN14' for company code.I have modifuied the l_t_range as shown           l_t_range-sign = 'I'.           l_t_r