Trap the connection in j2me

hi all
i m new on j2me plateform.
my question is that ,can we trap the event of connection ,when we call any number from j2me application. is there any method to trap that call has connected or not.
thanks before.

No, there is currently no way to do that!

Similar Messages

  • FTP connection in J2ME

    Hi All,
    can anyone tell me is FTP connection in J2ME possible or not? If it is possible, how it is possible?
    Mahabub

    AFAIK at present there is no FTP API's avalable from J2ME/MIDP front that you can use to establish an FTP connection.
    Meanwhile I have a pretty easier solution for you. You can use Jakarta Commons Net API's at the App server end to communicate to the intended FTP server by means of Servlet so that you can form an Http response as per your requirements. for e.g.:- you issue ftp command from J2ME client and pass it over http to the Servlet residing in your app server. internally the web-tier component establishes the link to the FTP server and responds appropriately based on the issued commands.
    You can also use a telnet client that uses socket communications but the approach mentioned above I rekon would be a feasible one bcause the Usability matters the most when it comes to Mobile applications.
    Hope this information helps.
    ~Mohan

  • HTTP connection in J2me

    hi,
    am developing a J2ME application that invokes a servlet on a remote computer using a MIDlet on the Sony ericsson P800...it uses HTTP connection, i tried running it on emulator and its working fine...
    now when i put the jar file on the actual phone (P800), what changes do i need to make in my MIDlet to establish an HTTP connection...because the phone will use its internet connection, so will it be able to access the remote computer if i just give its IP address?
    For emulators, my J2me sdk was on one computer and server on another...both computers were on LAN, so establishing a HTTP connection was easy, but from cell phone to remote computer, how will i establish an http connection? Please help me..its very important

    hi am not sure, but u didn.t send what tool u are using to create the application. in j2me there is an option in setting in which u can set the proxies and connection details for ur application... do check them and reply if they works..

  • Connecting to j2me through http

    I have seen several examples of connecting j2me app to a server, but is it possible to connect to j2me app from server? If yes, can somebody point me to any references
    Thanks

    i dotn think so that is possible
    you need to have some reference of client application to connect it from the server!
    [email protected]

  • HOW TO IDENTIFY WHILE THE CONNECTION IS DISCONNECTED?

    IN POP3 EMAIL CLIENT USING J2ME
    HOW TO IDENTIFY WHILE THE CONNECTION DISCONNECTED IN RUNNING APPLICATION.
    AND HOW TO EXIT, WHILE THE CONNECTION IS DISCONNECTED.
    THANKS IN ADVANCE
    edward

    WHEN YOU TRY TO USE THE CONNECTION THAT IS CLOSED, YOU'LL GET AN IOEXCEPTION. TO CHECK THIS, YOU'LL HAVE TO DO SOMETHING LIKE POLLING IF THE OTHER SIDE IS STILL LISTENING BY SENDING IT AN ACK MESSAGE AT SPECIFIC INTERVALS. IF YOU GET AN EXCEPTION, THE CONNECTION WAS CLOSED.

  • Checking the CustomItem in j2me support traversal or not?

    Hi,
    Checking the CustomItem in j2me support traversal or not?
    How should i check the CustomItem in j2me support traversal or not.
    Thanks & Regards, Sivakumar.J

    The article mentions the iMac with Thunderbolt, and then it mentions the 27-inch iMac with Mini DisplayPort, which are the Late 2009 and Mid 2010 computers. As I told you, Mid 2011 and Late 2012 21'5-inch iMacs have Thunderbolt, so they support Thunderbolt. Have a look at this forum.
    leona0123 wrote:
    I was told that if I connected the two computers, that I would only be able to transfer data between them, and the displays would not be connected in any way.
    You can connect a Thunderbolt Mac to the Thunderbolt iMac for both things, but you need to follow additional steps:
    To enable Target Display mode: press Command and F2 keys on the iMac.
    To enable Target Disk mode (transfer files between Macs without Migration Assistant): hold the T key while your iMac or the other computer is starting

  • Smtp connection in j2me

    hi all
    can any body plz tell me abt how to create smtp connection using j2me coz midp 1.0 supports only httpconnection i have to make an applocation as my univ project which will send mail to a mail server can anybody help me? plz
    is it feasible to make streamconnection or contentconnection to transfer mails......other than socker connection...coz my device dont suuport socket connection of midp2.0
    hoping for reply...
    aqeel

    StreamConnection connection;
    InputStreamReader _in;
    OutputStreamWriter _out;
    try {
    connection = (StreamConnection)Connector.open("socket://my.mailserver.com ":25");
    _in = new InputStreamReader(connection.openInputStream());
    _out = new OutputStreamWriter(connection.openOutputStream());
    That should do it to get you the connection and in/out streams. You connect to smtp server on port 25. Now you need to compose your message content to send out...
    _out.write(email data);
    and read responses from smtp server...
    _in.read(...);
    There's lots on the web if you search for "java smtp port 25"
    Eric

  • How to know the connected users to the Content Server Instance?

    Hello
    I need to know that in order to be able to run long tasks (specially with the archiver) in the lowest used hours. The number of connected contributors really represents the true use of the CS.
    I am lookin for this for 10g (UCM) and 11g (WCC)
    Thank you
    Carlos

    You could use some statistics such as netstat from the Apache web server (see e.g. here for more details). You could also use tools such as Google Analytics to monitor website traffic for you.
    However, even though there is certainly a correlation between the number of the connected users and the workload on the server, the real workload depends rather on the number and the type of operations that has to be performed (e.g. a checkin is more costly than just displaying a page, conversions might be more costly than anything else) and a single system user (such as running the Archiver some other batch processes) could produce much higher workload (due to missing waiting time) than a hundred of human users.
    Besides, the fact that at the moment the number of users is low does not necessarily mean that it will be low until the end of your batch job - unless you know the behavior of your users, which often is not a rocket science even without any analytic tool - e.g. a public organization operation in 5x8 working regime (let's say from 8am to 6pm) won't produce much human generated workload in quiet hours on week days or on weekends. If you operate in 7x24 mode with unpredictable user's behavior, none of such tools will help you anyway.
    Because, what you really need to monitor is not web stats, but user experience. Oracle has a tool for that - it's called Real User Experience Insight. In addition to monitoring, it can alert you, or your application (even a 3rd party via SNMP traps). If you want to automate also recovery (for 11g), you could expose private cloud functionality as available in via the Enterprise Manager and management packs - e.g. you could start a new server in the cluster, throttle resource to your batch jobs, etc. Unless you need to comply with strict SLAs, this kind of a solution would probably be an overkill, but it is possible.
    This reasoning also shows what questions you should ask to choose the right solution - if no one cares that the performance goes, why should you? If someone cares, you will know how big problem it is - you may just add a new node to the cluster to increase the performance, use free tools or your common sense to re-organize the batch jobs to distribute the workload more evenly, or if it is a real issue, you may search for some sophisticated enterprise-level solution.

  • Establishing serial port connections through J2ME

    Respected Friends,
    I wanted to establish a connection with the serial port through my J2ME application.I am writting the following code it compiles(build) successfully but it is throwing exception which means that the Sun's J2ME wireless toolkit does'nt supports serial port connection,can any one please tell me the reason why the toolkit is not supporting serial port and if there is any mistake in the code what is it,I am using J2ME Wireless toolkit 1.0(Version 1.0) the code is as follows:
    import javax.microedition.lcdui.*;
    import javax.microedition.io.*;
    import javax.microedition.midlet.*;
    import java.io.*;
    public class TestSerial extends MIDlet implements CommandListener
    Form form1;
    TextField tf1;
    Display disp1=null;
    Command command1;
    StreamConnection sc;
    OutputConnection oc;
    Connection connection1;
    /****************************DefiningConstructor*****************************/
    public TestSerial()
    disp1=Display.getDisplay(this);
    command1=new Command("Start",Command.OK,1);
    form1=new Form("Serial Port Connection");
    form1.addCommand(command1);
    form1.setCommandListener(this);
    public void startApp()
    disp1.setCurrent(form1);
    public void pauseApp()
    public void destroyApp(boolean b)
    public void commandAction(Command c,Displayable d)
    if(c==command1)
    try
    /************Establishing serial port connection****************/
    connection1= Connector.open("comm:0;baudrate=9600");
    connection1.close();
    catch(Exception e)
    System.out.println(e.toString());
    }Please mail your precious suggestions regarding this problem as soon as possible.
    Thanking You,
    Taqi Raza.

    I am not sure about sun wireless toolkit 1.0,
    check the settings, -> permissions... (We have this in sun wireless toolkit 2.3, where i can set the security options)
    Hope it helps...

  • Trap The Duplicate Logging On FMS, LoggOff Old One And Accept New Instance.

    Hi All,
    I need help on the following topic of FMS 2.0.
    On FMS Server I want to trap the duplicate logging, Logoff
    Old One and accept New Instance.
    The scenario is like this, if a user logged in with the name
    wins” on FMS Application from his Office, after some
    time he came to his home and want to logging again.
    I want to disconnect or logoff the instance of application
    which is logged in from his Office and allow him to logging from
    his home.
    Actually I want to implement the functionality like
    Yahoo messenger.
    Yahoo messenger gives the facility to login from another
    system and logoff the previous instance.
    So, tell me what I have to do to achieve this.
    Thanks

    onAppStart intitialize an object to hold all connected
    clients, maybe called userList:
    application.onAppStart = function(){
    this.userList = {};
    Then when someone logs in, they of course pass in their
    username. Simply put that client in userList by its username.
    application.onConnect = function(newClient, username){
    this.acceptConnection(newClient);
    this.userList[username] = newClient;
    Then you can easily modify that code to boot the old client
    if that username is already in use:
    application.onConnect = function(newClient, username){
    if(this.userList[username]){
    this.disconnect(this.userList[username]);
    this.acceptConnection(newClient);
    this.userList[username] = newClient;
    See if that works for ya.

  • "Failed to open the connection" problem related to multiple tables in the report?

    Post Author: Gadow
    CA Forum: Data Connectivity and SQL
    System specifics:
    Web environment using ASP.Net 2.0 (from Visual Studio 2005 Professional)
    Crystal Reports 2008, v. 12.0.0.549, Full
    We have set up the following method for displaying reports via our website:
    User is sent to a report-specific page. The user is given some filtering options specific to the report that will be viewed. When the user has specified the data filters, the user clicks a button.
    The page wraps up the report parameters -- selection query, formula values, report location, the name to be displayed, etc. -- into a class which gets put into the Session object.
    The page redirects to DisplayReport.aspx. ALL reports redirect to this page.
    DisplayReport.aspx retrieves the report parameters from Session. A ReportDocument object is created and loaded, then set with the data from the parameters class.
    A ConnectionInfo object is created and set with the relevant log on credentials. All of the reports draw from the same database, so the connection information is hard-coded as the same for all reports. The page then iterates through all of the tables in the Database.Tables collection of the ReportDocument and calls ApplyLogOnInfo to each table using the ConnectionInfo object.
    The page is rendered and the user gets the filtered report.
    We currently have seven reports. Five reports work fine and display the correctly filtered data with no error messages. Two reports generate a Failed to open the connection error and do not display. I have verified that the queries being sent to DisplayReport.aspx are valid, and as I said the connection information itself is hard-coded in the one page that displays the reports and this is identical to all reports.
    The five reports that do work all have a single data table, either an actual database table or a single view. The two reports that do not work all have multiple tables. As far as I can tell, this is the only difference between the sets; all seven reports are based on the same DSN and I have verified the database on all of the reports. All of the reports were written using Crystal Reports 8, and all of the reports display fine in a Windows app I wrote some years ago using Crystal Reports 8. Again, the only difference between those reports that do work and those that do not is the number of tables used in the report: one table or view in the reports that display, more than one table (tables only, none use views) in the reports that do not display.
    As for the code I am using, below are the relevant methods. The function MakeConnectionInfo simply parses out the components of a standard SQL connection string into a ConnectionInfo object. DisplayedReport is the ID of the CrystalReportViewer on the page.Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs)
            Dim o As Object = Session("ReportParams")
            Dim ReportURL As String = ""
            'Verify that there is a ReportParameters object
            If o Is Nothing OrElse o.GetType IsNot GetType(ReportParameters) Then 'Redirect to the error page
                Response.Redirect("/errors/MissingReport.aspx")
            End If
            ReportParams = CType(o, ReportParameters)
            'Verify that the report exists
            ReportURL = "/Reports/ReportFiles/" + ReportParams.ReportName
            ReportPath = Server.MapPath(ReportURL)
            If Not File.Exists(ReportPath) Then
                Response.Redirect("/errors/MissingReport.aspx?Report=" + ReportParams.ReportTitle)
            End If
            InitializeReport()       
        End Sub
        Protected Sub InitializeReport()
            Dim RD As New ReportDocument
            Dim CI As ConnectionInfo = MakeConnectionInfo(DB_Bonus)
            Dim RPF As CrystalDecisions.Shared.ParameterField = Nothing
            RD.Load(ReportPath)
            If ReportParams.SelectString <> "" Then
                Dim Adapt As New SqlDataAdapter(ReportParams.SelectString, DB_Bonus)
                Dim DS As New Data.DataSet
                Adapt.Fill(DS)
                RD.SetDataSource(DS.Tables(0))
            End If
            For Each kvp As KeyValuePair(Of String, String) In ReportParams.Formulas
                Dim FFD As FormulaFieldDefinition = Nothing
                Try
                    FFD = RD.DataDefinition.FormulaFields(kvp.Key)
                Catch ex As Exception
                    'Do nothing
                End Try
                If FFD IsNot Nothing Then
                    Select Case FFD.ValueType
                        Case FieldValueType.DateField, FieldValueType.DateTimeField
                            If IsDate(kvp.Value) Then
                                FFD.Text = String.Format("Date()", Convert.ToDateTime(kvp.Value).ToString("yyyy, MM, dd"))
                            Else
                                FFD.Text = "Date(1960, 01, 01)"
                            End If
                        Case FieldValueType.StringField
                            FFD.Text = String.Format("""""", kvp.Value)
                        Case Else
                            'For now, treat these as if they were strings. If things blow up here,
                            'we will need to add the appropriate formatting for the field type.
                            FFD.Text = String.Format("""""", kvp.Value)
                    End Select
                End If
            Next
            For Each T As CrystalDecisions.CrystalReports.Engine.Table In RD.Database.Tables
                Dim TLI As TableLogOnInfo = T.LogOnInfo
                TLI.ConnectionInfo = CI
                T.ApplyLogOnInfo(TLI)
            Next
            DisplayedReport.ReportSource = RD
        End Sub
    Does this approach not work with reports containing multiple tables, or is there something I'm missing? Any meaningful suggestions would be much appreciated.

    Dear Dixit,
    Please refer to the Crystal report landing page to get the details
    information about the support for crystal report issues.
    Please use the following thread to post your questions related to
    crystal report.
    SAP Business One and Crystal Reports
    Regards,
    Rakesh Pati
    SAP Business One Forum Team.

  • Can not create the connection in the enrironment!!

    hello,every one:
    please see the following code:
              Environment *env = Environment::createEnvironment(Environment::OBJECT);
              Connection *conn = env->createConnection(userName,password,connectString);
    try
    //use the conn
              catch (SQLException &ex)
                   env->terminateConnection(conn);
                   Environment::terminateEnvironment(env);
                   throw;//re-throw
              env->terminateConnection(conn);
              Environment::terminateEnvironment(env);
              Environment *ev = Environment::createEnvironment(Environment::OBJECT);
    //the program stopped here,display i can not create the new connection
              Connection *cn = ev->createConnection(userName,password,connectString);
              ev->terminateConnection(cn);
              Environment::terminateEnvironment(ev);
    I have terminated the connection and the environment,then why I can not create the
    connection in the new environment?
    I have tried several times,if you connect the same database as the former,then it
    does not work,but if you connect a new database ,it can create the new connection!
    plus:I don't want to use conection pool .
    Can I have some method to solve the problem?
    Please help me!
    Thanks a lot in advance!
    tony from China

    Hi Tony,
    This similar sample works perfectly fine for me. Can you
    retry with this?
    #include <iostream>
    #include <occi.h>
    using namespace std;
    using namespace oracle::occi;
    int main()
            Environment *env = Environment::createEnvironment(Environment::OBJECT);
            Connection *conn = env->createConnection("scott","tiger","inst1");
            try
            //use the conn
            catch (SQLException &ex)
                    env->terminateConnection(conn);
                    Environment::terminateEnvironment(env);
                    cout<<ex.getMessage();
            env->terminateConnection(conn);
            Environment::terminateEnvironment(env);
            Connection *cn;
            Environment *ev;
            try{
            ev = Environment::createEnvironment(Environment::OBJECT);
            cn = ev->createConnection("scott","tiger","inst1");
            catch (SQLException &ex)
                    ev->terminateConnection(cn);
                    Environment::terminateEnvironment(ev);
                    cout<<ex.getMessage();
            ev->terminateConnection(cn);
            Environment::terminateEnvironment(ev);
    }Rgds
    Amogh

  • The connection to the server has been lost

    The Connection to the server has been lost.There might have been a problem in connection to the network, or Playstation TM networkor the service provider might be temprarily busy.(CE-34861-2) 

    im having the same problem its not letting me log in? 

  • Hyper-V could not replicate changes for virtual machine 'machinename': The connection with the server was terminated abnormally (0x00002EFE).

    I have a 3 node cluster that has replica setup to replicate to another cluster off-site.
    Suddenly one of the servers is not replicating with the error:
    Hyper-V could not replicate changes for virtual machine 'machinename': The connection with the server was terminated abnormally (0x00002EFE). (Virtual Machine ID CC0FD4CC-F9B7-4C68-ABE8-B7D52A87899F)
    All other servers are replicating fine so there cannot be a permissions or connectivity issue between the 2 clusters.
    This server has 2TB of data so I'd rather not have to start the replication again.
    Does anyone have any pointers?
    Thanks.

    Hi drensta,
    Based on my knowledge , "hyper-v replica broker " is needed for failover cluster replica .
    Here is a link for "Why is the "Hyper-V Replica Broker" required?"
    http://blogs.technet.com/b/virtualization/archive/2012/03/27/why-is-the-quot-hyper-v-replica-broker-quot-required.aspx
    Hope this hleps
    Best Regards
    Elton Ji
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Internet Download error message: the connection with the server has been reset

    With an WRT54GS v6 firmware v 1.50.9 on Windows XP SP2 with Internet Explorer 7, Intel wireless internal adaptor w/ 802.11b,  I was getting the error message "The connection with the server has been reset" when downloading most anything from the Internet.  My IP address would then be reset and download would be interrupted.  To resolve, I turned off the WZC (Wireless Zero Configuration) Services, and this seems to correct the problem.
    Control Panel > Admin Tools > Services > Wireless Zero Configuration > Disable
    Hopes this helps.

    Hi!
    Im using Windows 7.... I tried looking for the Wireless Config - but it isn't in the Services options!
    So, what can I do now?
    Thanx

Maybe you are looking for

  • Looking for a HAL mounting gkrellm plugin

    Hi, I've decided to finally look into using HAL to mount/umount devices. So I commented out the entries for cdrom and all my other removable devices I've had in /etc/fstab and now I'm looking for an app that lets me mount and unmount the devices My W

  • Enterprise Manager Console: Jobs stay at Submitted in the jobs panel.

    Hello, Like the title said, every time I try to backup/export a DB, the jobs get Submitted but the backup never occurs. When I try to delete those jobs, the status is set to Deleting and stays that way. I dugg around and found out It has something to

  • Connect PC to TV - video, but no au

    I just got a new Sony Bravia 26 inch LCD HDTV KDL-26S3000. I used a DVI to HDMI cable to connect and got video. But the problem is the audio. I bought a miniplug to miniplug audio cable and connected that from my Creative Labs Audigy 2 sound card (li

  • How to establish ebooks for automatic reading?

    I find some book can automatically reading,but i use ibooks author create book can't automatically reading. It lose Voice icon on top toolbar,it is not like other books can click open dialog by this icon,then control automatically or  manual turn pag

  • Non display of senders name on text messages

    Hi On my Nokia 1100 when I recieve a text from a contact in my address book, the phone DOES NOT display their name, only their number. How can I set the phone so that it displays names? Thanks!! Richard