Multiple servers and multiple clients on one machine

Hi,
I was hoping someone could give me some direction as to how to go about creating multiple servers and muliple clients on the one computer using RMI and threads. I intend to have say 4 servents (able to perform both client and server methods) running on the one computer, with the clients being able to connect to each of the servers. (I'm doing this to emulate using 4 computers, which I don't have!). I know I have to use different ports to do this. How do I go about the following using RMI - start up a server (port number as argument from command line?), which starts a thread listening for connections from the other clients.. when a new connection is established between server and client, then start a new thread which 'handles' that connection.
The examples I've seen of RMI only deal with single server and single client... I'd appreciate any suggestions as to how to go about this problem!!

Hi,
I suggest not to use the rmiregistry program at all
but to start the registry in a program of your own.
Then you can specify all you need (url, port, even
client and server socket) as command line argument.
You need something like this:
Registry registry = null;
Remote server = null;
try
{ // this succeeds if the registry already runs
  registry = LocateRegistry.getRegistry(yourRegistry);
  server = registry.rebind( yourServer );     
}catch( RemoteException )
{ // no registry reachable, create one
  registry = LocateRegistry.createRegistry(yourRegistry);                 
  server = registry.rebind( yourServer );     
}Have fun,
wiedkla

Similar Messages

  • Roaming profile in multiple servers and multiple locations

    I am planning to keep our roaming profile in Primary Domain Controller and when it fails it has to get the profile from Child Domain Controller. The child dc can be in the same location or in any branch location.
    Could I have the configuration steps?
    I am using 2008 server r2.
    Thank you.
    Firozali.

    Hi Firozali,
    >>I am planning to keep our roaming profile in Primary Domain Controller and when it fails it has to get the profile from Child Domain Controller
    As far as I know, we can change the storage location of roaming user profiles from one server to another server. However, we can’t automatically failover the storage location
    of roaming user profiles.
    Regarding how to configure roaming user profiles, the following article can be referred to for more information.
    Configuring Roaming User Profiles
    http://technet.microsoft.com/en-us/library/cc738596(WS.10).aspx
    Regarding how to move roaming user profiles from one server to another, the following article can be referred to for more information.
    Moving Active Directory roaming profiles to another server
    http://niktips.wordpress.com/2012/02/09/moving-active-directory-roaming-profiles-to-another-server/
    Please Note: Since the above website is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
    Best regards,
    Frank Shen

  • Recommended configuration for load balanced Portal with load balancer, multiple gateways and multiple servers.

    Does anyone have a recommended network, hardware and software configuration guide for a Portal installation running with multiple gateways load balanced (ie one URL) that talk to multiple servers?

    David,
    We've used Resonate (software) to load balance the gateways. It allows
    you to group all the gateways under 1 virtual URL and load balance the
    incoming connections over each gateway depending on the rules that you
    define in Resonate. Look in the SUN portal whitepapers there is one that
    talks about it specifically.
    As far as load balancing the calls to the portals, the gateways will
    automatically load balance across all the portals that they know about
    using a simple round-robin rotation. You may be able to use Resonate in
    front of the portals but you may need to activate persistance within
    Resonate to ensure that the user always ends up on the portal that he
    established his initial connection on (if you want that), check with Sun
    on this one.
    David Broeren wrote:
    Recommended configuration for load balanced Portal with load balancer,
    multiple gateways and multiple servers.
    Does anyone have a recommended network, hardware and software
    configuration guide for a Portal installation running with multiple
    gateways load balanced (ie one URL) that talk to multiple servers?
    Try our New Web Based Forum at http://softwareforum.sun.com
    Includes Access to our Product Knowledge Base!

  • Is it possible to deploy SharePoint or its Service Applications on: multiple DB-Servers and multiple SQL Instances?

    Hello Forum,
    We have a SharePoint 2013 farm (Enterprise edition) that uses one single SQL Server 2012 (Standard edition). That statement means: All my SharePoint DBs e.g. (Config, Admin, Content, and Service Apps) DBs are hosted and running onto one single instance e.g.
    Server1\SQLInstance1.
    We have some new requirements to install and configure BI tools such as: PerformancePoint services and PowerPivot. BI tools require either SQL Server 2012 Enterprise or BI editions, and we do NOT want to upgrade our current SQL Server1\SQLInstance1
    Instead, We have other separate SQL Server instance which is enterprise edition let's name it (ServerX\InstanceX) that is running standalone, and we are thinking or using it, and my 2 questions are:
    1) Can we use this other separate
    SQL Server instance which is enterprise edition to host the create and hosts the DBs of PerformancePoint services and PowerPivot ?
    2) My second question is the same: Can I create PerformancePoint services application in my SharePoint farm, But in the Database Server field, I fill up
    the details of the other DB server ServerX\InstanceX  which is the one that is SQL
    enterprise edition ? Will this work ?
    Any official Microsoft resources/links tell that it is possible to deploy SharePoint or its service applications on multiple DB-Servers and multiple SQL Instances?

    Thank you Alex and Anil,
    What are the ramifications of that?
    I mean, Assuming that I have created such a farm where most of SarePoint DBs in Standard SQL instance while the PerformancePoint service application and others e.g. PowerPivot and reporting service are deployed and configured onto other Enterprise SQL instance.
    Are there any recommendations or concerns that you would like to draw my attention to ?

  • Can I use one itunes account for multiple users and multiple devices

    Can I use one itunes account for multiple users and multiple devices?

    The iTunes EULA, as I understand it (I'm not an attorney )for Apps is basically that one person can use an App multiple devices, or multiple people can use an App one device..so one to many or many to one, but not many to many....

  • How do you download all chapters of a video at once?  I purchased a yoga video with multiple chapters and only the first one loaded.  It says I can't download another chapter for 90 days.

    I purchased a yoga video with multiple chapters and only the first one loaded.  It says I can't download another chapter for 90 days.  How do I get all chapters to download?

    Once a device or computer is associated with your Apple ID, you cannot associate that device or computer with another Apple ID for 90 days.
    http://support.apple.com/kb/ht4627

  • LabVIEW license for terminal servers and thin clients (e.g. LTSP)

    Does NI plan to provide a license agreement for terminal servers and thin
    clients?
    I've been told to purchase a multi-seat license. That doesn't make much
    sense since the thin clients won't be accessing DAQ hardware. They're
    just used for developing the LV source.
    Comments/suggestions?

    On Thu, 04 Nov 2004 13:43:58 -0600, jbrohan wrote:
    > As far as I know it's the capability to edit the source code that NI has
    Yes, this is a very good point. Quite a unique situation when compared to
    text based languages. Keep in mind I certainly don't mind paying for that
    but I see no need to pay for much of the other features - like running it.
    This is certainly one of the other features you pay for with LV. Since
    we never plan to run the app on the thin client, why pay for that
    feature?
    What we do is crank out source code on the thin clients. We then send the
    source code to this wireless mobile DAQ station running WindowsXP. From
    there we can roll it up to our clients' target systems. That machine is
    used for debugging then compilin
    g so it has its own LV Prof Dev license
    installed on it. Also, it can be operated locally or remotely via remote
    desktop (one user at a time).
    I know it may sound strange but it works great. And as the NI Software
    License Agreement(NISLA) specifies, we have separate licenses on all
    machines that load LV into local memory. The thin clients load nothing
    into local memory, hence no need for a separate license.
    > I express myself clearly in the hope of guidance. I am a one man shop
    Yes, this is understandable. Installing one license on multiple machines
    is a big no-no. However, that is not what I'm trying to do. Take a peek
    at the "Grant of License" and "Single Seat License" sections of the NISLA.
    > You say "That doesn't make much sense since ..." One of my clients has a
    Ha! How about this scenario: As wireless hardware (bluetooth, wifi)
    becomes more common, perhaps NI will have a peer scanner on all PCs with
    LV installed. That way if you get within 100 feet of a P
    C with the same
    LV serial number, you get locked out and it sends a small message to the
    NI batcave.
    Thanks for the response. I'm hoping NI chimes in soon.

  • Planning for  product using multiple bom and multiple recipe involving SOP

    Hi friends,
    The problem. Currently we have maintained single BOM and single recipe (The BOM and Recipe used for MRP) for long term planning run. The FMCG sector of Client requested to have multiple BOMs and multiple recipes in the long term planning run. I.e. The planning is done quarterly and they wanted to use different BOMs and Different recipes for each quarter. But since the existing system has configured to use a single BOM and a single recipe we have a problem to use the long term planning run with the current setups.The problem we have is in this ‘001’ planning scenario.
    appreciate if you can help me how to accommodate multiple BOMs and recepis in the long term planning run.
    thanks and regards
    om

    HI Mr. Ready,
    We create PIR though a submit Job and in this case how to mention the production version while creating PIRs . Also if I am creating PIR through MD61 how to record the version.
    Please advice.
    Thanks and Regards,
    Om

  • Posting an Idoc with Multiple Headers and Multiple Lines

    Hi all,
    I have a scenario like this fileXIIdoc
    Invoice file comes in text file with multiple header and multiple lines like this
    111               aaa     13214234    US   (header)
    09082010     ABC    9999            A     (Line)
    222               ccc     43454543    US   (header)
    09082010     XYZ    7777            B     (Line)
    09082010     PQR    8888            C     (Line)
    I need to post single Idoc with all the headers and lines
    we are planning to use Custom Idoc,Is this possible by having the header segment as unbounded??
    Regards
    Edited by: Vamsi Krishna on Sep 8, 2010 8:05 PM

    hi,
    lets go again.
    you have to edit the custom IDoc and change the ocurrance on the header segment. also modify the details segment adding an addtional field that identify which header that this detail belong.
    for this case you cannot change the occurrance in SAP PI because you wont identify what i have told you before.  in PI apply to change the occurrance if you could send ONE Idoc Per Header.
    now is better clear???
    Let us know.
    Thanks
    Rodrigo P-.

  • Diff between Multiple Threading and Multiple instance.

    Hi ,
    what is the main diff between Multiple Threading and Multiple instance?
    Please give me the answer

    Satti4Java wrote:
    Hi ,
    what is the main diff between Multiple Threading and Multiple instance?The main difference (not "diff") is that the first one ends with the word "Threading" and the second one ends with the word "instance".
    Really. Seriously. Now if you had some industry standard phrases you were comparing, there might be a useful discussion. But those are just words strung together. If that's a homework question, I recommend you find a different teacher.

  • How to install oracle817 and form6i on the one machine

    How to install oracle817 and form6i on the one machine?
    Machine is P4/W2K
    Thanks a lot

    You can do this as long as you install them in different Oracle homes.

  • Partial-credit scoring in multiple response and multiple hot-spot questions

    Hello everyone,
    I'm calling on your generosity in the spirit of the holidays to help out a noob.  I would like to create matching, multiple-response and multiple-hot spot questions where the user receives credit based on the number of correct answers within the question. For example, in a matching question where there are four items; if the user gets 2 out of the four items matched correctly, I would like for him to receive 2 out of 4 points.
    I understand that Captivate doesn't support partial-credit scoring of this type, but a few posts have implied that it can be done with variables. Is there anyone who can walk me through this process, or send me to a link that will walk me through it? (I've scoured these forums and tried the Cp tutorials, to no avail.) And if it's not asking too much, please make it understandable to someone who has very little experience with variables.
    Thanks, and Merry Christmas.
    JR
    (Running CP 5 on Windows Vista)

    Hello,
    I did publish an article more specific on partial scoring, perhaps this could help you:
    Partial scores and customized feedback
    And since you are asking for more basic information, on my blog I point to some other articles to explain the meaning of variables with/without advanced actions. Feel free to have a look (there are more postings about advanced actions and links to articles over there):
    Curious about variables ?
    Unleash the power of variables with advanced actions
    Lilybiri

  • Oracle HR restrictions based on multiple assignments and multiple GRE's.

    In oracle HR, with multiple assignments and multiple GRE. How can we restrict to having 1 assignment per GRE. I do not want more than 1 assignments per GRE. Has anyone done this before?

    Hi,
    If the requirement is to prevent the creation of multiple assignments, you can achieve that by personalizing the assignment form.
    Thanks
    Satheesh

  • Multiple rows and multiple cols inone report

    Hi
    All
    I have a req where i need to build a report with multiple rows and multiple columns
    .... .......................  2009 jan ,        2009 feb ,      2009 march ,   2009 april...........................
    ............................ dim3 mem1 ,    dim3 mem1 ,  dim3 mem1,     dim3 mem1..........................
    dim1 mem1
    dim2 mem1
    calc value
    dim1 mem2
    dim2 mem1
    calc value
    dim1 mem3
    dim2 mem1
    calc value
    please advice if i can use the colkey range and rowkeyranges for this type of expansion and how?
    thanks
    Edited by: bpc_now on Oct 21, 2010 6:40 AM

    Hi,
    If you need multiple dimensions, then the first thing is to specify EVDRE("mXn")
    where m = number of dimensions in column
    n = number of dimensions in the row.
    If the EVDRE has already been built and you wnat to change it, then you need to change the rowkeyrange and colkeyrange. And accordingly, you should have 4 expansions - 2 for rows and 2 for columns.
    Hope it helps.

  • Multiple sizes and multiple quantities of an item

    How do I create a shirt order form where someone can order multiple sizes and multiple quantities of an item?

    Hi,
    There’re some order templates, Shirt(Clothing) Order Form,  that might be meet your request. Or you can design a custom form according your requirement if you’re a form author or coauthor. For your case, when you design the form, you can choose the multiple choices, single choice, or other fields, etc.  And you have to enable the payment under options tab, and assign fields as a purchase fields. At the same time, you can share the web form to the form filler to make an order.
    Thanks,
    Guanshuai

Maybe you are looking for

  • IT performance report in workcenter logon getting failed

    Hi All, When i click on the IT performance report in workcenter log in getting failed Steps: Solman_workcenter tx -System monitoring ->System status -selected the system When I click on IT performance report I am not able to login I am getting this b

  • Print script in pdf format

    Hi all, I have a script and i need to print it in pdf format ,right now its printing in orginal or normal .Please let me know what i should do in order to print it in pdf form, i don't want to save it somewhere and then print it,i need to print it di

  • Import Video To Layers gone?

    I have Photoshop CS4 Extended and I recently transfered to a new PC and redownloaded it, I installed all updates. I recently went to go transfer a .mov file into layers via Import Vide to Layers in File -> Import to see that it is gone. How do I fix/

  • IPod Mini ~Major Problem

    Ive had my iPod Mini for 2 years roughly I think now and havent had any major problems at all. Yesterday its started playing songs without my touching any buttons and skipping to the next song in exactly the same place as the one before started ~ 2.0

  • Diff ORA homes on same host

    Hi guys its me again I have question is it possible to have homes of two different versions on same Linux host? I have installed 10.2.0.3 Db on one home and on second one 9.2.0.4. After several attempts i have finnaly finish that but now i have this