Connector.open, timeouts parameter

Hi,
I'm using Connector.open(String name, int mode, boolean timeouts), where the timeouts parameter = true, to return an HttpConnection, which I then use to send and recieve data with.
On the motorola devices I've used for testing, an IOException is generated when the server takes longer than ~40seconds to respond, is this due to the device closing the connection due to the timeout value?
I thought an IOInterruptedException should be thrown if a timeout occurs?
Also, is the length of the timeout specific to the device?
Any information about how timeouts work would be greatly appreciated!!

Hi
you could go through file \javax\microedition\io\Connectot.java
it says
* An optional third parameter is a boolean flag that indicates
* if the calling code can handle timeout exceptions. If this
* flag is set, the protocol implementation may throw an
* InterruptedIOException when it detects a timeout condition.
* This flag is only a hint to the protocol handler, and it
* does not guarantee that such exceptions will actually be thrown.
* If this parameter is not set, no timeout exceptions will be
* thrown. The timeout period is not specified in the open call
* because this is protocol specific. Protocol implementors can
* either hardwire an appropriate value or read them from an
* external source such as the system properties.
we can see they do not specify only open could throw
InterruptedIOException though currently the function
prototype means only open will throw checked exception
InterruptedIOException.
anyway timeout should be implemented
interoperateing with protocol.java and native function.OK?

Similar Messages

  • Don't understand Connector.open timeout parameter

    Is setting this timeout parameter = true same as using setSoTimeout(timeout) in java.net? I need to use read() method to read data from inputstream as a nonblocking operation by setting the max. time that allows the read() method to stay blocking. How can I implement this operation with MIDP without generating second thread?

    Hi
    you could go through file \javax\microedition\io\Connectot.java
    it says
    * An optional third parameter is a boolean flag that indicates
    * if the calling code can handle timeout exceptions. If this
    * flag is set, the protocol implementation may throw an
    * InterruptedIOException when it detects a timeout condition.
    * This flag is only a hint to the protocol handler, and it
    * does not guarantee that such exceptions will actually be thrown.
    * If this parameter is not set, no timeout exceptions will be
    * thrown. The timeout period is not specified in the open call
    * because this is protocol specific. Protocol implementors can
    * either hardwire an appropriate value or read them from an
    * external source such as the system properties.
    we can see they do not specify only open could throw
    InterruptedIOException though currently the function
    prototype means only open will throw checked exception
    InterruptedIOException.
    anyway timeout should be implemented
    interoperateing with protocol.java and native function.OK?

  • CFQUERY Timeout Parameter for SQL2005 Fails

    Here's my test:
    <cfquery name="test" datasource="dsn" timeout="1">
      select top 20000 *
      from table
    </cfquery>
    <cfoutput>#cfquery.ExecutionTime#</cfoutput>
    I'm getting 3000+ for this value.  This shouldn't be, right?  Because I have the timeout parameter set for a second?  The driver I'm using is the one that's
    supplied with CFMX7.02, "Microsoft SQL Server", hooked into a MS SQL Server 2005 Standard.  Why is CF ignoring the timeout parameter?

    Hi,
    Anyone? I saw many articles in Metalink regarding the tx_timeout parameter - also one which a customer is demanding an explanation and enhancement on the tx_timeout parameter. Come to think of it, when will it work? only for Exchange? (found some hints on this in metalink).
    But still, is there no other way to immediately know if the port has opened or not?
    I will try the following: http://www.oraclenerd.com/2008/11/javaplsql-port-scanner-ii.html , but still would prefer a PL/SQL solution though.
    Many Thanks,
    Henry Wu

  • Connection refused--while executing (HttpConnection) Connector.open(url);

    Hi,
    i'm using netbeans mobility 5.0
    as i was new to this mobile programming i'm getting the output as "Connection Refused"
    plz plz plz plz....... help me out from this problem
    here is my code..
    code:_
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.io.*;
    import java.io.*;
    public class FileViewer extends MIDlet implements CommandListener
    private Display display; // Reference to Display object
    private TextBox tbViewer; // View file contents in a textbox
    private Command cmView; // Command to view file
    private Command cmExit; // Command to exit
    private String url = "http://www.corej2me.com/midpbook_v1e1/scratch/fileViewer.hlp";
    public FileViewer()
    display = Display.getDisplay(this);
    // Define commands
    cmView = new Command("View", Command.SCREEN, 2);
    cmExit = new Command("Exit", Command.EXIT, 1);
    tbViewer = new TextBox("Viewer", "", 250, TextField.ANY);
    tbViewer.addCommand(cmView);
    tbViewer.addCommand(cmExit);
    tbViewer.setCommandListener(this);
    public void startApp()
    display.setCurrent(tbViewer);
    private void viewFile() throws IOException
    HttpConnection http = null;
    InputStream iStrm = null;
    try
    http = (HttpConnection) Connector.open(url);
    // Client Request
    // 1) Send request method
    http.setRequestMethod(HttpConnection.GET);
    // 2) Send header information (this header is optional)
    http.setRequestProperty("User-Agent", "Profile/MIDP-1.0 Configuration/CLDC-1.0");
    // 3) Send body/data - No data for this request
    // Server Response
    // 1) Get status Line
    System.out.println("Msg: " + http.getResponseMessage());
    System.out.println("Code: " + http.getResponseCode());
    // 2) Get header information
    if (http.getResponseCode() == HttpConnection.HTTP_OK)
    // 3) Get data (show the file contents)
    iStrm = http.openInputStream();
    int length = (int) http.getLength();
    if (length > 0)
    byte serverData[] = new byte[length];
    iStrm.read(serverData);
    tbViewer.setString(new String(serverData));
    finally
    if (iStrm != null)
    iStrm.close();
    if (http != null)
    http.close();
    public void pauseApp()
    public void destroyApp(boolean unconditional)
    public void commandAction(Command c, Displayable s)
    if (c == cmView)
    try
    viewFile();
    catch (Exception e)
    System.out.println(e.toString());
    else if (c == cmExit)
    destroyApp(false);
    notifyDestroyed();
    output*
    build.xml(debug)*
    some....
    Application descriptor does not declare any MIDlet. Direct execution is not allowed.
    Generated "C:\Documents and Settings\Lakshmi Narayan J\jlnexample\dist\jlnexample.jar" is 2655 bytes.
    post-jar:
    debug:
    C:\Documents and Settings\Lakshmi Narayan J\jlnexample\src\.timestamp
    Starting emulator in debug server mode on port 1469
    com.sun.kvem.midletsuite.InvalidJadException: Reason = 22
    The manifest or the application descriptor MUST contain the attribute: MIDlet-1
    nbdebug:
    KdpDebugTask connecting to debugger 1 ..
    KdpDebugTask connecting to debugger 2 ..
    KdpDebugTask connecting to debugger 3 ..
    KdpDebugTask connecting to debugger 4 ..
    KdpDebugTask connecting to debugger 5 ..
    Connecting JPDA Debugger to emulator timed out after 5 attempts and 31 seconds.
    C:\Documents and Settings\Lakshmi Narayan J\jlnexample\nbproject\build-impl.xml:306: The following error occurred while executing this line:
    C:\Documents and Settings\Lakshmi Narayan J\jlnexample\nbproject\build-impl.xml:311: Connecting JPDA Debugger to emulator timed out after 5 attempts and 31 seconds.
    BUILD FAILED (total time: 43 seconds)
    Debugger console:
    Attaching to localhost:1469
    Connection refused.
    Edited by: LAKSHMI_NARAYAN_J on Jun 23, 2008 9:54 AM

    It's called potential deadlock. The emulator blocks your app 'cause any connection and commandAction needs its own thread. So I suggest use a new thread with this http connection then your program will be run successful.

  • Unable to open file in emulator using Connector.open()

    This is my code (run on emulator) used to open a file located in the dir: C:\WTK25\appdb\DefaultColorPhone\filesystem\root1
    /**************************************CODE***********************************/
    FileConnection fileConn = (FileConnection)Connector.open("file:///root1/" fileName, Connector.READ);
    if(!fileConn.exists())
    System.out.println("File not found");
    else
    System.out.println("File opened");
    /**************************************CODE***********************************/
    I always get the o/p as "File Not Found" although there exists a .txt file in the directory /root1. What is to be done to open file on emulator? Please give suggestions...
    Message was edited by:
    Chintan.Kanal
    Message was edited by:
    Chintan.Kanal

    i m not sure but i hope this one is right 4 u......
    StringBuffer buff = new StringBuffer();
    InputStream istr = getClass().getResourceAsStream("/CLM.txt");
    for(int i=0 ; ; i++) {
    try {
    if(istr != null) {
    someByte = istr.read();
    if(someByte == -1) {
    buff.append("*");
    clmcontent = buff.toString();
    break;
    buff.append((char)someByte);
    } else {
    // do some necessary
    } catch(IOException ioe) {
    }

  • How to change timeout parameter value in Oracle 10g R2

    Anyone knows how to change timeout parameter value in Oracle 10g Database R2?

    Waheed Azhar wrote:
    actually i am getting ORA-01013 exception which directly relates to the timeout value but i think it's hidden parameter...What makes you think it's a hidden parameter?
    A search of MetaLink for that error turns up a number of hits, most of which a very situational specific. Exactly what are you doing when you get this error? Are you connecting over an ODBC connection? Are you getting it on a connection request? At db shutdown? During a long-running query?

  • Timeout parameter in Mail communication channel?

    Dear All,
    Can someone tell me if there is a option to put a timeout parameter in Mail PI channel like it is in File channel? One of my FTP channel used to stop polling abruptly, but using this parameter I fixed this problem completely. Now facing a same problem with one of the Mail channel.
    Thanks in advance for your response!.
    Best Regards,
    Kumaran

    Dear Ramesh & Bhavanishankar,
    Thanks for your response!.
    My concern is basically about the mail channel that stopped polling the source folder while the status says "Active". Due to this the interface is totally stopped working in PI and it starts working only when I restart the channel in CC monitoring.
    But yes, I have fixed this issue earlier for a diff mail channel by setting a restart every day (work around) using ATP. This really worked. But I cannot do this for every channel in my server.
    Best Regards,
    Kumaran

  • Timeout Parameter

    Hi Guys,
    I fi want to increase the time out parameter for the ODI to database connection, shall i have to increase it from 30 sec to a minute, where should i put it.

    The Oracle Data Integrator Timeout parameter is set in the ODI Designer and Operator tool menu bar from File > User Parameters.
    The default value is 30 seconds.
    Modifications of these "User Parameters" only impact the local ODI client on which the modifications have been performed. This is to say, the local "userpref.xml" file which is present in the local installation of ODI from which the GUI (Designer, Operator...) has been launched.
    If it is necessary to propagate these modifications to other ODI set ups (including Agents or not), then:
    * The local (modified) "userpref.xml" file must be copied to the appropriate, remote ODI "/bin" folder and
    * The ODI processes must be stopped and relaunched.

  • Increasing the timeout parameter in ODI

    Hi,
    I have got 7000 error code in a step while executing the scenario.
    I have found out it may be time out error and it can be resolved by changing the timeout parameter in ODI(File->Userparameter->Oracle Data Integrator Timeout)
    Is there any maximum limit for this timeout parameter? After changing this, should i restart the ODI server?
    Can anyone suggest me quicly please?
    Am i proceeding correctly for this 7000 error code?

    Hi,
    Please post this question in the ODI forum:
    Data Integrator
    Thanks, Mark

  • Is there any query timeout parameter in oracle

    Hi everybody,
    Is there any timeout for sql queries in oracle,  if so what is the timeout parameter. I googled internet, but couldn't find an answer. Any help is appreciated.
    Thanks

    You can create a profile that limits certain things:
    http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_6010.htm

  • Timeout parameter in standalone oracle calendar 10.1.2

    I'm trying to locate the timeout parameter in oracle calendar 10.1.2. I have a standalone version. Any help would be appreciated.
    Thanks.

    Assuming you are talking about the timeout value for the web interface, it is in the {installdir}/ocas/conf/ocwc.conf file. The parameter you want to change is ssn_timeout. I believe you will need to restart ocas to make it effective.

  • Unable to read file using Connector.open

    I have written following code to display contents of file on mobile but it is not working and displays nothing.
    Please Tell me where i am wrong.
    FileConnection conn;
    InputStream ip;
    StringBuffer str=new StringBuffer();
    public void startApp() {
    display = display.getDisplay(this);
    form = new Form("Hello World");
    display.setCurrent(form);
    try {
    openFile();
    } catch (IOException ie) {
    public void openFile() throws IOException {
    try {
    conn = (FileConnection)Connector.open("file:///C:/hello.txt");
    ip = conn.openInputStream();
    while ((ch = ip.read()) != -1) {
    str.append((char) ch);
    form.append(new String(str));
    display.setCurrent(form);
    } catch (IOException ie) {
    Thanks.

    Yogesh,
    Please next time paste the code using *{ c o d e }*.
    Don't swallow exceptions, but print StackTrace and see, what is happening.
    Daniel

  • JCO timeout parameter?

    Dear all,
    We are trying to change a timeout parameter for JCO connections. We use ESS-MSS on our portal and when a user leave it without using the log off process, the system keep some RFC connections during one hour. We would like to keep those connections during only 30 minutes. Do you know how to proceed? Is there any parameter to change? 
    Please note that according to the note 947376 we know that 6 jco metadata connections are always alive to improve performance. But there are some others (for the users) that we would like to close automaticaly after 30 minutes.
    Many thanks for your help!
    Best regards,
    Olivier

    Hello Guys,
    Thank you very much for your answer. Is there a way to close all JCO connections automaticaly from the abap or java stack or should I set a timeout for each JCO?
    Thanks in advance,
    Olivier

  • SCCM 2012 - PXE-E32: TFTP Open timeout

    Hi
    When I trying deploy through PXE in the vmware workstation 10.0, I'm getting the error below
    Error: PXE-E32: TFTP Open timeout
              TFTP....
    The machine got the IP addresss and I'm stop in below error
    Client MAc ADDR: 00 0C 29 6C 3F   GUID: xxxxxxxxxxxxxxx
    Client IP : 192.168.100.15    MASK: 255.255.255.0   DHCP IP : 192.168.100.254
    GATEWAY IP:  192.168.100.1     192.168.100.2
    PXE-E32: TFTP Open timeout
    TFTP....
    Robert

    Hi
    I'm getting this error in the SMS PXE logs   " device is not in the database" and "device is in the database" . Even the device in the database I'm getting the same error
    step that I did:
    a. Manually Adding the Device the MAC
    b. Manually Adding the Device the MAC  and the GUID
    c. Advertise in the "Uknown Computer"   and Advsertise in the "TEST Collection" where I added the MAC address and gUID
    Please find below the error
    <![LOG[Begin validation of Certificate [Thumbprint 9733001C4F488EE84A86A2DC81479F7D3262A9C3] issued to '8d4012f3-7252-4e85-891a-b4ff4421a1e4']LOG]!><time="07:48:03.370-240" date="10-28-2013" component="SMSPXE" context=""
    type="1" thread="5608" file="ccmcert.cpp:1245">
    <![LOG[Completed validation of Certificate [Thumbprint 9733001C4F488EE84A86A2DC81479F7D3262A9C3] issued to '8d4012f3-7252-4e85-891a-b4ff4421a1e4']LOG]!><time="07:48:03.370-240" date="10-28-2013" component="SMSPXE" context=""
    type="1" thread="5608" file="ccmcert.cpp:1386">
    <![LOG[Client lookup reply: <ClientIDReply><Identification Unknown="0" ItemKey="0" ServerName="" ServerRemoteName=""><Machine><ClientID/><NetbiosName/></Machine></Identification></ClientIDReply>
    ]LOG]!><time="08:11:12.534-240" date="10-28-2013" component="SMSPXE" context="" type="1" thread="4100" file="libsmsmessaging.cpp:6363">
    <![LOG[00:0C:29:6C:3F:1D, 08544D56-DCF7-D4D5-D1CC-409FCF6C3F1D: device is not in the database.]LOG]!><time="08:11:12.534-240" date="10-28-2013" component="SMSPXE" context="" type="1" thread="4100"
    file="database.cpp:483">
    <![LOG[Client lookup reply: <ClientIDReply><Identification Unknown="0" ItemKey="16777335" ServerName="" ServerRemoteName=""><Machine><ClientID/><NetbiosName/></Machine></Identification></ClientIDReply>
    ]LOG]!><time="08:20:49.266-240" date="10-28-2013" component="SMSPXE" context="" type="1" thread="4100" file="libsmsmessaging.cpp:6363">
    <![LOG[00:15:B7:D2:86:F0, 80222D0B-0F4C-DC11-8052-B05987052608: device is in the database.]LOG]!><time="08:20:49.266-240" date="10-28-2013" component="SMSPXE" context="" type="1" thread="4100"
    file="database.cpp:483">
    <![LOG[Client boot action reply: <ClientIDReply><Identification Unknown="0" ItemKey="16777335" ServerName="" ServerRemoteName=""><Machine><ClientID/><NetbiosName/></Machine></Identification><PXEBootAction
    LastPXEAdvertisementID="" LastPXEAdvertisementTime="" OfferID="" OfferIDTime="" PkgID="" PackageVersion="" PackagePath="" BootImageID="" Mandatory=""/></ClientIDReply>
    ]LOG]!><time="08:20:49.438-240" date="10-28-2013" component="SMSPXE" context="" type="1" thread="4100" file="libsmsmessaging.cpp:6561">
    <![LOG[00:15:B7:D2:86:F0, 80222D0B-0F4C-DC11-8052-B05987052608: no advertisements found]LOG]!><time="08:20:49.438-240" date="10-28-2013" component="SMSPXE" context="" type="1" thread="4100"
    file="database.cpp:483">
    <![LOG[Begin validation of Certificate [Thumbprint 9733001C4F488EE84A86A2DC81479F7D3262A9C3] issued to '8d4012f3-7252-4e85-891a-b4ff4421a1e4']LOG]!><time="08:48:03.366-240" date="10-28-2013" component="SMSPXE" context=""
    type="1" thread="7916" file="ccmcert.cpp:1245">
    <![LOG[Completed validation of Certificate [Thumbprint 9733001C4F488EE84A86A2DC81479F7D3262A9C3] issued to '8d4012f3-7252-4e85-891a-b4ff4421a1e4']LOG]!><time="08:48:03.366-240" date="10-28-2013" component="SMSPXE" context=""
    type="1" thread="7916" file="ccmcert.cpp:1386">
    <![LOG[Client lookup reply: <ClientIDReply><Identification Unknown="0" ItemKey="16782654" ServerName="" ServerRemoteName=""><Machine><ClientID/><NetbiosName/></Machine></Identification></ClientIDReply>
    ]LOG]!><time="09:04:30.956-240" date="10-28-2013" component="SMSPXE" context="" type="1" thread="4100" file="libsmsmessaging.cpp:6363">
    <![LOG[00:0C:29:6C:3F:1D, 08544D56-DCF7-D4D5-D1CC-409FCF6C3F1D: device is in the database.]LOG]!><time="09:04:30.956-240" date="10-28-2013" component="SMSPXE" context="" type="1" thread="4100"
    file="database.cpp:483">
    <![LOG[Client lookup reply: <ClientIDReply><Identification Unknown="0" ItemKey="0" ServerName="" ServerRemoteName=""><Machine><ClientID/><NetbiosName/></Machine></Identification></ClientIDReply>
    ]LOG]!><time="09:11:12.094-240" date="10-28-2013" component="SMSPXE" context="" type="1" thread="4100" file="libsmsmessaging.cpp:6363">
    <![LOG[00:0C:29:06:F4:5C, 06494D56-AB1D-1748-BEC0-E4A5B906F45C: device is not in the database.]LOG]!><time="09:11:12.094-240" date="10-28-2013" component="SMSPXE" context="" type="1" thread="4100"
    file="database.cpp:483">
    <![LOG[Client lookup reply: <ClientIDReply><Identification Unknown="0" ItemKey="16782654" ServerName="" ServerRemoteName=""><Machine><ClientID/><NetbiosName/></Machine></Identification></ClientIDReply>
    ]LOG]!><time="09:11:23.420-240" date="10-28-2013" component="SMSPXE" context="" type="1" thread="4100" file="libsmsmessaging.cpp:6363">
    <![LOG[00:0C:29:6C:3F:1D, 08544D56-DCF7-D4D5-D1CC-409FCF6C3F1D: device is in the database.]LOG]!><time="09:11:23.435-240" date="10-28-2013" component="SMSPXE" context="" type="1" thread="4100"
    file="database.cpp:483">
    Robert

  • PXE error = PXE-E32: TFTP open timeout

    Hi Everyone,
    I have a switched network using CISCO switches and also CISCO CNR(Cisco Network Register 6.1) acting as DHCP on my network. I modified the policies for the scope where my clients are connected using PXE to obtain the SCCM and WDS images and i'm having the following error
    "PXE error = PXE-E32: TFTP open timeout"
    The networking guy told me that the clients using DHCP never tries to connect to the TFTP server on my SCCM and WDS server that are running on a different box than the CNR 6.1.
    Also i set the following parameters on my scope policy at the CNR 6.1 to the network segment where the clients are connected:
    [011]  resource-location-server                        <ip address of my WDS & SCCM server>
    [067] boot-file                                                     <name of my .WIM image>
    [066] tftp-server                                                  <FDQN of my WDS  & SCCM server>
    If there's more options to set in order to achieve the download of the images from the WDS & SCCM server?
    Could someone help?
    I'll appreciate your comments,
    Cordially,
    Oscar.

    Hello,
    I just accidentally dropped in, searching for the name of the bootfile, that was explained here as SMSBoot\x86\wdsnbp.com. What is important with PXE and tftp is to understand the process, which is actually quite simple. You pass the name of the bootserver and the boot filename bye one of two methods. It is either done through Proxy DHCP, which is implemented on your SCCM server. For this towork, you do not need any changes to your DHCP scope, but you have to add a DHCP helper (also called DHCP relay or BOOTP relay) to the router that you use for the CLIENT segment. The DHCP helper has to point to the WDS/SCCM server. Do not remove any DHCP helpers that are already in the TCP segment.
    If this is not an option, you have to go the way that you currently are, and specify options 66 and 67, which point to the server and the bootloader (not the WIM-file) on your SCCM server. This has to be specified relative to the root path of the tftp service on your machine, so the value Kenneth suggested, SMSBoot\x86\wdsnbp.com seems correct. (I don't really know SCCM, but I really do know PXE :-) )
    To test tftp:
    1. From the client to the server: Download a tftp client (if you run Vista, it can be installed as a feature) and try to download the file. the command should be *similar* to "tftp get SMSBoot\x86\wdsnbp.com"
    2. From the server to the client: Disable Microsoft's tftp server and install a freeware/shareware tftpserver that implements logging. Configure the tftp server to use the same directory that Microsoft's tftp server uses. Start tftp server and check the real-time log to see what is going on
    Using these methods, you should normally find out quite explicitly what is wrong with your setup :-)
    Regards,
    Ole Kristian

Maybe you are looking for

  • How to delete the number saved in CALL FORWARDING list?

    how to delete the number saved in CALL FORWARDING list? seems like the number cannot be deleted in CALL FORWARDING list, i tried several times... he thing is, here are three numbers in the call forwarding list, one of them were set up by mistake, and

  • Info about post installation - erp 6

    hi to everyone... i have finished intallation of erp 6 ids.. and im looking for some pdf that includes all the informetion about the post instalation of a system thing like: registretion logical system stms post install xyz system copy client sp and

  • File keeps downloading on my home page,rpc-1.html

    when I log onto comcast, it keeps downloading a file. (file:///C:/users/tina/AppaData/LocalTemp?rpc-1.html. how do I stop it

  • Why do I keep having to reset my password?

    Please help.  I have to change my password for icloud almost every time I check my mail in the morning on my ipad, and every time I log into itunes on my pc (windows 8.1).  I have had to reset every day.  I had to change it again an hour ago and then

  • INCONSISTANCE CURRENCY INFORMATION

    HI FRIENDS               WHEN I AM POSTING TR6 CHALLAN THROUGH J1IH TRANSACTION CODE-HERE AFTER ENTERING DOCUMENT NO & PROCEEDING FOR SAVING SYSTEM IS GIVING THIS ERROR. THE DETAILS OF THE ERROR IS GIVING BELOW- Inconsistent currency information Mess