How to acheive this?? Pls help

Our project has almost completed the development.
My client has requested to migrate the database.
we are migrating from db2 to db2e.
DB2e allows only one database connection.(limitation of db2e)
ie i have to close the current connection object before
getting the new Connection object.
I cannot have a Connection pooling also.
I have many links on my home page where every link
needs the connection object to do some database operations.
As i can have only one database connection, when i click
on the links repeatedly or when i play around with the links,
i get exceptions saying that i cannot have more than one connection
and results in a blank page or error page.
Currently my application has to handle this situation,
ie even if the user clicks continuosly on all the links or plays
around with the links it has take the last request into account
and display accordingly
I have a databaseConnection class which returns me a Connection object
To achieve the above funtionality i tried making the Connection object as static, so whenever i call the function to get the Connection object i check whether the current connection object is open or is not null.
if it is open i close and make it null and return the new connection object.
This seems to be working to some extent but not stable.
Iam not sure how does the server process when many requests are made and only one connection object is available at any point of the time.
Iam not sure how to get it working and stable.
One more solution i can think of is to declare a global variable
which tells us whether a request has been made.depending on this
variable i can restrict the user by clicking on the links reapeatedly.
but this is very tedious and also i have a time constraint.
any advice
tks in advance

just curious,couldn't you keep one connection open and through that connection run queries of different types?

Similar Messages

  • HT2074 i want ot sync my icontacts with blackberry phone . the bb desktop says my sync serices are turned off , how to resolve this . pls help

    pls help on how to send contacts from mac to blacberry phone

    Sadly Mac OS X 10.9 did indeed remove sync services.  You can either wait for http://www.markspace.com/ to improve their software to support it on its own, contacting them asking they do so, or if your machine is older than Mavericks boot off of the original operating system it came with when you need to sync data from contacts and calendars, or get an iCloud compatible device for syncing.

  • I ,have an iphone4 16gb ,brought in uk,it does not supports the india networks ,how to unlock it ,pls help me., I ,have an iphone4 16gb ,brought in uk,it does not supports the india networks ,how to unlock it ,pls help me.

    I ,have an iphone4 16gb ,brought in uk,it does not supports the india networks ,how to unlock it ,pls help me., I ,have an iphone4 16gb ,brought in uk,it does not supports the india networks ,how to unlock it ,pls help me.

    Have you asked your mobile phone operator to turn on roaming for you? and if you have you will need to turn on DATA ROAMING on the iPhone by going to SETTINGS > GENERAL > MOBILE DATA and turn on DATA ROAMING. You should then be able to see the various Indian Networks listed in SETTINGS > CARRIER and be able to make/receive calls.
    If you are in India and didn't ask for Roaming to be activated on your mobile account you're stuck until you return to the UK.
    OR
    If you have a 'locked' phone that is tied to the UK operator then you will need to find a phone shop that unlocks iPhones but beware this invalidates any Apple Warranty. If you are still in the UK then phone the mobile operator and ask then to unlock your iPhone which they usually do if its not in a contract with them or at the end of the contract period.
    Hope that helps a little, Andrew

  • I m not able to connect for the wifi  which i have used earlier ,i m getting an error as unable to join the network how to resolve this please help me

    i m not able to connect for the wifi  which i have used earlier ,i m getting an error as unable to join the network how to resolve this please help me

    We were able to log in this morning and all is working. You should be able to log in at any point today. Please let us know if you are having any other difficulties.

  • When I want to add items to the bookmarks toolbar, for example: -Zoom toolbar. The zoom Toolbar appears on the bookmarks toolbar, but it shows the favicons aswell the underlined text. I only want the favicons. How to do this, please help!!

    I want to add items to the bookmarks toolbar. for example: the Zoom Toolbar addon. This works, but not only the favicons appear on the bookmarks toolbar, aswell as the underlined text. How to avoid this?
    I only want the favicons from an addon to appear on the bookmarks toolbar, not with the underlined text. How to do this?
    This problem doesn't happen with any other toolbar. And this problem didn't happen with an earlier version of firefox. Please Help!
    Thanx, BassMann.

    If you only want the favicons and not the names of the bookmarks on the bookmarks toolbar, you can do that with the [https://addons.mozilla.org/en-US/firefox/addon/4072/ Smart Bookmarks Bar] add-on.

  • IMac takes forever to fully boot -- how to fix? PLS HELP!

    On my iMac, I often have to wait like 30 seconds to like 1.5 minutes between the time I press the power button and when I can start doing stuff. (I remember it used to be like 20 seconds always.) Usually I can't click on anything and the dock doesn't respond to mouse-overs while the toolbar on top takes its time to load up the spotlight, time, localization, and airport icons. (I don't use Airport btw, that's just for me to enable it if the Ethernet is unavailable.)
    I think the problem started not too long after I had first gotten the iMac (maybe a couple or a few months?). This is something I've come to expect with Windows, but not with Mac.
    At first I just tolerated the issue, but then I finally tried to solve the issue. I uninstalled VM software like Parallels and VMware Fusion, and I even uninstalled Office 2008 (and I think Adobe Design Premium CS3 also), with no luck. I tried going by suggestions from tech support: I ensured that there were no unnecessary startup items or services, that the desktop was clean, that disk permissions were fine, and that the problem wasn't specific to my login account. I even reset the PRAM. Nothing really solved the issue.
    What can I do? If I re-install Tiger will that solve the issue? If I upgrade to Leopard will that solve the issue? If I upgrade to 2GB RAM will that solve the issue? And if I do install Leopard or re-install Tiger, will I still have all my software and files safe?

    Check to see if you have any startup items you don't really need - these can cause a delay as to large numbers of fonts.
    Other things which hamper performance include:
    A very cluttered desktop. Store your work in progress and finished work in sub-folders inside the user > documents folder - as simple as this sounds it is a great resource saver
    Backup regularly. Work that you do not touch more that once a year should be backed up to CD, DVD or an external hard disk. It is pointless and expensive to keep this sort of work on your working volume if you access it infrequently. If your startup disk is ±75% full this will have serious consequences on the performance of your Mac.
    Make sure you have enough RAM. RAM is presently cheap so its worth considering.
    Carry out a “repair permissions” - it is a good idea to do this once a month. You can find an article on how to do this in my tips archive (see link below).
    Using “Cron” Scripts helps keep your Mac healthy by deleting cumbersome log files. Applications such as Onyx, Mac Janitor or MainMenu do this for you at the click of a button.
    Do not, repeat not, use Internet Explorer. This ancient browser has not been updated for years and will cause you no end of grief. Use Safari, Firefox, Opera or one of the other browsers available for Mac.

  • My Apple ID has been disabled how to slove it pls help!!!

    Dear Sir,
    My apple id has been disable how to solve it please help!!!
    Thanks,
    Dy Sovann

    Welcome to the user to User Technical Support Forum provided by Apple.
    If disabled for Security Reasons... See here  http://support.apple.com/kb/TS2446
    If not for Security reasons...
    To Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • How to acheive this output during the XML conversion ?.

    I am converting the data into XML. I am using Oracle8i.
    create table emp(empno number,
    ename varchar2(20),
    deptno number);
    insert into emp values(101,'Krish',10);
    insert into emp values(102,null, 10);
    insert into emp values(103,'Scott',20);
    commit;
    CREATE OR REPLACE PROCEDURE STP_TEST_XML AS
    v_context DBMS_XMLQUERY.CTXTYPE;
    v_document CLOB;
    v_error_code VARCHAR2(3) := 'OK';
    BEGIN
    v_context:= DBMS_XMLQUERY.NEWCONTEXT('SELECT * FROM EMP');
    DBMS_XMLQUERY.USENULLATTRIBUTEINDICATOR(v_context,TRUE);
    DBMS_XMLQUERY.SETROWSETTAG(v_context,'EMPIMPORT');
    DBMS_XMLQUERY.SETROWTAG(v_context,'EMP');
    v_document := DBMS_XMLQUERY.GETXML(v_context);
    DBMS_XMLQUERY.CLOSECONTEXT(V_context);
    PRINT_XML(v_document);
    END;
    CREATE OR REPLACE PROCEDURE print_xml(result IN OUT NOCOPY CLOB) is
    xmlstr varchar2(32767);
    line varchar2(2000);
    begin
    xmlstr := dbms_lob.SUBSTR(result,32767);
    loop
    exit when xmlstr is null;
    line := substr(xmlstr,1,instr(xmlstr,chr(10))-1);
    dbms_output.put_line('| '||line);
    xmlstr := substr(xmlstr,instr(xmlstr,chr(10))+1);
    end loop;
    end;
    The output is showing as below.
    <?xml version = '1.0'?>
    <EMPIMPORT>
    <EMP num="1">
    <EMPNO>101</EMPNO>
    <ENAME>Krish</ENAME>
    <DEPTNO>10</DEPTNO>
    </EMP>
    <EMP num="2">
    <EMPNO>102</EMPNO>
    <ENAME NULL="YES"/>
    <DEPTNO>10</DEPTNO>
    </EMP>
    <EMP num="3">
    <EMPNO>103</EMPNO>
    <ENAME>Scott</ENAME>
    <DEPTNO>20</DEPTNO>
    </EMP>
    </EMPIMPORT>
    But my requirement needs my output should be as below. Please let me know how to achieve this output.
    <?xml version = '1.0'?>
    <EMPIMPORT>
    <EMP num="1">
    <EMPNO>101</EMPNO>
    <ENAME>Krish</ENAME>
    <DEPTNO>10</DEPTNO>
    </EMP>
    <EMP num="2">
    <EMPNO>102</EMPNO>
    <ENAME/>
    <DEPTNO>10</DEPTNO>
    </EMP>
    <EMP num="3">
    <EMPNO>103</EMPNO>
    <ENAME>Scott</ENAME>
    <DEPTNO>20</DEPTNO>
    </EMP>
    </EMPIMPORT>

    can you please tell me how to acheive 1,2,3  instead of the chars.
    Also if I use virtual characteristic can I able to access the query structure in the user exit like the restricted key figures etc or just the records how they appear in the cube.
    Thank you guys for the quick response.

  • How to acheive this???? J2EE gurus

    Hi,
    I have servletA in one serverA and servletB in ServerB.When a request is made to servletA it should call the ServletB to get the response.
    Basically they should be chained.
    I understand that to forwarding a request to a servlet which is in a different context we have to use redirect instead of forward.if we user redirect the server issses a new request.
    How can i acheive this???
    Thanks in advance.

    The Client is imp bcos it is the one which receives
    the response.
    I would like to one thing.
    if PDA makes a request to ServletA which is on
    ServerA and the ServletA makes an HttpURLConnection
    and contacts ServletB which is on ServletB, how can i
    inlcude the response sent by servletB into ServletA
    response????
    ServletB is writing everything into response object.
    Thanks
    You could use a method like this. Though you might have to modify ot as per your requirements
    private void returnSuccessfullNotifyHttpResponse(HttpServletRequest request, HttpServletResponse response, String pushId)
                                             throws ServletException, IOException {
        String responseString =null;
        PrintWriter out=null;
        String replyTime = null;
        Calendar  date = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
        String year,month,day,hour,minute,second;
        year=Integer.toString(date.get(Calendar.YEAR));
        month=Integer.toString(date.get(Calendar.MONTH) + 1 );
        if (month.length() == 1)
          month = "0" + month;
        day=Integer.toString(date.get(Calendar.DAY_OF_MONTH));
        if (day.length() == 1)
          day = "0" + day;
        hour=Integer.toString(date.get(Calendar.HOUR_OF_DAY));
        if (hour.length() == 1)
          hour = "0" + hour;
        minute=Integer.toString(date.get(Calendar.MINUTE));
        if (minute.length() == 1)
          minute = "0" + minute;
        second=Integer.toString(date.get(Calendar.SECOND));
        if (second.length() == 1)
          second = "0" + second;
        replyTime = year+ "-" + month + "-" + day+ "T" + hour+ ":" + minute + ":" + second + "Z";
        responseString=
                XML_HEADER +
                   PAP_STAG + CRLF +
                     PUSH_RESPONSE_STAG +
                       PUSH_ID + pushId + CLOSE_QUOTE + SPACE +
                      SENDER_ADDRESS + "http://" + request.getServerName() + ":"+  request.getServerPort() + request.getServletPath() + CLOSE_QUOTE + SPACE +
                      SENDER_NAME + SPACE +
                      REPLY_TIME + replyTime + CLOSE_QUOTE + CLOSE_TAG + CRLF +
                      RESPONSE_RESULT_STAG +
                        CODE + "1001" + CLOSE_QUOTE +
                        DESC + "The request accepted for processing" + CLOSE_QUOTE + CLOSE_TAG +
                      RESPONSE_RESULT_ETAG + CRLF +
                    PUSH_RESPONSE_ETAG + CRLF +
                  PAP_ETAG;
        response.setContentType("application/xml");
        //response.setHeader("Connection", "keep-alive");
        response.setStatus(response.SC_ACCEPTED);
        response.setContentLength(responseString.length());
        out = new PrintWriter (response.getOutputStream());
        out.print(responseString);
        out.close();

  • When I'm trying to download any app it disappears after 5-10 secs of waiting I would like to know how to fix this any help plz

    K when I'm trying download an app called gun bros or any other app is disappears. Lately my iPad has been a bit buggy and it's not jail broken I do need some help as I've looked it up on the Internet but no luck so I came pls help me out.
    Ps it's on 4.2.1 quick isn't listed for the operating system so I put it up here.

    Have you got age restrictions set in Settings > General > Restrictions so that the app is being hidden when it's downloaded ?

  • How to acheive this?

    Hi,
    I have a table X
    Date columnA columnB
    02/26/07 10 1
    02/28/07 1
    03/01/07 5 2
    03/06/07 10 100
    required out put
    Date columnA columnB
    02/26/07 10 1
    02/28/07 10 2
    03/01/07 15 4
    03/06/07 25 104
    Can some one guide me how to achieve this!

    SQL> create table x
      2  as
      3  select date '2007-02-26' mydate, 10 columna, 1 columnb from dual union all
      4  select date '2007-02-28', null, 1 from dual union all
      5  select date '2007-03-01', 5, 2 from dual union all
      6  select date '2007-03-06', 10, 100 from dual
      7  /
    Tabel is aangemaakt.
    SQL> select mydate
      2       , sum(columna) over (order by mydate) columna
      3       , sum(columnb) over (order by mydate) columnb
      4    from x
      5   order by mydate
      6  /
    MYDATE                 COLUMNA    COLUMNB
    26-02-2007 00:00:00         10          1
    28-02-2007 00:00:00         10          2
    01-03-2007 00:00:00         15          4
    06-03-2007 00:00:00         25        104
    4 rijen zijn geselecteerd.Regards,
    Rob.

  • How to run ? pls help me

    hi
    i have downloaded a J2ME application , i got the JAD filr and JAR file.
    Pls let me know how can i run the same...
    nisam

    If you have WTK installed, click on Start MIDP Application.
    With Nokia Developer Suite you've to click in left menu on Start Emulators, choose Application to run and click on Emulate.
    With Motorola SDK click on Motorola Launchpad, select 'Run from Jar', click on Browse and and choose JAR, and click Launch button.
    Well, I hope this helps :)
    regards
    Leszek

  • How to acheive this scnerio in PL/SQl using collections

    Hi All,
    In my apllication we are handling two types of procedures which runs based on the jobs.
    Due to some problem few records where got missed in prouduction.
    We have tried to run this jobs manaually one by one and it is taking time to execute..
    I have got a suggetsion from my senior to do in a collection and run this packages at a time..
    Here is my exact scenerio, can you please help me out to implemnet in collections..
    Steps:
    Populate the missing records namely ordered, event sequence, Start date, end date, region in to plsql table/collection. ( Hard-coded since this will run the code
    for a date which will take less time and take less record).
    looping the plsqltable/collection for missing records
    Running the procedure p_Daily with startdate and end date parameter
    -- if the above executed successfully we need to execute second procedure i.e p_Region procedure by checking records in f_daily_report exist/relevant table
    (Id and sequence).
    Running the procedure p_region with start date and region id ( checking whether id and sequece is exist f_daily_report table).
    end loop
    The above steps which i have explained needs to achievd thru collections, can anybody helps me out on this.
    Note:
    1. All the missing jobs wil fal under differnt date rane groups.
    2. For second job i.e p_region i have mentioned that it will run based on start date and region id..This job will run on three differnt region id's..We can find the
    region id based on by joining f_region and d_region table. It seems that these misisng records belongs to all three regions
    Hope u all understand my scenrio. can you please help me out..
    Thanks in advance,
    Anoo..

    Anoo wrote:
    Hi,
    Hope you have not clear my question..The reason is i want to know how we can achieve my problem in collection
    rather than select statement.. Even though if we can get in simple statement is not advisible in my case..That is the reason why i was looking collections...
    Rather than providing data is it possible to how we can proceed in collections.That's like saying you want to write poor code that performs slowly rather than fast and performant code.
    Without clear explanations and examples of data and output, there doesn't appear to be a valid reason for using collections. The reason you're not getting many responses on your thread is because you're not explaining clearly what is required with examples. Please read {message:id=9360002} for an idea of what people need from you in order to help you.

  • How to solve this: PLS-00989 Cursor Variable in record, object, ....

    Please help me.
    With this cursor I want to retrieve data:
    cursor c_tmpMenus IS SELECT
    sClaveMenuGrupo,
    smenuFontH,
    smenuFontL,
    smenuBorder,
    smenuBorderC,
    smenuLowBg,
    smenuHighBg,
    CURSOR (SELECT sOpcion as sOpcion FROM cmtbl_menugrupo mg
    WHERE mg.sClaveMenuGrupo = mu.sClaveMenuGrupo) tmpGrupo
    FROM cmtbl_menuUsuario mu;
    and then declare record to get the data:
    rgc_tmpMenus c_tmpMenus%ROWTYPE;
    and when I declared the record variable is showing the error.
    What kind of data is retrieving the cursor that I can't catch with the record variable?
    I'm using oracle XE 10.2.0

    The original query is this:
    select sMenu = sClaveMenuGrupo ,
    smenuFontH = isnull( smenuFontH , @FontH),
    smenuFontL = isnull(smenuFontL , @FontL ),
    smenuBorder = isnull(smenuBorder, @Border),
    smenuBorderC = isnull(smenuBorderC, @BorderC),
    smenuLowBg = isnull(smenuLowBg ,@LowBg),
    smenuHighBg = isnull(smenuHighBg, @HighBg ) ,
    sOpcion = isnull((select mg.sOpcion from cmtbl_menugrupo mg where
    mg.sClaveMenuGrupo=cmtbl_menuUsuario.sClaveMenuGrupo),'Nada')
    into #tmpMenus
    from cmtbl_menuUsuario           
    where sUsuario = @sUSUARIO or sUsuario = @Perfil
    The data in table cmtbl_menuUsuario are:
    sClaveMenuGrupo sUSUARIO smenuFontH smenuFontL smenuBorder smenuBorderC smenuLowBg smenuHighBg
    credco GerPagos #000000 #ffffff 1 #ffffff #5279c6 #a1c3e2
    credac JUMP #000000 #ffffff 1 #ffffff #5279c6 #a1c3e2
    credco Dealer #000000 #ffffff 1 #ffffff #5279c6 #a1c3e2
    credan JUMP #000000 #ffffff 1 #ffffff #5279c6 #a1c3e2
    credco Cobranzas #000000 #ffffff 1 #ffffff #5279c6 #a1c3e2
    credat JUMP #000000 #ffffff 1 #ffffff #5279c6 #a1c3e2
    credju CobJudicial #000000 #ffffff 1 #ffffff #5279c6 #a1c3e2
    credca JUMP #000000 #ffffff 1 #ffffff #5279c6 #a1c3e2
    credsa prueba NULL NULL NULL NULL NULL NULL
    credco CREDISYS #000000 #ffffff 1 #ffffff #5279c6 #a1c3e2
    prueba CREDISYS #111111 #AAAAAA 1 #1a2b3c #auuu #otro
    credso JUMP #000000 #ffffff 1 #ffffff #5279c6 #a1c3e2
    credus JUMP #000000 #ffffff 1 #ffffff #5279c6 #a1c3e2
    In table cmtbl_menuGrupo:
    sClaveMenuGrupo sDescripcion sOpcion
    credac Credisystem Aclaraciones ac
    credan Credisystem Analisis BNC an
    credat Credisystem Atencion a Clientes at
    credca Credisystem Cartera ca
    credco Credisystem Cobranza co
    credioca Cartera CrediOp Cajera CA
    CREDITO MIGRACIÓN or
    credju Credisystem Cobranza co
    credso Credisystem Solicitudes so
    credus Credisystem Parametros us
    prueba PRUEBA NULL
    The result it'll be only two rows:
    sMenu smenuFontH smenuFontL smenuBorder smenuBorderC smenuLowBg smenuHighBg sOpcion
    credco #000000 #ffffff 1 #ffffff #5279c6 #a1c3e2 co
    prueba #111111 #AAAAAA 1 #1a2b3c #auuu #otro Nada
    How can I get the same result with plsql?

  • HT1414 my iphone4 some imp notes has been lost. how to retrieve them. pls help anyone !!!

    Dear All,
    in my iphone4, i have some very imp notes. but now it not seems there. it lost somewhere. i have regularly maintain backup while i used everytime itunes. now i dont know how to retrieve my data back ...kindly help !!!!!!!!

    You can recover Your music but not with original names.
    1. Go to Your iPod hard disk
    2. You must to see hidden files (if you don't see them go to in system explorer to Tools > Folder Options > View > and mark Show Hidden Files)
    3. Go to folder named iPod_Control
    4. Copy folder Music - this is Your music but not with originally names
    I'm must to say sorry - my English is not very good - I'm still learning
    I hope it helps

Maybe you are looking for

  • Using attribute as a set of data and parsing this data

    Hi everyone, I present below a (little) challenge with the use of attributes in XQuery. Consider the following XML document: <showroom> <car id="1"> <name>Clio</name> <family>Renault</family> </car> <car id="n"> <name>Q5</name> <family>Audi</family>

  • Issue when printing to fax

    Hi, Recently I encountered an issue when I try to print a report with 2 or more pages to the Microsoft Shared Fax Driver. If there's only one page I can view the fax's image atachment, but if there are more pages, then the image file seems corrupted

  • Editing a message, splitting into several parts, adding attachment to a part

    I feel stupid. I just started a discussion with the intention of splitting my post into several parts, but it seems that I can't do that unless I "comment" on my first post. This would be OK, except that I cannot seem to be able to insert anything to

  • Phone wont connect to bluetooth speakers

    I am trying to connect my iPhone 4S with IOS 7 to my bluetooth speakers (HMDX Jam Classic). Everytime I try and connect it, it picks it up, but then says "won't pair," saying the device is too far away and it took too long, though its next to me. I t

  • Using Find/Change in CS2

    Is it possible to search for a single number (such as 1 or 2) without the results including multiple numbers (like 12 or 123 or 1234)?