RMI - 3 way communication

Hi All,
I need to develop a model using RMI, in which 2 way communication is possible. For example, if there are 3 server running on 3 diff. machine(or on same), they all should be able communicate with each other.
one and two way communication is possible.......but confuesed with 3 way.
Can anybody give some tips....
Thanks...
Vaibhav Gandhi

The final project includes the following 19 source files:
1. Chad Salinas Account.java - the account implementation class
2. Chad Salinas AccountInfo.java - the data class containing the pin and acctnum from the client request
3. Chad Salinas ATM.java - the interface to the ATMImpl.java
4. Chad Salinas ATMFactory.java - interface to the ATMFactoryImpl , returns remote reference to ATMImpl instance
5. Chad Salinas ATMFactoryImpl.java - implements the ATMFactory interface to the ATMImpl
6. Chad Salinas ATMImpl.java - implements interface to the ATM
7. Chad Salinas ATMServer.java - server creates an ATMFactoryImpl instance, registers it with the registry
8. Chad Salinas BankServer.java - hosts the remote bank and security service
9. Chad Salinas Client.java - drives the ATM system
10. Chad Salinas ATMListenerInf.java - interface to the Client, listens to the atm for transaction notifications
11. Chad Salinas TransactionNotification.java - create the TransactionNotification object
12. Chad Salinas Bank.java - implementation class where accounts are created and reside
13. Chad Salinas Security.java - implementation class authenticates and authorizes banking transactions
14. Chad Salinas BankInf.java - interface to the Bank
15. Chad Salinas SecurityInf.java - interface to the Security service, returns remote reference to Security instance
16. Chad Salinas AccountInf.java - interface front ends Account like ATM front ends ATMImpl
17. Chad Salinas AccountException.java - User defined exception class to throw insufficient funds exception
18.Chad Salinas ATMException.java - User defined exception class to throw insufficient cash-on-hand exception
19. Chad Salinas SecurityException.java - User defined exception class to throw authentication and authorization exceptions
The following 6 files comprise the implementation .class files
that need to rmic'd after comiling the source:
Chad Salinas ATMImpl.class
Chad Salinas ATMFactoryImpl.class
Chad Salinas Bank.class
Security.class
Account.class
Client.class
Test the program using the following steps:
Compile the source files with:
javac cscie160\project\*.java
rmic to get the client stubs and server skels with:
rmic cscie160.project.ATMImpl
rmic cscie160.project.ATMFactoryImpl
rmic cscie160.project.Bank
rmic cscie160.project.Security
rmic cscie160.project.Account
rmic cscie160.project.Client
start rmiregistry
start rmiregisty
start the BankServer with:
java cscie160.project.BankServer
start the ATM server in another cmd window with:
java cscie160.project.ATMServer
start the Client in another cmd window:
java cscie160.project.Client
Design Considerations:
Additional account attributes - I decided to make account number, PIN, and account permissions attributes of
an account. I could just have easily created a special security object to
contain these data members. However, the implemntation, with respect to data structure
and accessing an element would be equivalent to what I have already done with
accounts. I put the accounts in an ArrayList an iterate the list to get the element.
Authenticate, Authorize, and grab the account - I decided that since I grab an account in
ATMImpl, I may as well call the security service with the client-supplied AccountInfo instance
and the Bank-supplied account instance as opposed to grabbing the account and/or bank again in
the security instance.
Account constructors - I expanded the account constructors to create PIN and permissions when an
account is created.
Transfer - A transfer is not exactly a withdrawl and a deposit, because a withdrawl connotes taking cash from
ant ATM whereas a transfer transaction should not decrease an ATM's cash-on-hand.
Transaction Notification - I call tn.toString for all transactions including getBalances. The idea is to see the
transaction details even in the case of a failure.
What to expect:
Everything comiles, rmic's, and executes as it should!

Similar Messages

  • Error message saying "unable to establish two-way communication with device"

    I have an HP C309a printer/scanner/fax. I have recently reconfigured it to work wirelessly instead of via the USB cable, which it does. But if I try to go on to  the HP Solution Centre/Settings/Printer Toobox to clean the printheads, it tells me that this cannot be done because "the computer cannot establish two-way  communication with the device".
    If I plug the USB cable back in, I can clean the printheads fine.
    Does anyone have a way of allowing me to clean the printheads without using the USB cable?
    roger

    Hi rogercorke,
    I believe you can also clean the printhead from the printer control screen. Press the Wrench button from the printer Home screen and then press Tools>Clean Printhead.
    If you need to use this feature wirelessly, try running the HP network diagnostic utility on your wireless setup and see what it says: http://h10025.www1.hp.com/ewfrf/wc/softwareDownloadIndex?cc=us&lc=en&jumpid=ex_r4155/en/hho/ipg/foru...
    Please click the blue Kudos star in the post that helped you. 

  • 2 way communications error

    unable to determine ink level - "the computer is unable to establish two way communication with this device" - what do I need to check   C3180

    Hi --frustrated,
    Welcome to the HP Consumer Printer Forums! 
    I would like to help, but need a little more information regarding your issue, what operating system is your computer running?
    If I have helped in any way, just click the Kudos star on the left. Also, if your issue has been resolved, don't forget to select Accept as Solution

  • Question on PI like RFC,import maps,defining two ways communication

    Hi Foks,
    I am new to PI need information on the below issues.
    1.How we can use RFC?
    2.How to define Two way Communication eg:Remote system to ERP vise versa.
    4.How ti transport the dev. object from Dev to Prod.
    5.How we ca create the maps externally and import in PI is there any way we can do it.
    Please help me out
    shankar

    How we can use RFC?
    Import RFC in ESR/IR under IMPORTED OBJECTS that exist under software component in your ESR.
    While importing RFC,you have to give system details from where you will import RFC in PI.
    How ti transport the dev. object from Dev to Prod.
    /people/sravya.talanki2/blog/2005/11/02/overview-of-transition-from-dev-to-qa-in-xi
    /people/sap.india5/blog/2005/11/03/xi-software-logistics-1-sld-preparation
    /people/sap.india5/blog/2005/11/09/xi-software-logistics-ii-overview
    /people/sap.india5/blog/2005/11/28/xi-software-logistics-solution-iii-cms
    thanks
    Nidhi

  • 2 way communication

    What is the best way to get 2 way communication with a servlet from a Java Web Start Application using http protocol?
    Is this something related with http 1.1?

    See http://www.j-nine.com/pubs/applet2servlet/Applet2Servlet.html
    This is for applet-to-servlet but should work similarly.

  • 2-way communication with an Applet, is it possible?

    I have read a couple of things on the internet that states that Applets cannot create ServerSockets. Is it really true, that you cannot directly communicate to an Applet unless it is polling a server???? There must be some other way, if any one can help, I would be greatly appreciative.
    Thanks!
    Blaine

    I have read a couple of things on the internet that
    states that Applets cannot create ServerSockets. Is it
    really true, that you cannot directly communicate to
    an Applet unless it is polling a server???? There must
    be some other way, if any one can help, I would be
    greatly appreciative.
    1. An applet can do anything that java can, including opening sockets to anything it wants, JNI, file access, etc. However, an applet works in a sandbox and normally it can't do any of those things. So you must do additional work to allow it to do such.
    2. A socket back to the server is a two way communication pipe. Information can move both ways. In most designs this is the only way that you want communications to move.
    3. An applet talking directly to another applet probably isn't a good idea. There are several reasons, one that springs immediately to mind is that the two boxes in the communication might not be addressable to each other (both have private IPs and are on different subnets.) With a server in the middle this is not a problem, but it is not possible otherwise.

  • The computer is unable to establish a two way communication with the device

    Hi  I am trying to fix a problem for some one else, and I am struggling where to look next. The issue is that we are unable to check the ink levels of a HP Deskjet 1050 printer.  The error message states that the computer is unable to establish a two way communication with the device. After running through the troubleshooting guide about this issue on the HP site with no joy,  I decided that it may be the printer and suggested a replacememnt.  Unfortunately A new HP Envy 5530 was purchased and connected (wirelessly) but the issue remains. I have uninstalled the drivers multiple times, and also disabled any firewall/anti virus software in case this was interfering. I was hoping that some one could point me in the right direction next? None of the other forum posts here (or any google searches) give a solutuon which has fixed the problem.  Thanks

    No I cant. Unable to ping the printer too, not sure if this is possible normally?

  • Digital Fax to Folder Setup gives error message unable to establish 2-way communication with device

    Digital Fax to Folder Setup gives error message unable to establish 2-way communication  with device. I can s end a Fax and I can print documents. I can also, now, scan to computer. I have changed the phone line twice, restarted the router, restarted the computer, and made sure the front panel was lit when setting up the Digital Fax folder. I am on a Homegroup network, with both wireles and ethernet computers.  When I view the network, it sees both computers (wireless laptop and enthernet desktop), the printer, scanner, and router (VerizonDrive). I recently had to reinstall Windows 7, where Digital Fax to Folder Setup previously worked, and now it doesn't.  The network shows up as Network 3. When I try to view the network map, I get the error message that Windows cannot create the network map. Responses from other devices on the network are delayed or there is an  incompatible router on the network.  What am I doing wrong?

    Hello @JiffyFingers and Good Afternoon
    From what you have described, and from the work you did on another thread, I believe you'd get better assistance talking to either Microsoft or your router manufacturer. With not being able to create the network map, that's something a bit more intricate than digital fax setup
    You can have a look at this Windows cannot create the network map. Responses from other devices on the network are delayed or th... Microsoft thread as well, and you may be able to figure it out from there.
    Hope that helps, have a great day!
    Please click “Accept as Solution ” if you feel my post resolved your issue, as it will help others find the solution faster
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    **MissTeriLynn**
    I work on behalf of HP

  • How do i fix the inability to establish two-way communication between my computer and the printer?

    HP Photosmart 5510 e-All in One Printer B111a
    Windows XP
    Message "The computer is unable to establish two-way communication with the device."
    Installed new printer
    I'm simply trying to get the estimated ink levels.

    Please make a Genius Appointment and take it in for service.

  • Unable to establish the two way communication with printer j110a

    every thing is ok but during the printing or ink level checking this message displayed "unable to establish the two way communication with printer j110a" please reply soon?

    Hard Reset – While printer is powered ON, pull the power cord from the printer then from the wall. After 30 seconds reconnect power to wall and printer. This will trigger a ‘dirty power up’ and restore the printer to a known good condition (if it is possible). No user settings are lost with a ‘hard reset’. This ‘Hard Reset’ is one of the most powerful tools to use when the printer hardware is not functioning properly! IF NOT RESOLVED, uninstall hp software & reinstall using latest hp software from hp website.
    Although I am working on behalf of HP, I am speaking for myself and not for HP.
    Love Kudos! If you feel my post has helped you please click the White Kudos! Star just below my name : )
    If you feel my answer has fixed your problem please click 'Mark As Solution' and make it easier for others to find help quickly : )
    Happy Troubleshooting : )

  • Computer unable to establish two-way communication to J4580 through Airport Extreme

    I have my J4580 connected to an Airport Extreme base station via usb.  I've installed the printer software on my HP laptop (Vista) and Bonjour recognizes the printer as networked & installed, but when I try to print, i receive an error message "Computer is unable to establish two-way communication with the device" and the printer queue shows an error.  I've attempted to find a solution through the posts, but haven't seen much that seems to apply to J4580.  Any help???  Thanks!

    I came across this similar problem and spent days trying to figure it out. I knew I was close when I tried to start the HPZ12
    service and it kept failing with "unable to find the specified file". I traced it with a process monitor and found that it was looking
    for a registry key that was not present. Specifically:
    HKLM\System\CurrentCosntrolSet\Services\Pml Driver HPZ12\Parameters
    It was looking for the string:
    ServiceDLL which should be set to:
    C:\WINDOWS\system32\HPZipm12.dll (or something similar)
    The unfortunate thing is that no matter how many times you install and uninstall the HP drivers, then don't reset the registry keys
    for the HPZ12 service. In the end, I ended up doing the following:
    1. Uninstall software and reboot
    2. Go through registry editor and delete the PML key (just did a search for all PML occurences)
    3. Deleted the c:\program files\Hewlett-Packard directory
    4. Deleted the c:\program files\HP directory
    5. Deleted the c:\windows\system32\spool\drivers\w32x86\ contents (anything that referred to an HP printer or driver)
    6. Deleted the HKLM\Software\Hewlett-Packard registry key
    7. Rebooted
    8. Reinstalled and everything worked.
    I suggest you backup any registry keys prior to deleting them in case you make a mistake. You can use the Export feature on
    the right-click context menu to save each key you delete, or use some tool to make a backup of your registry prior to making
    these changes. Similarly, for the files, I renamed directories or created backups of their contents.
    Once I reinstalled, I found that there were TONS of new registry keys added that weren't there before. So the real problem is
    with HPs install/uninstall. It doesn't clean up properly and any aborted or failed instalation will leave the drivers in a poor state.

  • Unable to establish two-way communication with the printer

    I have a HP Photosmart B8550 large format printer, but failed recently to print the whole page, but only one third of the page.  The OS is Window 7 in my commuter.  I downloaded the driver from HP website, but it is not working.  The result of the failure is "The computer is unable to establish two-way communication with the device."  One of the reasons I guess is that I failed to register my printer because I had no way to finish the registration, because there is no further process even if I put my printer name or number into the required block.  Anyhow I failed recently to print anything in the printer.  I am seeking the support after a lot of tries.  Thanks. 

    I have two HP computers and two HP Photosmart B8550 printers.  A month ago printers were not working.  I tried in vain in two computers to download new HP software and driver from internet and got the HP Solution for install error - Windows 7.  Based on this Solution on desk, I tried many many times to follow every step, but the result is the same:  Fatal error during the installation.  
    By using other tools like HP Printer Diagnostic Tools, HP Print and Scan Doctor, I failed too because the diagosis or the choices are not accuate.  For example, the printer is disconnected.  It is wrong even if I changed ports and USB calbe again and again.  The control panet can prove that there is communication, but the printer cannot work as directed.  There is no way to test the printing as Doctor requested, saying the computer is unable to establish two-way communication with the device, which is not helpful to go ahead with the solution.  There is no way to register the printer because there is no such a model HP Photosmart B8550 in its list after search.  
    It is even worse that the new window dialogue asked me to find HP Photosmart Essentials in my computer to install it again and again, and I could not concel the request whenever I open my computer.  
    I guess the HP printer software and driver has something wrong in its root design, which leads me to failure in installation so that the computer could not recognize my printer.  In short, the new HP software and driver makes my printer not functional.  
    By the way, my two printers can work internally in printing sample paper and report and two computer are working in perfect condition. 

  • How to design socket client-server app for 2-way communication

    Hi, I am writing a client-server application. I have a single server and many clients. Each client will need the ability to send information to the server at any time. The server will also need the ability to send information to a client at any time. Its this second part that I am not sure how to design. Would I need to create a SocketServer on each client to accept incoming messages, or is there a better way? Thanks

    scranchdaddy wrote:
    Don't my requirements sound a lot like an IM application, where a chat server might need to send a message to a chat client at any time?Not really. If that is what you are designing
    in my opinion one could easily be forgiven for thinking you were deliberately obfuscating your goal...
    How does the server know where the client is? Does it know the IP address of the client?I would imagine the server would contain a directory of IPs? I'm not sure.
    What happens if the client is not running?Then I guess the message would not get delivered.
    What happens if the client is behind a firewall that does not allow incoming connections?How do IM chat clients work? How have people solved this in the past?Typically the server would only care about clients currently connected to the server.
    Maybe you should re-think your design. I don't really have a design, just requirements, that's why I'm writing this post.Your subject says "+How to *design* socket client-server app for 2-way communication+".
    Are you saying you expect someone else to do the design for you?

  • How can I automatically connect to multiple connecting streams? to have 2 way communications foreach

    I need to setup a send stream that will only allow each farID to connect 1 time, and automatically connect to the connector so I ca have 2 way communication.
    I learned if in my onpeerconnect function i do this...:
    var c:Object = new Object;
    c.onPeerConnect = function(subscriber:NetStream):Boolean
       if(ready==ready)
       if(receiveStream==null)
        setupReceiveStream(subscriber.farID);
        return true;
        else
        return false;
    it seems to work fine, and they will start a 2 way connection BUT i want to potentially allow multiple connections, and setup multiple receive streams so im trying to com up with a solution to check if its already streaming to the peer. I wish I could just do this:
    var c:Object = new Object;
    c.onPeerConnect = function(subscriber:NetStream):Boolean
        setupReceiveStream(subscriber.farID);
        return true;
    But, for some reason it just keeps returning true over and over and over it doesnt just do it once on the connect, i get something like this:
    NetStream.Play.Start
    NetStream.Play.Reset
    NetStream.Play.Start
    NetStream.Play.Reset
    NetStream.Play.Start
    NetStream.Play.Reset
    NetStream.Play.Start
    NetStream.Play.Reset
    NetStream.Play.Start
    NetStream.Play.Reset
    NetStream.Play.Start
    NetStream.Play.Reset
    NetStream.Play.Start
    NetStream.Play.Reset
    NetStream.Play.Start
    NetStream.Play.Reset
    NetStream.Play.Start
    NetStream.Play.Reset
    NetStream.Play.Start
    So, heres what im trying to do:
    protected function setupSendStream():void
    sendStream = new NetStream(netConnection, NetStream.DIRECT_CONNECTIONS);
    sendStream.addEventListener(NetStatusEvent.NET_STATUS, sendStreamHandler);
    var c:Object = new Object;
    c.onPeerConnect = function(subscriber:NetStream):Boolean
    var test:Boolean=true;
    var THEStream:NetStream = null;
    for each (var stream:NetStream in sendStream.peerStreams)
    if (stream["farID"] == subscriber.farID)
    well=false;
    trace("found it!");
    if(test)
    setupReceiveStream(subscriber.farID);
    trace("returned true");
    return true;
    else
    trace("returned false");
    return false;
    sendStream.client=c;
    sendStream.publish("MyChannel");
    trace("SETUP SEND STREAM");
    cirrusStatus=connectedReady;
    But it seems like after it returns true and runs the setup, so i can have 2 way communication, it runs the onpeerconnect function 1 more time after it returns true, and its a return false and then it makes the play fail and it ruins the connection.
    Any ideas on how I can listen for connects to my sendStream, then have it get the farID and then connect to that farID?
    keep in mind im trying to potentially support multiple connections to my sendstream which i think will be easy, but whats more confusing is having multiple receivestream connections

    "Method Three
    Create a separate iTunes library for each device. Note:It is important that you make a new iTunes Library file. Do not justmake a copy of your existing iTunes Library file. If iTunes is open,quit it.
    This one may work. I searched and searched on the website for something like this, I guess I just didn't search correctly, lol. I will give this a try later. My daughter is not be back for a few weekends, therefore I will have to try the Method 3 when she comes back for the weekend again. "
    I forgot to mention that she has a PC at her house that she also syncs to. Would this cause a problem. I am already getting that pop up saying that the iPod is synced to another library (even though she is signed in with her Apple ID to iTunes) and gives the pop up to Cancel, Erase & Sync, or Transfer Purchases. My question arose because she clicked on "Erase & Sync" by mistake when she plugged the iPod to her PC the first time. When the iPod was purchased and setup, it was synced to my PC first. When she went home, she hooked it up to her PC and then she erased it by accident. I was able to restore all the missing stuff yesterday using my PC. However, even after doing that it still told me the next time I hooked it up last night that the iPod was currently synced with a different library. Hopefully, you can help me understand all this. She wants to sync her iPod and also backup her iPod at both places. Both PCs have been authorised. Thanks

  • Cannot print to my hp 7500. diagnostics says computer cannot establish two-way communication.?

    cannot print to previously functional HP7500 on wireless network card.  All reports from printer say everything is working fine (network card and printer), but computer says it cannot establish two-way communication.  What do I do?

    pcunning, I would recommend running this utility and seeing what it shows - or resolves:
    http://goo.gl/u3jDE
    Let me know!

Maybe you are looking for

  • Problem with Debug mode and SLD

    Using the config tool, we have turned the Debuggable flag to 'yes' and set the Debug mode to OFF.   Now from the studio, when I enable debugging for the process, the server0 stops successfully and restarts successfully. However, during the restart, t

  • What is this icon???? Can't find it in any users guides

    This icon is on my phone and I don't know what it is.  It is a black circle has an arrow pointing SW and on the arrow it has a red star.  It has a 1 beside it so I'm assuming it means I missed something as that is the area it is in where the missed c

  • Audiobook Problem

    I've been having a problem with loading audiobooks on to my iPod. (An 80-gig video one, if it helps?) I have mp3 files that I load into iTunes, but when I try to play them on my iPod it won't play them one after the other but instead says "Track 1 of

  • How to make tabs show up selectively in different pages?

    Hi, I'm new to APEX and getting my hands dirty now... I have a standard Tab Set called "TS1", which has 2 tabs (say, tab1 and tab2) in there. Since tabs are under "shared component", so it appears that they are shared throughout all the 10 pages I ha

  • SCOM 2012 Operations Manager Failed to start a process

    We have recently upgraded from SCOM 2007 to SCOM 2012. We are not getting a great deal of “Operations Manager Failed to start a process”. The process varies including: DiscoverSQL2008ASDiscovery.vbs DiscoverSQL2008DBEngineDiscovery.vbs DiscoverSQL200