How to get the validity of the socket before writes out datas?

I should keep the socket which created before and send/recieve datas several times,and the socket would be closed by other side after minites,
the question is
How can I get the validity of the socket before writes out datas?

If I understand well yor concern...
There is no way to know if a socket is still connected without using (i.e reading /writing on) it.
That's the way it works on C API layer, so it should not be defferent in Java.
For a good understanding of how TCP/IP works, if C code is OK for you, the best are Richard Stevens books.... (IMHO)

Similar Messages

  • How to get the previous state of my data after issuing coomit method

    How to get the previous state of some date after issuing commit method in entity bean (It should not use any offline storage )

    >
    Is there any way to get the state apart from using
    offline storage ?As I said the caller keeps a copy in memory.
    Naturally if it is no longer in memory then that is a problem.
    >
    and also what do you mean by auditlog?
    You keep track of every change to the database by keeping the old data. There are three ways:
    1. Each table has a version number/delete flag for each record. A record is never updated nor deleted. Instead a new record is created with a new version number and with the new data.
    2. Each table has a duplicate table which has all of the same columns. When the first table is modified the old data is moved to the duplicate table.
    3. A single table is used which has columns for 'table', 'field', 'data' and 'activity' (update, delete). When a change is made in any table then this table is updated. This is generally of limited useability due to the difficulty in recovering the data.
    All of the above can have a user id, timestamp, and/or additional information which is relevant to the data being changed.
    Note that ALL of this is persisted storage.
    I am not sure what this really has to do with "offline storage" unless you are using that term to refer to backed up data which is not readily available.

  • HT1454 HELP! ITook loads of photos on my ipod touch, and when i went to look at them they were just black images , and then out of 50 bout 7 of them came out?anyone know how to get the black pictures turn out ?

    HELP! ITook loads of photos on my ipod touch, and when i went to look at them they were just black images , and then out of 50 bout 7 of them came out?anyone know how to get the black pictures turn out ?

    Try the following:
    - A reset. Nothing is lost
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Restore from backup

  • How to get the past top 100 match data of game app?

    how to get the past top 100 match data of game app?

    What game app? Have you contacted the developer of the app?

  • How to get the name before @ in an email id

    Hi All,
    How can i get the name before '@' in an email id, for example if i have [email protected], how do i get 'abc' in my query result.
    Thanks

    thinkingeye wrote:
    Hi All,
    How can i get the name before '@' in an email id, for example if i have [email protected], how do i get 'abc' in my query result.
    Thankscombine INSTR() & SUBSTR() functions

  • How to get the Full and final settelment date from PC_payresults

    Hi Experts..sairam.
    We are preparing Functional specification  for a report on Full and final settelement.
    We need to extract the  full and final settelement date from  payresults.
    Full and final settelement would be an offcycle run.
    How can we identify the particular Offcycle is meant for full and final settelment.
    Full and final settelement can be done after date of relieving.
    Please share your ideas to get the field names and logic to fetch.
    Thanks in advance.
    Regards,
    Sairam.

    Hi Praveen,
    I found it from HRPY_RGDIR through SE11.
    But im in confusion in thinking on Logic to find the Full and final settelment processed date.
    First of all..Report has to check WPBP table weather Employment status is Zero.
    Later..It has to read the HRPY_RGDIR table.
    Here what the system to check.What conditions to be validated to fetch the Full and final settelment processed date.Will it be FPPER and INPER as 00000000 or shall we do it from offcycle reason.
    Please share your ideas.Thanks in advance.
    Regards,Sairam.

  • How to get the table of cost elements data?

    Dear friends,
    I want ot get the Chart_of_Accounts, Cost_Element, Short_Text into an internal table, but how can I find the related tables in SAP system?
    Thanks a lot!

    Hi,
    The table for cost element is  CSKA.
    Alternately you can use the bapi BAPI_COSTELEM_GETDETAIL for getting the details also.
    Regards,
    Ankur Parab

  • How to get the max total sale by date on every store

    I am trying to write a query in Oracle which will return both the store_id and the maximum total sale by date

    Hi,
    Whenever you have a question, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say what version of Oracle you're using (e.g. 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002#9362002
    Hjava wrote:
    I am trying to write a query in Oracle which will return both the store_id and the maximum total sale by date
    Do you mean you want to see the store_id that had the maximum total sale?
    In general, this can be done with a Top-N Query, using an analytic function such as RANK.  For an example, see http://forums.oracle.com/forums/thread.jspa?messageID=3739610
    If you only want the date, the maximum total from that date, and 1 column from the same row with the maximum (e.g. store_id), then you might be able to use the aggregate LAST function instead.
    What results do you want in case of a tie?  (That is, if 2 or mote store_ids have the same total sale on a given date, and no other store_id has a higher total.)

  • How to get the event before the session end?

    Currently i using a connection pool (dbpool). I need to release my pool when user logout or closing the browser. I have a session that keeping the user information and the connection pool manager.
    How i detect the event when session end? I need to know is that can catch an event and perform release() command before the session that store login information ended.
    Or have other solution to release the pool (it acually is only 1 pool, it will close the pool when no user(s) using it)

    you do not need to do this.
    In your db code, when you use
    conn.close(); your connection will be released to the pool.
    If you do not do this you will get connection pool leaks.
    There is no benefit in using a pool if you try and keep a connection for a single user, the idea is to SHARE connections between many users.
    If you want to detect session expiry yoyu need to use a 'session listener', if you search the forums you can easily find out how to do this.
    The main thng is NOT to tie your connections up in this way, you MUST use conn.close(); to release your connections back to the pool as soon as you have finished using them.

  • How to get the month value in a date?

    I am retrieving a Date from the database using the getDate() method! However, I want the value of the month in this obtained result, which i want to compare with an integer!
    I dont see any other option but to use the deprecated getMonth() method on this Date object! Or rather get the date as a String & apply the substring methods to get the reqd value!
    Is there any other go on this?

    Hi
    You can use GregorianCalendar.
    Date d = new Date();
    Calendar c = new GregorianCalendar();
    c.setTime(d);
    System.out.println(c.get(Calendar.MONTH)+1);
    -nmw-

  • How to get the Maximum of two calender dates in OBIEE 11g Analytics

    Hi,
    I have requirement like getting the  maximum calendar date from two calendar dates in obiee 11g reports and  the requirement is like the following
    max(Reported.Calendar date, Returned.Calendar Date)
    can anyone help me to solve this issue.
    Thanks,

    Something like this...
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select to_date('17-nov-2006','dd-mon-yyyy') as c_start_date, to_date('21-jan-2008','dd-mon-yyyy') as c_end_date from dual union all
      2             select to_date('21-nov-2006','dd-mon-yyyy'), to_date('17-feb-2008','dd-mon-yyyy') from dual union all
      3             select to_date('21-jun-2006','dd-mon-yyyy'), to_date('17-jul-2008','dd-mon-yyyy') from dual
      4             )
      5  -- end of test data
      6  select c_start_date, c_end_date
      7        ,trunc(months_between(c_end_date, c_start_date) / 12) as yrs
      8        ,trunc(mod(months_between(c_end_date, c_start_date), 12)) as mnths
      9        ,trunc(c_end_date - add_months(c_start_date, trunc(months_between(c_end_date, c_start_date)))) as dys
    10* from t
    SQL> /
    C_START_D C_END_DAT        YRS      MNTHS        DYS
    17-NOV-06 21-JAN-08          1          2          4
    21-NOV-06 17-FEB-08          1          2         27
    21-JUN-06 17-JUL-08          2          0         26
    SQL>But, don't forget that different months have different numbers of days, and leap years can effect it too.

  • How to get the difference between these two dates

    Hello Friends,
    I need to get the difference between these two fields which store dates but with varchar2 data types
    SELECT pac.segment1, pac.segment2 emp_no, pac.segment3 NAME,
    pac.segment4 POSITION, pac.segment5 start_date, pac.segment6,
    pac.segment7
    FROM per_analysis_criteria pac, fnd_id_flex_structures_vl ffs
    WHERE ffs.id_flex_structure_code = 'Employee Rejoin'
    AND ffs.id_flex_num = pac.id_flex_num
    AND TO_CHAR (TO_DATE (pac.segment7, 'YYYY/MM/DD HH24:MI:SS'))
    - TO_CHAR (TO_DATE (pac.segment6, 'YYYY/MM/DD HH24:MI:SS')) > 1;
    my query is something like this...
    am trying to find the difference between the last two columns but with not much luck..
    can some one suggest me a solution please

    SELECT pac.segment1, pac.segment2 person_id, pac.segment3 NAME,
    papf.employee_number, paaf.supervisor_id, pac.segment4 POSITION,
    pac.segment5 start_date, pac.segment6, pac.segment7,
    papf2.email_address,
    ( TO_DATE (TO_CHAR (pac.segment7), 'DD-MON-YYYY HH:MI:SS AM')
    - TO_DATE (pac.segment6, 'DD-MON-YYYY HH:MI:SS AM')
    + 1
    ) difference,
    POST.email_address
    FROM per_analysis_criteria pac,
    apps.fnd_id_flex_structures_vl ffs,
    per_all_people_f papf,
    per_all_assignments_f paaf,
    per_all_people_f papf2,
    (SELECT email_address, person_id
    FROM per_all_people_f
    WHERE person_id IN (
    SELECT person_id
    FROM per_all_assignments_f
    WHERE position_id IN (SELECT position_id
    FROM per_positions
    WHERE NAME LIKE 'HR Manager.704.')
    AND TRUNC (SYSDATE) BETWEEN effective_start_date
    AND effective_end_date)
    AND TRUNC (SYSDATE) BETWEEN effective_start_date AND effective_end_date
    AND business_group_id = fnd_profile.VALUE ('PER_BUSINESS_GROUP_ID')) POST
    WHERE ffs.id_flex_structure_code = 'Employee Rejoin'
    AND TO_CHAR (papf.person_id) = pac.segment2
    AND ffs.id_flex_num = pac.id_flex_num
    AND TRUNC (SYSDATE) BETWEEN papf.effective_start_date
    AND papf.effective_end_date
    AND papf.current_employee_flag = 'Y'
    AND papf.person_id = paaf.person_id
    AND TRUNC (SYSDATE) BETWEEN paaf.effective_start_date
    AND paaf.effective_end_date
    AND papf.person_id = paaf.person_id
    AND papf2.person_id = paaf.supervisor_id
    AND paaf.primary_flag = 'Y'
    AND TRUNC (SYSDATE) BETWEEN papf2.effective_start_date
    AND papf2.effective_end_date
    AND papf2.current_employee_flag = 'Y'
    and ( TO_DATE(to_char(pac.segment7), 'DD-MON-YYYY HH:MI:SS AM')-TO_DATE (pac.segment6, 'DD-MON-YYYY HH:MI:SS AM')+1) >1
    last line is giving me the error pls suggest a solution

  • How to get the item stock for a date

    Hi all
    I need to get the item stock quantity on a date, but i don´t know if i can get it from a table or if i have to make a query to calculate it from the documents´lines. If you can help me please reply this post.
    Thanks

    Do you already know of table OINM (Warehouse table) - it is not documented in SAP-BO references?
    This table contains entries for each movement in stocks of your system. Here are some examples of fields in this table:
    BASE_REF document number of document affecting OITW.OnHand
    DocDate      date of this document
    ItemCode     Item of which the stock quantity is changed
    Dscription    name of item
    Warehouse  affected stock
    InQty       number of items added into stock (OITW.OnHand is increased)
    OutQty       number of items taken from stock (OITW.OnHand is decreased)     
    TransType   type of booking (see below)
    Balance      this is NOT the OITW.OnHand at the date of this booking;
                      it's something like the cumulated stock value in some currency
    To calculate the OnHand-value at a date of any of these bookings you have to
    sum up the incoming/outgoing quantities, e.g. (z.B. SUM(InQty) - SUM(OutQty)).
    Relation between the type of booking and the values in InQty / OutQty:
      ++ InQty/OutQty contain the number of items added to/taken from the stock;
      the number complies to the value OITW.OnHand is increased/decreased;      
      -- doesn't affect stock (InQty/OutQty = 0)
      ? missing documentation
    TransType InQty OutQty
    -2              ++     --         opening balance
    13      --       --         outgoing invoice
    13              --      ++          outgoing invoice without previous delivery note
    15              --      ++        delivery note
    18              --       --         incoming invoice
    20             ++      --         incoming delivery note
    58             ?        ?          inventory
    59             ++      --         stock receipt (without purchasing transactions)
    60              --      ++        goods issue (without sales transactions)
    67              --      ++        transfer between stocks
    67             ++      --         transfer between stocks
    I hope that I got your question right and that my hints will help you!
    Frank

  • How to get the transaction by function out of VIRSA in an easy way

    Hi collegues,
    I'm looking for a simple solution / query to extract a list out of VIRSA compliance calibrator (5.2). The list should bring up the transaction codes by function.
    e.g.
    PM01 - ca87
    PM01 - ip30
    If possible please name the table in VIRSA where this information is stored so I can do a simple query in the SQL-view
    thanks a lot
    Matthias

    Hi Matthias,
    in RAR 5.3 you can use the download function of the rule architect. There you get information about tables, functions, actions and permissions.
    I don't know if you have this function in VIRSA compliance calibrator 5.2. I started my career with 5.3 
    Regards
    Dirk

  • "Data only" csv export. How to get the same data?

    When I export to csv I get more data than when exporting to "data only". Why and how to get the same as when using "data only". I suppose it is because of some supressed lines, but why there is difference in the view (which is right) and in the export file?
    I do not want to export to xls with "data only" and save as csv, because the exported csv is being read by another application, which is unable to convert it automatically.
    The other way is to put constraints in the data selection for the whole report (and not by supressing lines). How to say {table.date}>=maximum({table.date}) in the  in the data selection? There is not possible to use "maximum". Probably possible with array?
    Thanks in advance
    Edited by: Kiril Bojilov on Aug 4, 2009 12:34 PM
    Ok, I managed it: I put the constraint in the group selection
    Edited by: Kiril Bojilov on Aug 4, 2009 12:46 PM

    New customers get more options because new customers didn't already agree to complete a 2yr contract before being able to get a new phone. If you had a line that wasn't under contract, you would get a better deal than new customers because while they pay $35 activation fee for a new line, you pay $30 upgrade fee for using an upgrade. You just have to finish your end of the deal before you can start a new one.

Maybe you are looking for

  • What is the table to get AUSSL

    HI All, i need to fetch AUSKT(Exception Code) from table T458A. For that, need to find out 'AUSSL' Exception message key (primary key of T458A) from purchase order number. Is there any ways to get Exception message key for purchase order?? please hel

  • HD Icon Weirdness

    Not so much a problem as a curiosity. It seems that no matter where I put the ND icon on my desktop, if I turn the cmpute roff, next time I turn it on, the HD icon has moved itself back to the upper right-hand corner of the desktop. All my other icon

  • Contribute CS4 hides repeat question buttons

    Hi all, when upgrading to Contribute CS4, our internal client cannot see the buttons ,it is there on screen, but somehow hidden underneath the another div, the above image was taken using CS3, in CS4 its completely hidden behind the div. does anyone

  • Printing 2 columns in reverse

    I have layed out the church service sheet for my son's wedding in Pages in two columns. I can print the four sheets without a problem but I want to print in reverse so that I get two sheets printed on both sides. 

  • Make a High score for a game....

    Hello I'm tring to use RMS code to make a highscore to game - puzzle, but i have some problems // file 1 - Hiscore.java import java.io.*; import javax.microedition.midlet.*; import javax.microedition.lcdui.*; import javax.microedition.rms.*; public c