How to retain socket connection for multiple requests in java 1.3

Hi All,
My problem is to retain client socket connection without opening and closing socket connection for every request.I want to open the socket connection once and send multiple requests one after the other based upon the response over the same socket.Finally I want to close the socket only after completing all my requests and receiving respective responses.I don't want to open and close the socket for each request and response.While at the same time I expect the socket to send each request only after receiving the response for the previous request.
I am using java 1.3 and I am looking for the solution in same version.
Please help me .
Thanx in advance.

Look at my response to "Telnet to Unix box from Java"
http://forum.java.sun.com/thread.jsp?forum=31&thread=437231
on "Java Programming" forum. It does exactly that to run the signon and a command. It would be easy to extend it to do multiple commands.

Similar Messages

  • How to use a connection across multiple request

    What is the idea of using a connection across multiple requests.

    Please give more details. What connections and what requests
    And are you posting on the right forum? (This sounds more like a Networking/servlet question)

  • How to establish socket Connection for Flash Game ;-)

    Currently im working on casino game. i want to make it multiPlayer. need help to establish socket game connection

    Look at my response to "Telnet to Unix box from Java"
    http://forum.java.sun.com/thread.jsp?forum=31&thread=437231
    on "Java Programming" forum. It does exactly that to run the signon and a command. It would be easy to extend it to do multiple commands.

  • How to create one TO for multiple TRs

    Dear All,
    how to create one TO for multiple TRs, kindly suggest me
    Regards,
    balu

    As for your question: it is discussed in sAP online help:
    http://help.sap.com/saphelp_erp60_sp/helpdata/en/c6/f841f24afa11d182b90000e829fbfe/frameset.htm
    Sorry I misunderstood your question.
    The above mentioned solution won't create one single TO from multiple TR.
    Edited by: Csaba Szommer on Aug 11, 2010 9:46 AM

  • How to have Secure Connection for File Adapter.Pls help

    Hi All,
    For File to File Scenario
    How to have Secure Connection for File Adapter.
    Pls send links/blogs explaining this scenario.
    Regards

    hi rich
    go through these links
    FTPs connection failed - error ".. certificate rejected by ChainVerifier"
    Re: What is SFTP, FTI channels
    http://help.sap.com/saphelp_erp2005/helpdata/en/e3/94007075cae04f930cc4c034e411e1/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/frameset.htm
    FTPS implementation question.
    http://help.sap.com/saphelp_nw04s/helpdata/en/43/0e16bfd7b021aee10000000a1553f6/frameset.htm
    Server certificate rejected by ChainVerifier:FTPS server(Points Guaranteed)
    /people/krishna.moorthyp/blog/2007/07/31/sftp-vs-ftps-in-sap-pi
    File adapter
    thanks
    Kunaal

  • How to apply List box for multiple selection of rows  in ALV report ?

    Hi Exprots,
    1: How to apply List box for multiple selection of rows  in ALV report ?
    Thanking you.
    Subash

    hi,
    check the below program.
    REPORT zalv_dropdowns.
    *Type pools declarations for ALV
    TYPE-POOLS : slis.
    *data declarations for ALV container,ALV grid, Fieldcatalogues & layout
    DATA: g_grid  TYPE REF TO cl_gui_alv_grid,
          g_custom_container TYPE REF TO cl_gui_custom_container,
          gt_fieldcat TYPE lvc_t_fcat,
          gs_layout TYPE lvc_s_layo.*INTERNAL TABLE AND WA DECLARATIONS FOR t517 A table
    DATA: gt_outtab TYPE STANDARD TABLE OF t517a INITIAL SIZE 0,
          wa_outtab TYPE t517a.
    START-OF-SELECTION.*Call to ALV
      CALL SCREEN 600.*On this statement double click  it takes you to the screen painter SE51.
    *Create a Custom container and name it CCONT and OK code as OK_CODE.
    *Save check and Activate the screen painter.
    *Now a normal screen with number 600 is created which holds the ALV grid.
    PBO of the actual screen , Here we can give a title and customized menus
    Here we also call the subroutine for ALV output.
          MODULE PBO OUTPUT                                             *
    MODULE pbo OUTPUT.
      PERFORM alv_output.
    ENDMODULE.                    "pbo OUTPUT
          MODULE PAI INPUT                                              *
    MODULE pai INPUT.
    ENDMODULE.                    "pai INPUT
    *&      Form  BUILD_FIELDCAT
    FORM build_fieldcat.
    DATA ls_fcat TYPE lvc_s_fcat.
    *Build the field catalogue
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name = 'T517A'
        CHANGING
          ct_fieldcat      = gt_fieldcat.
    To assign dropdown in the fieldcataogue
      LOOP AT gt_fieldcat INTO ls_fcat.   
    CASE ls_fcat-fieldname.
       WHEN 'SLART'.
    *is the first list box
            ls_fcat-drdn_hndl = '1'.
            ls_fcat-outputlen = 15.
            MODIFY gt_fieldcat FROM ls_fcat.
    is the second list box    
    WHEN 'ABART'.       
            ls_fcat-drdn_hndl = '2'.
            ls_fcat-outputlen = 15.
            MODIFY gt_fieldcat FROM ls_fcat.   
    ENDCASE.
      ENDLOOP.
    ENDFORM.                    "build_fieldcat
    *&      Form  ALV_OUTPUT
    FORM alv_output .*Create object for container
      CREATE OBJECT g_custom_container
             EXPORTING container_name = 'CCONT'.
    *create object for grid
      CREATE OBJECT g_grid
             EXPORTING i_parent = g_custom_container.
    Build fieldcat and set column
    *Assign a handle for the dropdown listbox.
      PERFORM build_fieldcat.
    *Build layout
      PERFORM build_layout.
    Define a drop down table.
      PERFORM dropdown_table.
    *fetch values from the T517A table
      SELECT * FROM t517a INTO TABLE gt_outtab.
    *Display ALV output
      CALL METHOD g_grid->set_table_for_first_display
        EXPORTING
          is_layout       = gs_layout
        CHANGING
          it_fieldcatalog = gt_fieldcat
          it_outtab       = gt_outtab.ENDFORM.                               "ALV_OUTPUT
    *&      Form  dropdown_table
          text
    -->  p1        text
    <--  p2        text
    FORM dropdown_table.*Declarations for drop down lists in ALV.
      DATA: lt_dropdown TYPE lvc_t_drop,
            ls_dropdown TYPE lvc_s_drop.
    First SLART listbox (handle '1').
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '01 Primary school'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '1'.
      ls_dropdown-value = '02 Lower Secondary'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '1'.
      ls_dropdown-value = '03 Upper Secondary'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '04 Professional School'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '05 College'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '06 University'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '1'.
      ls_dropdown-value = '09 Other Establishment'.
      APPEND ls_dropdown TO lt_dropdown.* Second ABART listbox (handle '2').  ls_dropdown-handle = '2'.
      ls_dropdown-value = '10 Primary School certificate'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '2'.
      ls_dropdown-value = '20 Lower secondary/Junior high'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '30 High school diploma(B-levels)'.
      APPEND ls_dropdown TO lt_dropdown.
      ls_dropdown-handle = '2'.
      ls_dropdown-value = '31 Vocational'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '32 Matriculation'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '40 Specialist vocational certificate'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '50 College degree Level1'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '51 College degree Level2'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '52 Masters degree'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '60 Univ Degree level1'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '61 Bachelors degree'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '62 Masters degree'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '63 Licenciate'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '64 Doctors Degree Ph.D'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '89 None'.
      APPEND ls_dropdown TO lt_dropdown.  ls_dropdown-handle = '2'.
      ls_dropdown-value = '90 Unknown'.
      APPEND ls_dropdown TO lt_dropdown.*method to display the dropdown in ALV
      CALL METHOD g_grid->set_drop_down_table
        EXPORTING
          it_drop_down = lt_dropdown.ENDFORM.                               " dropdown_table
    *&      Form  build_layout
          text
    *layout for ALV output
    FORM build_layout .  gs_layout-cwidth_opt = 'X'.
      gs_layout-grid_title = 'ALV DROPDOWN LISTS'.
      gs_layout-no_toolbar = 'X'.ENDFORM.                    " build_layout
    endform.
    Edited by: S.r.v.r.Kumar on Jun 1, 2009 2:48 PM

  • How to get an answer for Support Request Number 12...

    How to get an answer for Support Request Number 1277702580 ?

    Has your speed problem been resolved, or do you need assistance?
    There are some useful help pages here, for BT Broadband customers only, on my personal website.
    BT Broadband customers - help with broadband, WiFi, networking, e-mail and phones.

  • HT5534 How do i purchase keynote for multiple users without a MAC computer?

    How do i purchase keynote for multiple users without a MAC computer?

    Guy, you see, I understand you need to be with the Mac you want to download Keynote.
    And yeah, Keynote only works with the Mac OSX and iOS

  • How to apply sap license for Sap Netweaver AS Java

    Hello guys,
    May i know how to apply sap license for SAP Netweaver AS Java?  Appreciate the reply, thank you
    regards,
    wei how

    Hi Lee,
    check below link:
    http://help.sap.com/saphelp_nwce10/helpdata/en/9f/5e533e5ff4d064e10000000a114084/content.htm
    Thanks
    sunny

  • How to conditionally hide/show form item for multiple requests?

    Ver 4.1.0
    Hi There,
    I have a database form where in one of the fields I need to hide /show based on if the user selects a copy row option or create a new row.
    To explain in details,
    1. I have a report and form application created. When the user edits a record, in that page I have added a copy button also, so when the user hits the copy button, the page is reloaded where the user can create a new record with the save button disable and the create button visible. when the user submits the form using Copy the request is set to "COPY' and in the form, one of the fields has conditional display "REQUEST =Expression1" with value "COPY" This works fine.
    2. However, on the reports page, there is a "CREATE" button also, where the user can directly create a new record and the request value is "CREATE"
    I wanted to add both COPY and CREATE to the conditional display something like
    "REQUEST=Expression1" with value "COPY, CREATE" (without quotes)
    however, the item does not display. I guess it only accepts one value since its =.
    Any suggestions on how the conditional display for an item can be done based on multiple request types?
    Thanks!
    Sun
    Edited by: ryansun on Oct 18, 2012 3:08 AM

    Hi Sun,
    Try changing your condition to a PL/SQL Expression and in expression 1 field add something similar to below and see if it works:
      :REQUEST like 'CREATE' or :REQUEST like 'COPY'This is straight off the top of my head and untested.
    Hope this helps
    Paul

  • How to detact socket connection status

    hi.. i am using socket class for the connection. How can I
    detect for disconnection of the socket? Because calling the Flush()
    method (called writeUTFBytes() eariler) is not throwing IOError
    exception. I found that AIR has some network monitor which can be
    used for this case. But I am not using AIR. Also, another work
    around it to connect to some URL again to check the status. I don't
    really want to use this method because the application needs to
    send data back to the server very very often and I'd like to be
    slow down. please help me out.....thanks in advance...

    Hello Kent,
    We can view active RFC Connections through SMGW. But if you want to have the history of the login details I guess you need to activate Logging.
    SMGW -> Goto Expert Functions -> Logging -> Select appropiate options.

  • One connection for each request!trans

    Hi there,
    We migrated a big application from classic toplink to EJB 3, glassfish, EclipseLink. Some big module is still using classic toplink queries for a lot of things. As we didn't have the resource to change everything to pure ejb & jpa, we tried a couple of "tricks". They kind of work (in production), but I noticed that there is one connection for each db request.
    It stills works fast enough, thanks to Glassfish connection pooling. But I guess this is horrible. Regarding transactions too...
    Here is how I get a UnitOfWork:
    JpaEntityManager jpaEntityManager = JpaHelper.getEntityManager(entityManager);
    UnitOfWork unitOfWork = jpaEntityManager.getUnitOfWork();
    Here is some eclipselink query which is causing thousand of db queries and acquiring about the same number of connections :
    return ((Collection) unitOfWork.executeQuery(readAllQuery));
    thx, Yannick

    Hello,
    ReadAllQueries will always go to the database by default to ensure that all the results are returned. So unless you are using inmemory query options, you will always see the same number of queries as executeQuery calls when using ReadAllQuery objects.
    As for connections, the default is for connections to be obtained as they are needed, and then released when no longer needed. By default, EclipseLink/TopLink will use a read connection pool and obtain and release for each read query that is done outside of a transaction. When in a transactional context (ie reads through a uow where a transaction was started and changes made), reads will go through the write connection - this is done to ensure that transactional changes are picked up -and these will not be put into the shared cache until the transaction completes. So all reads done in the same uow while in a transaction will use the same write connection, since the uow needs to hold onto while the transaction is active anyway.
    How are your transactions demarcated and the EntityManager obtained?
    Best Regards,
    Chris

  • [ADF Help] How to create a view for multiple tables

    Hi,
    I am using Jdeveloper 11G and ADF framework, and trying to create a view to update multiple tables.
    ex:
    Table A has these fields: ID, Name
    Table B has these fields: ID, Address
    A.ID and B.ID are primary keys.
    B.ID has FK relationship with A.ID
    (basically, these tables have one-to-one relation)
    I want to create a view object, which contains these fields: B.ID (or A.ID), A.Name, B.Address.
    So I can execute C,R,U,D for both tables.
    I create these tables in DB, and create entity objects for these tables.
    So there are 2 entity objects and 1 association.
    Then I create a view object based on B and add fields of A into the view:
    If the association is not a "Composition Association",
    when I run the model ("Oracle Business Component Browser") and try to insert new data, fields of A can't edit.
    If the association is a "Composition Association", and click the insert button, I will get
    "oracle.jbo.InvalidOwnerException: JBO-25030: Failed to find or invalidate owning entity"
    If I create a view object based on A and add filed of B into the view:
    When I run the model and try to insert new data, fields of B can't edit, no matter the association is or is not a composition association.
    So... how can I create a view for multiple tables correctly?
    Thanks for any advices!
    Here are some pictures about my problem, if there is any unclear point, please let me know.
    http://leonjava.blogspot.com/2009_10_01_archive.html
    (A is Prod, B is CpuSocket)
    Edited by: user8093176 on Oct 25, 2009 12:29 AM

    Hi Branislav,
    Thanks, but the result is same ....
    In the step 2 of creating view object, I can select entity objects to be added in to the view.
    If I select A first, and then select B (the "Source Usage" of B is A), then finishing the wizards.
    When I try to create a new record in the view, I can't edit any properties of B (those files are disabled).
    If I select B first, and then select A in crating view object, the result is similar ...
    Thanks for any further suggestion.
    Leon

  • How to change the connection for a recurring report

    I have a group of reports running in production on recurring schedules.  I need to update the database connection for these as we are changing our server environment.
    I open the report in Crystal Reports 11 and changed the database connection saved the report back to the Enterprise Server location (I also have a backup of the original).  When I preview the report using the Central Management Console, the report uses the updated database connection info.  When I test the recurring report I get a logon failure.  When I go to the instance to look at the database logon for the recurring instance it shows the old database connection.
    How can this database connection get updated for the current group of instances for these recurring reports?
    Thanks
    BOBJCMC

    Hi Stratos,
    I tried to use .NET SDK to update the Logon_Info properties as below. But it does not seem to be working. Is this the correct way to update logon info for recurring instances?
    infoObject.ProcessingInfo.Properties["SI_LOGON_INFO"].Properties["SI_LOGON1"].Properties["SI_USER"].Value  = <userid>
    infoObject.ProcessingInfo.Properties["SI_LOGON_INFO"].Properties["SI_LOGON1"].Properties["SI_PASSWORD"].Value  = "pwd"
    Thanks
    Ajith

  • How to assign approvaal policy for a request template in OIM 11g

    When I request for resource in OIM 11g, It's always going for Default approval of xelsysadm.
    I want this Request level approval must go to "Beneficiary Manager approval". While requesting I am selecting request template (which I created) for Provision resource as Request type.I have already set "Beneficiary Manager approval" as request level approval for this request template.
    I have created one approval policy, How can I assign this approval Policy to request template so that When i submit this request , it should go to my Manager approval.
    Regards,
    J

    Hi Rajiv,
    I do not need approval of Operational level. I want to stop the approval process after request level approval.
    Here you are saying to create a new approval policy and set as AUTO Approval as true. There are some default approval policies which comes with OIM 11g and one of the approval policy is trigeering the Operaional level approval. So I think I do not need to create new approval policy and I can use exsting approval policy and modify as you suggested selecting AUTO APPROVAL and create approval rule as request template=="XYZ".
    I am not sure which default approval policy trigeering the Operational approval now. Can you pls tell me that?
    Can you pls confirm that, there is only way to restrict Opertional Approval by selecting "AUTO APPROVAL" true and put the approval rule as request template=="XYZ"
    Thanks Rajiv for your help all the time.

Maybe you are looking for

  • RH8 issue with popups

    Hi there, I am using RH8 on Windows XP. I am working on a very large, legacy project that has been around for ages. In many, many topics there are popups which take you to a secondary topic for syntax information. Each subheading in the secondary top

  • Why is iTunes pricing so much more than Amazon

    I am curious as to why iTunes pricing is way more expensive than Amazon for both music and movies??

  • IMac - Passwords stuck in Mavericks...

    Hey Guys, Recently, I got an email from apple about finally being able to download Yosemite beta. I happily did so, and it was working fine, but my dad wasn't happy. I did this with his permission, but he couldn't get iPhoto to work, and was extremel

  • Correcting Document Splitting

    Hi Gurus, I have the following issue at hand: We posted several general ledger documents, however, the document splitting rules were incorrect and thus a great number of the documents were split incorrectly. I have corrected the document splitting ru

  • What does the WiFi calling indicator look like on Lumia 640.

    I have a new Lumia 640 with Wifi calling. The EE setup instructions talk about getting a message from them and then within 24hrs being switched on and the phone will show a 'Wifi Calling Indicator' What is this as there is no reference in Lumia userg