Chat App. RMI or sockets?

I have to make a chat (client/server) application, and i'm asking you an advice. I'm new in Java. I looked for some info and i found that there are 2 ways for do that RMI or sockets.
Which is better? Please answer me.
If anybody can explain me(or give me a link) the difference between these techs.
Thanks a lot

The question is why are you making a chat program? If it's to learn, then do both :). If you do it with sockets you will create the "Protocol" between the client & server. If you do it with RMI you call methods on the server from the client or vise versa as if there was no network involved. You won't understand the answer to your question until you try both.

Similar Messages

  • JBoss + java.rmi.MarshalException: Socket timed out

    Hello.
    I'm not author of the software, I've just been transfered to try solve this problem:
    I've got an client application, an server app, JBoss, and Oracle DB.
    Now, when i try to create a big report in xls, which usually takes over 30minutes i get the exception:
    pl.wasko.serloc.DelegateException: Utracono po��czenie z serwerem.
    Spr�buj ponowi� operacj�
         at pl.wasko.mra.template.delegate.DocumentDelegate.unknownException(DocumentDelegate.java:74)
         at pl.wasko.mra.template.delegate.DocumentDelegate.exportToXls(DocumentDelegate.java:590)
         at pl.wasko.mra.client.task.ExportTemplateToFileTask.<init>(ExportTemplateToFileTask.java:71)
         at pl.wasko.mra.client.document.DocumentAdministration$11.construct(DocumentAdministration.java:447)
         at pl.wasko.mra.client.task.SwingWorker$2.run(SwingWorker.java:146)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: java.rmi.MarshalException: Socket timed out.  Waited 1800000 milliseconds for response while calling on InvokerLocator [socket://193.178.240.21:3873/]; nested exception is:
         java.net.SocketTimeoutException: Read timed out
         at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:302)
         at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:143)
         at org.jboss.remoting.Client.invoke(Client.java:525)
         at org.jboss.remoting.Client.invoke(Client.java:488)
         at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:55)
         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
         at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
         at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:55)
         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
         at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:65)
         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
         at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
         at $Proxy1.exportTemplateToXlsByteArray(Unknown Source)
         at pl.wasko.mra.template.delegate.DocumentDelegate.exportToXls(DocumentDelegate.java:581)
         ... 4 more
    Caused by: java.net.SocketTimeoutException: Read timed out
         at java.net.SocketInputStream.socketRead0(Native Method)
         at java.net.SocketInputStream.read(SocketInputStream.java:129)
         at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
         at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
         at java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2200)
         at java.io.ObjectInputStream$BlockDataInputStream.peek(ObjectInputStream.java:2490)
         at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2500)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1267)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
         at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:128)
         at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:66)
         at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:279)
         ... 18 moreProblem is that I'm not the author of this program, program is old, and the author learned on it, so it's code is illegible (I mean dificult to debug, and even read).
    I've only discovered that it uses Jasper to generate raport (I think so... I don't know), trace ended here:
    JasperConversion conv = new JasperConversion();                 
          JasperPrint jasperPrint = conv.createJasperPrint(template,params,searchCompileReport,userId, reportPagination);
          String test = System.getProperty("pl.wasko.mra.template.test");
          if(test != null && test.equals("1"))
            String tempDir = System.getProperty("jasper.reports.compile.temp");
            if(tempDir != null)
              conv.exportToPdfFile(jasperPrint,tempDir+"/test.xls");
          }I really don't ahve any ideas, I've tried to edit xml files on jboss - no result, properties files - the same, I was looking for something in the code to change timeout, but without results.
    Please, if anyone had similar problem, or have an idea, how to fix this, I will be very gratefull

    if you are using jboss 4+ and ejb3, ib believe you want to edit the "ejb3.deployer/META-INF/jboss-service.xml" file. you want to change the "InvokerLocator" attribure on the "jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3" mbean. it should currently look like "socket://${jboss.bind.address}:3873". you want to add a "timeout" attribute like "socket://${jboss.bind.address}:3873/?timeout=yourTimeoutHere", where "yourTimeoutHere" is your desired timeout in milliseconds.

  • How to create a chat app in flex

    I don't really know how chat apps work... how can you connect
    two computers directly?
    Or is it that chat messages are stored and retrieved from
    database?

    Check out this link:
    http://coenraets.org/blog/2006/10/building-collaborative-applications-with-flex-data-servi ces-and-flash-media-server/
    Tracy

  • Looking for a chat app to use offline in the same network

    Hi
    I want an offline app for my customers to download and use in our wireless network.
    This app shouldn't go online.
    Simply customers device will choose a nickname.
    With this nickname he/she will be chatting with people in same network.
    Preferably it will be a simple chatroom for everyone.
    There are so many chat apps. All talking to world. I want it just inside the hotel complex.
    Probably there should be a server side of this app (guessing)
    All your help is much appreciated.
    You might just let me know a paid, chat server, customisable, running on both android or ios.
    Probably a browser adress will be given to customers, than they log in and chat from there?

    Flex has a history manager (Flex 2) and deep linking feature
    (Flex 3).
    For more information see
    http://labs.adobe.com/wiki/index.php/Flex_3:Feature_Introductions:_Deep_Linking
    and
    http://livedocs.adobe.com/flex/3/html/deep_linking_1.html
    Peter

  • Video Chat App won't launch

    Hello,
    Recently, my video chat app has stopped working. It will not launch, instead displaying a dialogue box that says, "error-services-failed (30000)" 
    It does not seem to matter which wifi network I am connected to. I have reset the device with no improvement, as well as upgrading to the latest OS. 
    Any recommendations?
    Thanks. 

    connect your playbook to desktop manager and update it if its updated then repair it

  • Any cross platform chat app (eg. Whatsapp) for Ash...

    Hello,
    Does anyone know any cross platform chat app which can be used on Asha 501? I bought the phone today and I was only able to find Nokia Chat which is preinstalled on the phone but that app is not available on android.
    Any help regarding this?
    Thanks.
    Solved!
    Go to Solution.

    PrakashGupta wrote:
    can any one tell whatsapp application supports for nokia asha 501?
    Hello !  Please  tell me the battery life  ,  is very good ? 

  • What is the advantage of using RMI over socket connection

    plz tell me guys what is the advantage of using RMI over socket connection bcoz inherently RMI also uses socket connection.so what is the exact difference in between thm and what is the advantage of using RMI over socket connection.

    i knew tht bt i http://www.catb.org/~esr/faqs/smart-questions.html#writewell
    How To Ask Questions The Smart Way
    Eric Steven Raymond
    Rick Moen
    Write in clear, grammatical, correctly-spelled language
    We've found by experience that people who are careless and sloppy writers are usually also careless and sloppy at thinking and coding (often enough to bet on, anyway). Answering questions for careless and sloppy thinkers is not rewarding; we'd rather spend our time elsewhere.
    So expressing your question clearly and well is important. If you can't be bothered to do that, we can't be bothered to pay attention. Spend the extra effort to polish your language. It doesn't have to be stiff or formal — in fact, hacker culture values informal, slangy and humorous language used with precision. But it has to be precise; there has to be some indication that you're thinking and paying attention.
    Spell, punctuate, and capitalize correctly. Don't confuse "its" with "it's", "loose" with "lose", or "discrete" with "discreet". Don't TYPE IN ALL CAPS; this is read as shouting and considered rude. (All-smalls is only slightly less annoying, as it's difficult to read. Alan Cox can get away with it, but you can't.)
    More generally, if you write like a semi-literate b o o b you will very likely be ignored. So don't use instant-messaging shortcuts. Spelling "you" as "u" makes you look like a semi-literate b o o b to save two entire keystrokes.

  • [Solved] How to make Jabber chat apps work on Noki...

    I had a problem with any third-party chat apps not being able to connect to the network.
    Nokia Asha 210 Dual Sim - Chat apps fail to connect
    My Nokia 210 works well both with GPRS and WiFi. The internet browser works ok, as well as Nokia Chat.
    However, the third-party XMPP chat applications fail to connect to the server (this is true for GPRS and WiFi ):
    - Nimbuzz (installed directly from Ovi Store):
    "nimbuzz needs your permission to connect to the internet"
    - Talkonaut (downloaded from the official site, run from the SD card, http://www.talkonaut.ru/download.shtml )
    Simply tries to reconnect all the time, never manages to connect.
    - Bombus (downloaded from the official site, run from the SD card, http://bombus-im.org/wiki/bombus/help_english)
    Shows some Java exception, but obviously seems being unable to connect after trying for a few seconds.
    I have checked:
    - my Access Point settings which seems to be ok (the internet browser works ok);
    - access rights for the chat apps (all of them are allowed to access the data connection).
    SOLUTION:
    1. I followed the advice here: http://discussions.nokia.com/t5/Asha-and-other-Nok​ia-Series-30/check-your-connection/m-p/2380795#M10​...
    2. Menu > Sim mgr > Sim 1 > Mobile data (set checkmark ON)

    I had a problem with any third-party chat apps not being able to connect to the network.
    Nokia Asha 210 Dual Sim - Chat apps fail to connect
    My Nokia 210 works well both with GPRS and WiFi. The internet browser works ok, as well as Nokia Chat.
    However, the third-party XMPP chat applications fail to connect to the server (this is true for GPRS and WiFi ):
    - Nimbuzz (installed directly from Ovi Store):
    "nimbuzz needs your permission to connect to the internet"
    - Talkonaut (downloaded from the official site, run from the SD card, http://www.talkonaut.ru/download.shtml )
    Simply tries to reconnect all the time, never manages to connect.
    - Bombus (downloaded from the official site, run from the SD card, http://bombus-im.org/wiki/bombus/help_english)
    Shows some Java exception, but obviously seems being unable to connect after trying for a few seconds.
    I have checked:
    - my Access Point settings which seems to be ok (the internet browser works ok);
    - access rights for the chat apps (all of them are allowed to access the data connection).
    SOLUTION:
    1. I followed the advice here: http://discussions.nokia.com/t5/Asha-and-other-Nok​ia-Series-30/check-your-connection/m-p/2380795#M10​...
    2. Menu > Sim mgr > Sim 1 > Mobile data (set checkmark ON)

  • Applet-Servlet communication in RMI or sockets

    As a dissertation piece I am creating a game to be played by multiple players accross the internet using servlets. However I am having great difficulty figuring out how to use RMI or sockets within servlets (I already have the socket-based code). I also can't seem to find many books or sites out there which might help. If anyone outthere has done this type of thing before or can advise any reading material I would be very grateful

    Write a servlet and in the web.xml have the servlet load on server start-up.
    In the servlet have a thread start in the init method. The thread will start a socket server that the applets can connect to. The socket server can be the standard socket server as outlined in the tutorial:
    http://java.sun.com/docs/books/tutorial/networking/sockets/index.html

  • Chat App not working on Nokia C3-00

    I have purchased a Nokia C3-00 3 weeks ago and I found that Nokia Messaging App is not working well.
    Whenever I try changing my online status in Gtalk or Yahoo! IM, the app hangs and screen gets garbled..I cannot go to home screen without a restart. My Chat version is 2.0.29 
    And along with this garbled screen, my chat status is shown as online even if i have shut down chat app. 
    Even an update is not helping. I tried a partial restore phone to factory settings but even that failed.
    Please help me solving this problem. 

    Hi,
    I tested this issue with my C3-00 phone, sw version 8.63 and chat sw version is 2.0.22.
    Chat function works fine with me and i have Ovi chat account and it works well.
    So can you check your phone sw version and  maybe update needed.
    http://europe.nokia.com/support/product-support/device-software-update
    It can be also that chat functionality is not supported by some countries or operator.
    So i suggest you contact in your local area Nokia Contact Center.
    To find your nearest Nokia Care Point, visit http://www.nokia.com/support and select the Repair page.
    Br
    mahayv

  • Nokia c3 Update through wifi / Chat App not found

    hi guys, I successfully updated my nokia c3 through wifi to the latest version 4.60, although I'm currently having a chat problem, when I try to open it, it says "Application not found".
    What would be the best thing to do? I already tried to restore factory settings. Thanks!

    You u need to 1st BACKUP EVERYTHING
    then perform the Firmware Upgrade
    then RESTORE your packed up Programs and Data ...
    or just goto the Ovi store and find some free chat apps and reinstal them,
    its cheaper to paste the links it sends your mobile into your phones browswer and surf using Wifi Connection to download apps and themes. good luck
    N95-1 (8GB-MicroSD),LCG-Audio,Fring,Nimbuzz,Skype,Youtube,iPlayer,Garmin4-GPS.Googlemaps,SkyFire,ZoneTag,Gravity, Sennheiser CX-400-IIs,500-IIs,TR-120 Wireless,HD215'S.AudioTechnica ATX-M50's.BT B-Tube BT Speaker.

  • HT1933 I downloaded WE CHAT app. which i store shows free. But still th. Can anybody tell me how to report this?ey charged 1 $ from my account

    I downloaded WE CHAT app. which i store shows free. But still they charged 1 $. Can anybody tell me how to report this?

    iTunes Store & Mac App Store: About payment card authorization ...

  • Chat App - edge - no internet usage

    Does anyone know of a chatting app that you can use on Edge. I need one that doesn't use any of your internet/data usage.
    -Whoshere takes too much internet for my plan....
    -Kik requires 3g or wifi (or it doesn't work where I am anyway)...

    I think you have to ask your phone operator (ATT) for that.
    Different operators bills differently from one another. Some have data plans that do not include certain addresses. For example, one operator in my country has unlimited chatting on certain apps only, like eBuddy or Nimbuzz, but you still have to pay excess data if you use other apps.
    Read the fine print or just ask ATT what is included and what is not.

  • Nokia chat app error. temporary service problem. ...

    nokia chat app error.  temporary service problem. (Code 403)  what can i do?

    Hi CLONEDmack
    The following problems can cause a connection error:
    Loss of network coverage
    Network congestion
    Invalid or missing SIM card
    Incorrect access point name (APN) settings
    Incorrect date or time on your mobile device
    If my post helped you, please don't forget to click on the "White Star" and if it resolved your issue click on "Accept as Solution"

  • Developing Simple Chat App in ADF

    I have JDev 11.1.2.1.0.
    Can anyone provide any references to develop a simple chat app?
    I want it for:
    Two PCs connected together over a LAN.

    Hi,
    You would probably use Active Data Service, see here for an example of a simple Google Talk client: http://www.oracle.com/technetwork/articles/jellema-googletalk-094343.html
    Documentation: http://docs.oracle.com/cd/E24382_01/web.1112/e16182/adv_ads.htm#BEIDHJFD
    Regards,
    Joonas

Maybe you are looking for

  • How do multiple users on different computers work on an Indesign file?

    Do we work on it on the Cloud and only one license is needed for same project? Do we need multiple licenses for different computers working on the same file? If I buy Indesign, will I be the only person who can access the software from my computer?

  • Call transformation XSLT and long note string in XML

    Hi Using call transformation (XSLT scheme) to convert XML file to html the problem is that line breaks in xml are ignored when passing the call tranformation. <b>Note in xml look like:</b> <com:Note><![CDATA[ Serie 87% 0,000000 Amount in this period

  • How to remove space bar?

    I have an aluminium keyboard for the 2009 iMac. I got a little liquid in the spacebar area, and whilst it's not sticky per se, I have to really hit the spacebar sometimes to get it to work, and since the rest of the keyboard is so 'soft', it makes ty

  • MSS Approve Time sheet data error

    Hi, In MSS Approve time sheet data I get a The ASSERT condition was violated., error key: RFC_ERROR_SYSTEM_FAILURE:com.sap.tc.webdynpro.modelimpl.dynamicrfc.WDDynamicRFCExecuteException: The ASSERT condition was violated., error key: RFC_ERROR_SYSTEM

  • This "black snow" is driving me NUTS!

    SUMMARY: I'm getting "black snow": little black rectangles that pop up for a millisecond in random locations of the DVD MENU. Only the menu is affected, nothing else. I am using iDVD 5. I've tried trashing, reinstalling, and updating iDVD 5 -- no eff