How to run concurrent program one after another

hi,
i have three concurrent program which are inter linked. how to set to run the concurrent program one after the another, ie.. not to run simultaneously.
regards
Yesukannan

Hi Yesukannan,
We need to call the wait for request in between the calling programs...
Example:
Package Pack1
Procedure P1 ( ... )
Procedure P2 ( ... )
Procedure P3 ( ... )
Procedure call Concurrent
call P1 -- Capture the request id here
wait for request -- send the above request id to this procedure.
call P2 -- Capture the request id here
wait for request -- send the above request id to this procedure.
call P3
end Package Pack1
Regards
JA..

Similar Messages

  • How do I run mutiple tasks one after another after each one finishes?

    Ok so I have a loop like this:
    for(int i = 0;i < this.totalItems();i++){
       model.setCurrentPhoto(i+1);
       messagebox("current photo: "+model.getCurrentPhoto());
       model.setWaiting(this.totalItems()-model.getUploaded());
       model.setProcPhoto(this.getfile(i));
       task = new Task();
       task.addPropertyChangeListener(this);
       task.execute();
      ///while( !task.isDone() == true ){} // HAHA>>> made this attempt...didn't work out to well...lol
    }and this loop may instigate one task creation (easy and works now) OR it could loop twice in which case the tasks just collide and my progress bar ( in the other part of the application ) is ...uhh...for lack of a better word...FUBAR!
    So here is my nice and easy question (for all you geniuses out there), how can I make these tasks go one after the other...I am not completely hopless cause my attempts (though pathetic. trust me..i know :) would be something like:
    taskwait() // but here what will it wait for?
    TaskQueue queue = new TaskQueue;// use this??
    Thanks - I am so lost...this will complete my program when I get this working...help me out please and thank you,
    Adam

    alright so this is what i did (still gotta question :)
    // This is how I defined it
    private Task[] task;
    // Then this in the constructor
    task = new Task[TOTAL_IMAGES]; // max of TOTAL_IMAGES (which is 10) for tasks also
    // This is somewhere in the program
    for(int i = 0;i < this.totalItems();i++){
        model.setCurrentPhoto(i+1);
        model.setWaiting(this.totalItems()-model.getCurrentPhoto());
        model.setProcPhoto(this.getfile(i));
        // Create the task and execute
        task[i] = new Task();
        task.addPropertyChangeListener(this);
    task[i].execute();
    I gotta have something at the end or at the start of the loop stop the tasks for starting and sort of put them on a queue.  How do I do that?
    EDIT: SORRY for the double post...dunno how i was that stupid not to edit the last point...duuuhhhh...lol
    Adam
    Edited by: ScottyAdam on Dec 19, 2009 1:58 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Run concurrent program one by one based on different parameter values.

    The PO report runs as a concurrent program, but this should launch another concurrent program to run after its execution based on its PO Number as parameter to the next concurrent program.
    while running this PO report, it should search the email id of vendor and sends the output of that report to respective vendors.
    Any help would be appreciated.
    Needed very urgently.
    Thanks,
    Atul
    Edited by: Atul on Jul 11, 2011 4:10 PM

    Hi Hussein,
    Thanks a lot for ur kind help.
    After getting through the many problems and errors, Now I am able to send an email with attachment :)
    But the thing is that, now i want to run PO report which will capture the approved PO's for the sysdate.
    So I will call this (PO Report) sub concurrent prog in my pl sql procedure(which is main concurrent program).
    when i will call the pl sql procedure that procedure should shoot an email of approved PO's onto the respective vendor's email address.
    So if on a day I am getting Ten approved PO's then it should send an email with PO Report's output as an attachment to the respective vendor email id
    So can u please tell me how to go about it.
    And how to call vendor email id's in "UTL_MAIL.send_attach_varchar2".
    Thanks,
    Atul

  • How to run concurrent program from a menu

    Hello, I have a responsibility menu and want to enable the user to run a concurrent request by clicking on a menu function. Say I have a prompt called "Payslip Report", clicking on it will now run a concurrent program called "Payslip Report" but the user will now have to enter the parameters for the report.
    How do I achieve this?

    Hi
    You can achieve this defining a new function for the standard submissions form with parameters to specifically launch the payslip report, and even specify values for its parameters. Information can be found on System Administrator Guide under the "Customizing the Submit Requests Window" topic. The steps would be:
    - Create a new function using the Standard Request Submission Form (FNDSRS)
    Give it a meaningful name such as Launch Payslip Report, specify form as type and the user form name of the FNDSRS form
    Use the following parameters, specifying as values the short name of the payslip report and the application it belongs to:
    CONCURRENT_PROGRAM_NAME=PAYSLREP PROGRAM_APPL_SHORT_NAME=PAY
    - Use your new function in Your menu and assign the prompt "Payslip Report"

  • Run Jobs One After Another

    I know this is possible, I'm not sure how to go about it using Oracle's Scheduler. I simply want to create a special "queue" that I can submit jobs to which will run one after another. After they run, then then are gone. There many be no jobs at anyone time, and then at other times I may submit 10 jobs to the queue. Currently when I submit jobs they all run parrallel, this is not what I want. I guess I don't understand why Oracle calls it a Job Queue when all my jobs run in parrallel and not in a queue as the name implies.
    This is not say that I don't have other jobs which I would not want to send to this "queue". In other cases I would just want to submit the job and let it run right away and not wait on anything.
    I'm currently using the DBMS_JOB package, which I'm pretty sure won't let me do what I want.
    Any help would be greatly appreciated.
    Thanks,
    Joe

    Here is and example that creates Resource Manager objects and
    two job classes that will permit 1 and 3 jobs to
    run in parallel. Note this will work in 11R1 and 10.2.4
    Assumes user user scott/tiger exists.
    --  Remove existing scheduler objects, jobs and classes
    CONNECT /  as sysdba
    BEGIN
       DBMS_SCHEDULER.DROP_JOB_CLASS(
          JOB_CLASS_NAME => 'JOBQ_WIDTH_1_CLASS'
    END;
    BEGIN
       DBMS_SCHEDULER.DROP_JOB_CLASS(
          JOB_CLASS_NAME => 'JOBQ_WIDTH_3_CLASS'
    END;
    BEGIN
      FOR I IN 1..30 LOOP
      BEGIN
        SYS.DBMS_SCHEDULER.DROP_JOB(JOB_NAME => 'SCOTT.SERIAL_' || I, FORCE=>TRUE);
      EXCEPTION WHEN OTHERS THEN NULL;
      END;
    END LOOP;
    END;
    BEGIN
      FOR I IN 1..90 LOOP
      BEGIN
        SYS.DBMS_SCHEDULER.DROP_JOB(JOB_NAME => 'SCOTT.PAR3_' || I, FORCE=>TRUE);
      EXCEPTION WHEN OTHERS THEN NULL;
      END;
    END LOOP;
    END;
    ALTER SYSTEM SET RESOURCE_MANAGER_PLAN='';
    set echo on
    --  Remove previously defined  resource plan, resource plan
    --  directives, and resource consumer groups  for this test
    BEGIN
        -- Prepare the pending area
        DBMS_RESOURCE_MANAGER.CLEAR_PENDING_AREA;
        DBMS_RESOURCE_MANAGER.CREATE_PENDING_AREA;
        -- Delete resource plan, its resource plan directives, and
        -- any associated resource groups
        DBMS_RESOURCE_MANAGER.DELETE_PLAN_CASCADE(
           plan => 'JOBQS_PLAN'
        -- Submit the changes
        DBMS_RESOURCE_MANAGER.VALIDATE_PENDING_AREA;
        DBMS_RESOURCE_MANAGER.SUBMIT_PENDING_AREA;
    END;
    -- Create resource manager objects
    BEGIN
       DBMS_RESOURCE_MANAGER.CLEAR_PENDING_AREA();
       DBMS_RESOURCE_MANAGER.CREATE_PENDING_AREA();
       DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP (
            CONSUMER_GROUP => 'JOBQ_WIDTH_1_GROUP',  
            COMMENT => 'Consumer group to force jobs to execute in serial'
       DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP (
            CONSUMER_GROUP => 'JOBQ_WIDTH_3_GROUP',  
            COMMENT => 'Consumer group to allow jobs to run in parallel 3'
       DBMS_RESOURCE_MANAGER.SUBMIT_PENDING_AREA();
    END;
    BEGIN
       DBMS_RESOURCE_MANAGER.CLEAR_PENDING_AREA();
       DBMS_RESOURCE_MANAGER.CREATE_PENDING_AREA();
       DBMS_RESOURCE_MANAGER.CREATE_PLAN
          ('JOBQS_PLAN', 'PLAN TO SUPPORT JOBQS');
       DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(
          PLAN => 'JOBQS_PLAN',
          GROUP_OR_SUBPLAN => 'JOBQ_WIDTH_1_GROUP',
          COMMENT=>'Associates with job class JOBQ_WIDTH_1_CLASS',
          CPU_P1 => 25,
          PARALLEL_DEGREE_LIMIT_P1 => 1,
          ACTIVE_SESS_POOL_P1 =>1
       DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(
          PLAN => 'JOBQS_PLAN',
          GROUP_OR_SUBPLAN => 'JOBQ_WIDTH_3_GROUP',
          COMMENT=>'Associates with job class JOBQ_WIDTH_3_CLASS',
          CPU_P1 => 75,
          PARALLEL_DEGREE_LIMIT_P1 => 2,
          ACTIVE_SESS_POOL_P1 =>3
       DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE(
          PLAN => 'JOBQS_PLAN',
          GROUP_OR_SUBPLAN => 'OTHER_GROUPS',
          CPU_P1 => 0,
          CPU_P2 => 100,
          COMMENT=>'Required'
       DBMS_RESOURCE_MANAGER.VALIDATE_PENDING_AREA();
       DBMS_RESOURCE_MANAGER.SUBMIT_PENDING_AREA();
    END;
    -- Create scheduler classes
    BEGIN
       DBMS_SCHEDULER.CREATE_JOB_CLASS(
          JOB_CLASS_NAME => 'JOBQ_WIDTH_1_CLASS',
          LOGGING_LEVEL => DBMS_SCHEDULER.LOGGING_FULL,
          LOG_HISTORY => 5,
          RESOURCE_CONSUMER_GROUP => 'JOBQ_WIDTH_1_GROUP',
          COMMENTS => 'Force jobs to run in serial, through plan JOBQ_PLAN and group JOBQ_WIDTH_1_GROUP'
    END;
    BEGIN
       DBMS_SCHEDULER.CREATE_JOB_CLASS(
          JOB_CLASS_NAME => 'JOBQ_WIDTH_3_CLASS',
          LOGGING_LEVEL => DBMS_SCHEDULER.LOGGING_FULL,
          LOG_HISTORY => 5,
          RESOURCE_CONSUMER_GROUP => 'JOBQ_WIDTH_3_GROUP',
          COMMENTS => 'Allow up to 3 jobs in parallel, enforced by plan JOBQ_PLAN and group JOBQ_WIDTH_3_GROUP'
    END;
    connect / as sysdba
    grant execute on jobq_width_1_class to scott;
    grant execute on jobq_width_3_class to scott;
    begin
      dbms_resource_manager_privs.grant_switch_consumer_group('scott','JOBQ_WIDTH_1_GROUP',false);
      dbms_resource_manager_privs.grant_switch_consumer_group('scott','JOBQ_WIDTH_3_GROUP',false);
    end;
    alter system set resource_manager_plan='';
    connect scott/tiger
    begin
      for i in 1..30 loop
      sys.dbms_scheduler.create_job(job_name => 'scott.serial_' || i,
          job_type=>'plsql_block', job_action=>'dbms_lock.sleep(2);',
          job_class=>'jobq_width_1_class',
          enabled=>true);
      end loop;
    end;
    begin
      for i in 1..90 loop
      sys.dbms_scheduler.create_job(job_name => 'scott.par3_' || i,
          job_type=>'plsql_block', job_action=>'dbms_lock.sleep(2);',
          job_class=>'jobq_width_3_class',
          enabled=>true);
      end loop;
    end;
    /-- The par3_90 job should finish about the same time as the serial_30 job since
    -- we run 3 jobs in paralled and serial respectively.
    -- check user_scheduler_job_run_details for after the test completed to verify.

  • How do i play two sound file one after another

    Hi All,
    How do i play two sound file one after another using single AudioClip Component?.
    Advance in thanks
    Manivel

    AudioClip gives you very little control over what happens to the sound, it also isn't capable of playing long clips or waiting until a clip ends. It will play multiple clips over top of each other.
    To do what you want you should use the facilities of javax.sound. Here's a post with an example: http://forum.java.sun.com/thread.jspa?forumID=513&threadID=450768
    There is also a tutorial, but its example fails for long clips.

  • How to play two presentations from the DMP one after another and looping

    Can anyone help me on this.I want to play two presenations one after another and looping from the DMP.

    Semuhtu,
    The easiest solution for looping two or more DMD presentations
    is to create a nested playlist within DMD.  You simply
    create a master presentation and add a playlist to this
    presentation.  Add the desired presentations to this playlist
    and then schedule or send the Action to the DMP(s) to play
    the Master Presentation.  The 2 or more child presentations will
    play and loop until you stop it manually.
    Summary of Tasks
    * Using DMD create Presentations (2 or more) that you would like
      to display on the DMP-Display(s).
    * After the presentations are created, you will need to find out
      what the URL addresses are for each presentation. Using the
      "Actions" drop down on the DMM-DMP Manager screen, you select
      a DMP and send the Presentation to the DMP.  Once the DMP displays
      the presentation, access the DMP-DM Web admin page and copy the URL
      address in the "Startup URLs-->Browser" field.   Repeat this process
      for each DMD presentation that you want to loop.
      For example:
      http://dmm.company.com:8080/xTAS-core/appgen/clad/clad_95_.htm
      http://dmm.company.com:8080/xTAS-core/appgen/clad/clad_96_.htm
      and so on...
    * Another parameter or variable that you will need to find out is
      the duration of your DMD presentation(s).  Some Presentations may be
      a slideshow of images and some may contain videos.  Your will need to
      play each presentation on the DMP to determine the duration length of
      each presentation that you will add to the looped playlist. 
    * Create a Master presentation using DMD. In this presentation, you will
      create add a "Playlist" to the presentation by selecting the Playlist
      button-drop down.  Select "All Media Types" and a Playlist object will
      be added to the Master presentation.
      - Double-click on the object to add content
      - Select "Add URL" button in the Playlist Content window.
      - Fill in the required fields (URL Title & Link) in the "Add URL"
        window.  Repeat the process for each presentation that you want
        to add.
      - Set the Duration for each item in the Playlist. Select the Item
        in the list and then DOUBLE-CLICK on the "Planned Duration"
        field and edit the time to desired duration.  Repeat process for
        each item.
      - Save Master Presentation
    * Schedule or use the  "Actions" drop down on the DMM-DMP Manager screen
      send the Master Presentation to the DMP(s).  The Playlist will play and
      Loop after the last item in the Master Playlist.
    If this answers your question, Please take time to mark this
    discussion answered & rate the response.
    Thank You!
    T.

  • How can I make my movies to play one after another automatically?

    I couldn't find the settings to play all my movies one after another.
    Any idea?

    Given the number of threads bemoaning the lack of such features (mostly for music videos) and countless enhancement requests sent here:
    http://www.apple.com/feedback/appletv.html
    ..and the lack of the facility being added in over a year make me think it's unlikely to ever happen but I'd love ot be proved wrong!
    AC

  • How to run a VI parallel to another?

    Hi, I am a newbie in LabView and I want to know how to run a VI
    parallel to another one. I have a SubVI in my program and every time
    this SubVI is running the program can't react for example for pressing
    a button. I have to wait until the SubVI is finished. How can I solve
    this problem?
    Thank you
    Marco

    Your question is very general, so it's hard to give a precise answer, but I would guess that the subVI and your button are found in the same loop, right?
    In LV, there is one very important principle - a "piece of code" will only execute when all the wires leading to it have delivered their data.
    If my assumption is correct, what is happening, most likely, is that your subVI takes time to run and the loop will not go to the next iteration until all the code in the current iteration has finished running. That's why you will see that the button was pressed, but nothing happens, because it wasn't read yet, and won't be read until the next iteration.
    Making code run parallel in LV is very easy - just place in the diagram so that there is no connection between the two different parts of code. If you place 2 unconnected loops, they will both run in parallel. This is probably the simplest solution to your problem, but you will need some way to synchronize the loops (like when do you run the subVI?). It's customary to have one loop which will be dedicated only to user interface, and you can add as many other loops as necessary. If this doesn't help you, I suggest you post your code (File>>Save with Options>>Development Distribution), so we can provide a specific answer.
    To learn more, I suggest you read the LabVIEW user manual. Also, try searching this site and google for LabVIEW tutorials. Here and here are a couple you can start with. You can also contact your local NI office and join one of their courses.
    In addition, I suggest you read the LabVIEW style guide.
    Try to take over the world!

  • Displaying images in canvas one after another

    Hi all,
    I have a problem displaying images in canvas one after another. I am using for loop and when i run the application, all images run back in the and only finally only the last image gets displayed in the emulator. I also used thread.sleep(). But it din't work.
    Here is my code:
    // A canvas that illustrates image drawing
    class DrawImageCanvas extends Canvas
    Image image;
    public void paint(Graphics g)
    int width = getWidth();
    int height = getHeight();
    g.setColor(0);
    g.fillRect(0, 0, width, height);
    String images[]={"paint_2.PNG","radha.PNG","cute.png","design.png","flowers.png"};
    for(int i=0;i<images.length;i++)
    image = null;
    System.out.println("/"+images);
         try
         image = Image.createImage("/"+images[i]);
    catch (IOException ex)
    System.out.println(ex);
    g.setColor(0xffffff);
    g.drawString("Failed to load image!", 0, 0, Graphics.TOP | Graphics.LEFT);
    return;
    if (image != null)
    g.drawImage(image, width/2, height/2, Graphics.VCENTER | Graphics.HCENTER);
    try
    Thread.sleep(5000);
    catch(Exception ex)
         System.out.println("the exception is.."+ex);
    Help me and Thanks in advance.

    See the code below : prefer the use of a Timer and a TimerTask instead of Thread.sleep().
    showNotify (from Canvas) is used to launch the timer.
    import java.io.IOException;
    import java.util.Timer;
    import java.util.TimerTask;
    import javax.microedition.lcdui.Canvas;
    import javax.microedition.lcdui.Graphics;
    import javax.microedition.lcdui.Image;
    public class DrawImage extends Canvas {
        Image image;
        String images[] = {"img1.png", "img2.png", "img3.png", "img4.png", "img5.png",
                            "img6.png", "img7.png"};
        Image[] tabImage;
        int imageCounter = 0;
        public DrawImage(){
            try {
                tabImage = new Image[images.length];
                for (int i = 0; i < images.length; i++)
                    tabImage[i] = Image.createImage("/" + images);
    } catch (IOException ex) {
    ex.printStackTrace();
    public void paint(Graphics g) {
    int width = getWidth();
    int height = getHeight();
    g.setColor(0);
    g.fillRect(0, 0, width, height);
    image = tabImage[imageCounter];
    if (image != null)
    g.drawImage(image, width / 2, height / 2, Graphics.VCENTER | Graphics.HCENTER);
    else{
    System.out.println("null");
    g.setColor(0xffffff);
    g.drawString("Failed to load image!", 0, 0, Graphics.TOP | Graphics.LEFT);
    protected void showNotify(){
    Timer t = new Timer();
    t.schedule(new PhotoSwitcher(), 5000, 5000);
    private class PhotoSwitcher extends TimerTask{
    public void run() {
    if (imageCounter < images.length - 1)
    imageCounter++;
    else
    imageCounter = 0;
    repaint();
    I hope this will help you !
    fetchy.
    Edited by: fetchy on 14 ao�t 2008 09:48                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to run java program from website?

    Hello
    I'd like to know how to run java program from my web page.
    I'd like to push some button in this web page so java program that would be on my server
    would pop-up. Can it be done automaticaly upon running this web site? (without any buttons - I just enter website and program pops up).
    Cheers

    I rather thought about RMI. But I could try servlets. So how it would look like?.
    I would make http request in browser (enter address) and program would show up in its window?. And I would not have to change anything in my program?. This program would run then on both boxes?. One remotely and one not?.
    But I would have to learn some basics, I've never worked with servlets. Could you suggest some good sites about it?. With ready examples so I could tweak them to my purpose.
    Message was edited by:
    macmacmac

  • JMF Play files in a sequence one after another

    Hi
    i developed a JMF based player for playing more than one files in a sequence one after another.
    problem is that it playes all files at same time.
    it should run 2nd file when one file is completed.

    I think time period or state of media will be helpful

  • How to assign concurrent program to concurrent manager

    Hi:
    How to assign concurrent program to concurrent manager? or the other way around. It was an interview question. for R12 or 11i
    Thanks

    Srini Chavali wrote:
    All concurrent programs, by default, will be run thru the Standard Manager. If you need to have a specific manager run a program, you need to define specialization rules (in Concurrent > Manager > Define, "Specialization Rules" button) for that manager.
    http://docs.oracle.com/cd/E18727_01/doc.121/e12893/T174296T174302.htm#fndcpdcq.QUEUE_CONTENT
    And that's exactly what is mentioned in the docs referenced in my previous reply.
    Thanks,
    Hussein

  • How to run Struts program with the help of tomcat

    Hello Everybody
    This is Adesh.I am a newcomer of java and facing a problem with struts, so if any one know how to set the path of struts and how to run struts program, so plz inform me.
    THX in Advance.............................................

    struts-config.xml
    <struts-config>
    <action-mappings>
         <action path  = "/welcome"
                    type  = "Welcome"
                    scope="session">
                <forward name="success" path=".welcome"/>
                <forward name="failure" path=".base.error"/>
         </action>
    </action-mappings>
        <plug-in className="org.apache.struts.tiles.TilesPlugin">
            <set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml"/>
            <set-property property="definitions-debug" value="1"/>
            <set-property property="definitions-parser-details" value="0"/>
            <set-property property="definitions-parser-validate" value="true"/>
        </plug-in>
    </struts-config>tiles-defs.xml
    <tiles-definitions>
         <definition name = ".base" path = "/include/template.jsp">
              <put name = "title" value = "${title}"/>
              <put name = "header" value = "/include/top.jsp"/>
              <put name = "body" value = "${body}"/>
              <put name = "footer" value = "/include/footer.jsp"/>
         </definition>
    </tiles-definitions>web.xml
    <servlet>
            <servlet-name>action</servlet-name>
            <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
            <init-param>
                <param-name>config</param-name>
                <param-value>/WEB-INF/struts-config.xml</param-value>
            </init-param>
    <init-param>
                <param-name>definitions-config</param-name>
                <param-value>/WEB-INF/tiles-defs.xml</param-value>
            </init-param>
            <load-on-startup>1</load-on-startup>
        </servlet>
    <servlet>
            <servlet-name>init</servlet-name>
            <servlet-class>Init</servlet-class>
            <load-on-startup>2</load-on-startup>
        </servlet>
        <servlet-mapping>
            <servlet-name>action</servlet-name>
            <url-pattern>*.do</url-pattern>
        </servlet-mapping>
      <jsp-config>
        <taglib>
            <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
            <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
        </taglib>
        <taglib>
            <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
            <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
        </taglib>
        <taglib>
            <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
            <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
        </taglib>
        <taglib>
            <taglib-uri>/WEB-INF/wall.tld</taglib-uri>
            <taglib-location>/WEB-INF/wall.tld</taglib-location>
        </taglib>
        <taglib>
            <taglib-uri>/WEB-INF/c.tld</taglib-uri>
            <taglib-location>/WEB-INF/c.tld</taglib-location>
        </taglib>
        <taglib>
            <taglib-uri>/WEB-INF/fn.tld</taglib-uri>
            <taglib-location>/WEB-INF/fn.tld</taglib-location>
        </taglib>
        <taglib>
            <taglib-uri>/WEB-INF/fmt.tld</taglib-uri>
            <taglib-location>/WEB-INF/fmt.tld</taglib-location>
        </taglib>
    </jsp-config>
        <resource-ref>
            <description>DB Connection</description>
            <res-ref-name>jdbc/SQLServerDB</res-ref-name>
            <res-type>javax.sql.DataSource</res-type>
            <res-auth>Container</res-auth>
        </resource-ref>
    </web-app>This should help....

  • Invoking 2 SQL statements one after another?

    Hi,
    Is it a good idea to invoke to 2 SQL statements one after another using the same connection & statement object? Some thing like this:-
    method(){
    String insertSql="insert into employee(Name,Age)values(?,?);
    Connection conn=null;
    PreparedStatement pst=null;
    int insertRows=0;
    ResultSet rs=null;
    try{
    conn=getConnection(); //will get the connection object
    if(insertRows==0){
    pst=conn.preparedStatement(insertSql);
    pst.setString(1,"Jason");
    pst.setString(2,"30");
    insertRows=pst.executeUpdate();
    conn.commit();
    if(insertRows>0) {
    pst=conn.createStatement("select * from employee");
    //retrieving the data from the same table
    rs=pst.executeQuery();
    while(rs.next()){
    System.out.println("The name is::"+rs.getString(1)+ " "+rs.getString(2));
    }catch(Exception e){
    }finally{
    try{
    if(pst != null) {
    pst.close();
    pst = null;
    if(rs != null) {
    rs.close();
    rs = null;
    if(conn != null) {
    conn.close();
    conn = null;
    }catch(Exception e) {
    e.printStackTrace();
    Here one more thing is that i want the insertSQL statement to be invoked only once that is in the beginning and the next time the method() is called it should skip the insert block and should only retrieve the data using "select * from employee". How to do it? I tried with few options nothing works.. Please do provide a solution for this... It is really urgent.
    Thanks

    Is it a good idea to invoke to 2 SQL statements one after another using the same connection & statement object? I think what you're asking is if you need a new Connection and/or Statement object for every query. The answer is no. In fact, most applications pool Connections so literally thousands or millions of queries are done in the lifetime of a Connection. You can reuse Statements and PreparedStatements as well as long as you intend on executing the same query.

Maybe you are looking for

  • Output doesnt show??

    //import java.text.*; //import java.util.Locale; public class Firm      private Employee[] empObj;      //private double raisedPay;      //Firm constructor      public Firm(Employee[] empObj)           //this.empObj = new Employee[empObj.length];    

  • Cfdocument and conditional headers

    Using cfdocument I am creating a PDF that starts with an information page that requires no header. On each of the following pages we want a header to appear. The problem is that the header is appearing on all pages, including the first. The code I'm

  • Whenever I try to import videos, an error tab appears, saying "Could not complete your request because DynamicLink is not available"

    Whenever I try to import videos, an error tab appears, saying "Could not complete your request because DynamicLink is not available"

  • My Premier Pro won't let me resize a video anymore. Why?

    Before, in the program sequence, I could zoom in automatically and crop videos right there without the effects control button. Now I can no longer do that. How can I restore this?

  • Problem with gparted

    I'm having a problem with gparted, everytime I run it by sudo gparted I get this No protocol specified (gpartedbin:5407): Gtk-WARNING **: cannot open display: :0 When I run it by su I get the same error. When I run it outside of the terminal I get a