How to handle mulitple clients ?

How can one handle multiple clients ? Say if I implement RMIserverInterface in RMIServerImpl.I may have n number of RMIClients.How can I handle this situation.What object name should the client look for....
cheers !

All of your clients will access the same instance of the server. RMI automatically calls the server in a different thread for each client call. So what you have to do is provide any required synchronizzation among the threads.

Similar Messages

  • How to handle multiple clients with DatagramSocket

    I am trying to handle multiple clients with 1 datagramSocket bind to one port (basically I have only one port to use, and I can not use TCP or any other ports). At the server side I have two threads one for receiving packets and buffering them, another for processing the packets in the buffer and sending replies.
    I can have multiple clients sending datagramPackets to me and I will have to process the packets and send them to DIFFERENT clients. Ex. Client 1 sends datagramPacket to Server which sends the processed packet to Client 2. Also Client 2 sends a datagramPacket to Server which again processes the packet and sends it to Client1. May have Client 3 and 4 doing the same thing at the same time... and so on...
    My root class is creating the datagramSocket(somePort) and two threads (receiver and sender). How can I use the socket that I created in these two threads??
    I have done the following and I am getting "java.net.bindexception". When I am sending stuff from Client1 to Client2 everything is fine but when I start sending something from Client2 to Client 1, I get the bindexception... Client 1 is using port 3000, Client 2 is using port 4000.
    I really don't have a lot of experience in socket programming so I am not sure if there is a much simpler way to do this. I appreciate all the tips and help that I can get...
    Thanks...
    class UDP_serv
         static DatagramSocket udpSocket;
         final static int SERVER_PORT     = 2000;
         public static void main(String[] args) throws SocketException
              udpSocket= new DatagramSocket(SERVER_PORT);
              new DataReceiver().start ();
              new DataSender().start ();
         static class DataReceiver extends Thread
              DataReceiver()
                   Thread.currentThread().setName("DataReceiver");
              public void run()
                   while (true)
                        byte pckt[] = new byte [MaxMsgSize];          
                        DatagramPacket dp = new DatagramPacket (pckt, pckt.length);
                        try
                             udpSocket.receive (dp);
                             //PUSH TO RECEIVE BUFFER
                        catch(Exception e)
                             e.printStackTrace();
         static class DataSender extends Thread
              DataSender()
                   Thread.currentThread().setName("DataSender");
              public void run()
                   while (true)
                        processDataMsg();
          static void processDataMsg() 
             DatagramPacket op;
             InetAddress DA = null;
             int DP = 0;
             byte [] outPacket = null;
             // POP FROM RECEIVE BUFFER
             // SOME PROCESSING HERE     
             // Set Destination Address (DA)
             // Set Destination Port (DP)
             // DA and DP are the forwarding IP and Port addresses
             // not the addresses original packet was sent from.
             try
              op = new DatagramPacket (outPacket, outPacket.length,DA, DP);
              udpSocket.send(op);
             catch (IOException e)
              e.printStackTrace();
    }Also for development and testing purposes, I am running the two clients and the server on the same machine (windows xp-32b) so all of the Destination IP Addresses are 127.0.0.1. and as I said Ports that I am using are 2000, 3000, 4000 (Server, Client1, Client2).

    Hmm I have minimized the code and it seems to be working now.
    I think I have an error in the header portion of the data I am sending, where I am storing the source IP/Port and destination IP/Port. I think the server in the middle is messing these values up while sending them to the destination Client. Because the destination client actually receives the stuff and sends the reply back to the server, but the reply packet's headers has 0/0 as the dest IP / Port...
    Server is giving me java.net.BindException: Cannot assign requested address error when it tries to forward the reply it received from the client2 as the address it is trying to send is 0!
    I guess it doesnt just give this error when you try to open two sockets to the same port...
    Paul, Thanks for the direction on how to proceed... took me a while get the minimized code but at least figured out the problem. Well still have to make sure that is THE problem though :)
    As far as the statics goes how can I change those to non static ones? Where do I make an instance of the top level class that creates the threads? and how do I pass the DatagramSocket to the threads/ if I dont need to pass how do I call or use the datagramSocket I created in the top level class? I mean do I still kinda have it like a global variable on the top?? A very simple example would be much appreciated...
    I think these might be really basic questions but I am having a rough time with the hierarchy in java...

  • How to handle a client copy

    Hello gurus,
    we have a SAP GTS-client connected to our ERP quality assurance (QA) system for testing purposes.
    Now, we are planning to do a client copy from our ERP production system to our ERP QA-system.
    After that, there will be a inconsistency between ERP and GTS (QA clients):
    E.g. I created several new vendors in our ERP QA-system that were then transferred to SAP GTS (QA) with the vendor number given by the system (lets say vendor 215245 u201CTestvendor Inc.u201D). Now after the client copy, those vendors will have been overwritten in SAP ERP (QA) and there will be a u2018realu2019 vendor with that vendor number (e.g. 215245 u201CRealvendor Corp.u201D)).
    Same goes for documents created for testing before the client copy.
    My question is: How can I handle those inconsistencies? May I just transfer all the changed business partners and documents again or will that give me additional trouble?
    Thanks in advance
    Alicia

    Hello Alicia,
    just execute initial transfer of customers/vendors. Changes will be overwritten with no inconsistencies.
    With the documents i assume inconsistencies, but you will see them in the system log.
    BR,
    Gabriel.

  • How to handle when Client and server write to the socket at the same time

    Hi all,
    I'm writing a socket communication when client and server may write information the the socket at the same time. I look every where but the samples from the internet only shows example of server replies to client after receiving requests from clients.
    Let's say that:
    Client 1 ->Socket 1 -> Server 1
    Now if there are two threads in the server, one blocked waiting for the input from client on socket 1, the second one write something on the socket to client 1, is it possible?
    And if it's possible, if at the time Server 1 writes information to Client 1, Client 1 writes some information to Server 1 too, will there be any conflict problem or the socket could handle that two ways communication simultaneously?
    It's critical questions for me. Thanks for your help.

    I really use Server Client paradigm. However, beside the request, response mechanism, there is also an additional mechanism called update which server periodically send information update to client without the need for a request from client.
    So you suggest client should initiate 2 sockets, one for request and response, one for receiving update from the server? Will this work?

  • How to handle different languages in Illustrator for big clients?

    Hi Guys,
    I need small suggestio for 'How to handle different languages in illustrator for big clients'. For instance; Arabic, this is a language which  needs to be read from right to left instead of left to right. There are  other strange languages as well (Cyrillic, Chinese etc.). It happens  also that when you copy strange languages from a word file it will not  be easy to paste it the correct way in a .ai file. Besides that, it’s  also difficult to do a language check when we are not able to read it!. So,  to make a long story short, I want to figure out how we can deal with multiple language  circles?
    Can you some please give me the solution for this...
    Thanks in advance...
    HARI

    I take it you might come from an arabic background.
    Here is how you can help yourself to some degree.
    Google has a translation feature and service which is at the moment free. It is excellent.
    Secondly if you are working with ME languages you really need the ME version of Illustrator or any other Creative Suites Application in order for it to work properly.
    It, is also best to enable the language and the input for that language for your system on the Mac it is easy you go to the Language and text feature in theSystem Preferences, once enabled you can select the fro the menu bar under the American flag if you are in the US. Thst will appear once you have more than one language selected.
    You select the language input you need and then a font for that language then paste and edit.
    You need fonts on your computer that are of those languages as well.
    How to manage this as a work flow well that is something you will have to work on yourself or hire a consultant who specializes in this area.
    We had a few visit here when they have come across a snafu. So they exists.

  • How to handle a glitch gracefully with client

    Any professional designers here, I could use some perspectives on how to handle a situation.
    Briefly: first time client, somewhat fussy but well-intentioned and nice to work with. I designed an annual report for them, process color, nice piece. The cover image is a color satellite image from NASA, and on the proof some slight horizontal banding appeared in one area that turned out to be a glitch in the printer's proofing device.
    I did some very slight color adjustments on the image and on the second proof some diagonal banding appeared in the same area. After discussing this with the prepress chief, I concluded again that this must be another proofing device issue. I did not see this banding on my monitor, so concluded it wasn't in the file.
    At the press check yesterday I was surprised to see the banding. I discussed it with the prepress chief again, he said he had noted it on screen the previous day and "thought that T---- was going to discuss it with you." To my knowledge nobody had contacted me (T---- was off that day).
    I have never stopped a print run before and was reluctant to do so now (everything else looked A1). This banding in one area of the image didn't seem catastrophic, just annoying to my fussy designer eye. A lot of people might not even notice it. Apparently, it's part of the original composite digital image NASA created.
    So the question is, how do I handle this with my client? When showing them the proof with the banding, I said "don't worry, this won't be on press."
    My professional sense is that I offer to correct the cover in Photoshop at no charge and have it reprinted (nothing has been trimmed or bound together yet--I've asked the printer to hold off on that). Do I wait and see if my client even notices? Do I point it out first thing?
    And with the printer, do I insist they reprint the cover gratis? Or do I share responsibility?
    If I had it to do over again I would've insisted on a perfect proof...I was just trying to keep things moving along and I trust this printer who I've worked with before (they do good work).
    Thanks for your perspectives.

    Thanks guys. I had a good chat with my printer rep. today, nobody pointed any fingers, they basically said they are willing to do whatever is necessary to make things right, except they indicated that they would charge for any additional prepress time. That seemed fair--I can do the Photoshop work and all they need to do is run a new proof and burn a single plate. I would cover that cost.
    Later in the day I met with my client and told them everything went fine except for one glitch--I asked if I could wait until after they'd reviewed the proof to reveal it, just to see if it was obvious. They good-naturedly went along (we have a good rapport) and could not spot the problem. When I pointed it out and explained what happened, I said I would be more than happy to fix it, no charge to them, just a little extra time delay in getting the final product.
    The person I work directly with felt it wasn't worth fussing over, but wanted to show it to the boss who wasn't in today. So I'll get a final answer tomorrow (he's the fussy one, so I'd say there's a pretty good chance he'll want a reprint).
    I feel it has been handled well by everyone to this point. Good learning experience for me.
    Thanks again for your input. Any further advice or comments welcome.

  • How to handle the master data when we are loading the from multiple clients

    Hi,
    We are loading HR data from two different clients 101 and 102 of same source system.
    Here we are facing the problem with msater data maintenance for employee in BW, whose employee numbers are same.
    For example client 101 employee range is 10001 to 10100.
                      In client 102 also same employee range.Then how to handle the above scenario
    Is there any solutions apart from compounding of infoobjets with logical system.
    Thanks in advance for your sugessions.
    Thanks.
    Maria.

    Hi ,
    you  can create copy of 0EMPLOYEE Object.
    Load one client master data to the copied object.
    Example:
    1. Create ZEMPLOYEE copy of 0EMPLOYEE.
    2. create the transformation or rules
    3.  You have to follow same for remaining objects
    regards,
    HREDDY

  • How to handle password changes if we implement singlesignon between BO& BI7

    Hi,
    As we know ,we can implement single signon between BO and SAP BI 7, by importing roles and users through CMC and by selecting the option "Use Single signon during report refresh time".
    My doubt here is, When we import roles from SAP and Auto import the users, is it only the SAP usernames that are stored in BO repository or both username and password. If  second case holds true then how to handle/manage password change for a user who is already imported in BO sometime back?
    Would the password changes be reflected automatically in BO?
    Please guide me if you think that I'm thinking in a wrong direction.

    Hi Naresh,
    password changes are reflected automatically in BO. BO just forwards the data to the SAP side and it does the real authentification.
    Regards,
    Stratos
    PS: Keep in mind that you cannot change the SAP password on the BO login screen if your SAP password has expired. You have to do this with the SAP client (SAP GUI)

  • How to handle multiple site to site IPsec vpn on ASA, any best practice to to manage multiple ipsec vpn configrations

    how to handle multiple site to site IPsec vpn on ASA, any best practice to to manage multiple ipsec vpn configurations
    before ver 8.3 and after version 8.3 ...8.4.. 9 versions..

    Hi,
    To my understanding you should be able to attach the same cryptomap to the other "outside" interface or perhaps alternatively create a new crypto map that you attach only to your new "outside" interface.
    Also I think you will probably need to route the remote peer ip of the VPN connection towards the gateway IP address of that new "outside" and also the remote network found behind the VPN connection.
    If you attempt to use VPN Client connection instead of L2L VPN connection with the new "outside" interface then you will run into routing problems as naturally you can have 2 default routes active at the sametime (default route would be required on the new "outside" interface if VPN Client was used since you DONT KNOW where the VPN Clients are connecting to your ASA)
    Hope this helps
    - Jouni

  • How to handle images (or let say mimes)

    Dear MDM Gurus,
    I want to start a discussion on how to handle MIMEs in MDM best.
    Szenario is MDM as a SRM Catalog System - Some million products(records) and as many mimes.
    - Import or linking?
    - What are the pros and cons of these two ways?
    - If I link images can MDM Server deliver them or do I need a seperate Webserver?
    - If I import them how will the DB Size extend?
    - If I "only" link the does it make a difference while lookup at import?
    Maybe some of you have more questions and hopefully some of you have a kind of best-practice help for us.
    Best regards
    Roman

    Hi Roman,
    Its a nice discussion you have started. According to me
    Advantage of linking
    1. You can store the millions of images in the separate machine so the disk space on which SQL Server is installed can be used to store other data.
    Disadvantage of linking
    1. It may take some time to load the repository or in accessing the MDM clients because system has to actually search the location and fetch the mimes where they are stored.
    Advantage of Storing
    1. Loading and Opening of MDM Clients time can be reduced since all the images are stored in the repository itself
    Disadvantage of Storing
    1. If there are millions of images as you have said then majority of drive space will be used by these mimes and hence we can create less MDM records
    Note: Sounds, Videos when stored in the repository cannot be played directly from the MDM Data manager they are first saved some where then only we can play them while this is not the case with linking
    Regards,
    Jitesh Talreja

  • How to handle xml message in proxy inbound processing?

    Hi Experts,
    I have a scenario that is SOAP Client====>XI===>ECC.
    But i don't need to use the XI mapping,i skip mapping
    in XI and use the generated proxy inbound processing.
    Here is a message structure as below.
    <commodityList>
    &#9632;<commodity>
    &#9632;&#9632;<detailNo>303303</detailNo>
    &#9632;&#9632;<makerName>sony</makerName>
    &#9632;&#9632;<ChargeInfoList>
    &#9632;&#9632;&#9632;<productId>aaaa</productId>
    &#9632;&#9632;&#9632;<name>bbb</name>
    &#9632;&#9632;</ChargeInfoList>
    &#9632;</commodity>
    </commodityList>
    When i sent the message without field entry of <productId>
    and <name> i got the response in soap client as below.
    <commodityList>
    &#9632;<commodity>
    &#9632;&#9632;<detailNo>303303</detailNo>
    &#9632;&#9632;<makerName>sony</makerName>
    &#9632;</commodity>
    </commodityList>
    The field tag <ChargeInfoList> doesn't display.
    But i want it to display as below.
    <commodityList>
    &#9632;<commodity>
    &#9632;&#9632;<detailNo>303303</detailNo>
    &#9632;&#9632;<makerName>sony</makerName>
    &#9632;&#9632;<ChargeInfoList>
    &#9632;</commodity>
    </commodityList>
    In case of field entry is empty,how to  let the response
    contains tag?
    As i know ,there is a CONTROLLER in proxy .
    But i don't know if it is relevant to this
    case and i don't know how to handle it.
    Brand

    Hi Mrudula,
    As far as i know there are no content conversion methodology for HTTPS as the recevier adapter.
    Also you can read through these links to confirm the same:
    http://help.sap.com/saphelp_nw04/helpdata/en/0d/5ab43b274a960de10000000a114084/content.htm
    http://publib.boulder.ibm.com/infocenter/wbihelp/v6rxmx/index.jsp?topic=/com.ibm.wbia_adapters.doc/doc/sap_xi/sapximst30.htm
    SAP NetWeaver - XML Communication Interface (CA-XML) [original link is broken]
    Regards,
    abhy
    note: reward the helpful.

  • How to handle multiple requests to the same servlet at one time?

    Hi,
    I am new to Servlets. I have doubt regarding ... Handling multiple requests to a servlet at a time.
    If we send a single request to a servlet, as know that group of objects such as servlet, servletContext, servletConfig, request, response and etc are created in the server, And if 1000's of requests are sent to a same servlet at a time, and if server memory capacity is less, then 1000's of objects are created in a server which would be heavy burden to Server. How to handle the application and development in such situation?
    Kind regards,
    veerendra

    Hi veerendra reddy ,
    By default any web server can will have a thread pool to handle client req's.
    In your point also heavy burden to server you are telling that depends on this.
    we can configure this min & max size of this thread pool.
    by default it will be 0-1000 for tomcat server.
    I am not sure in which file this configuration will be.
    But I hope in server.xml or some xml file consists this info.
    If You what you can edit accordingly. to overcome your heavy burden to server.
    Thanks & Regards
    Nagendra

  • How to handle DEPB in SAP in case of imports

    Dear all,
    I need some help about how to handle DEPB licence in case of imports.
    My client is a trading company. It Imports goods. for the payment of custom duty it purchase DEPB licence from third party and do the clearance against DEPB
    So when they pass the custom duty MIRO, i have to keep track of how much amount is utilised from which DEPB licence..
    in custom clearace more than one DEPB licence can be used.
    What settings i have to do in pricing procedure?
    What I think is, we can create one vendor as DEPB vendor and when we pass miro for duty we will pass it against DEPB vendor?
    thanks n egards
    Edited by: Anil M.Patel on Sep 9, 2009 11:31 AM

    Soumya,
    BPM is the right tool for the requirements you have mentioned.
    Have a look the links to get a detailed understanding.
    http://www.sdn.sap.com/irj/sdn/nw-processmodeling?rid=/webcontent/uuid/006a16ad-a3ad-2b10-4e9a-af2ee5820848 [original link is broken]
    SAP NetWeaver Business Process Management Resource Center
    Br,
    Bala

  • How to design a client object???

    hello,Michael Wooten
    thank for your help, now I know the list of Java data types for the parameters
    and return values, and their corresponding SOAP data types.
    but how to design a client object, f.e: this object is value Object in ejb, their
    have some gets and sets methods, these set methods, their return type is void
    in java, but now in web service,how to deal with these prolem?
    like ejb, we have ejb's design pattern, for web service, do we have their design
    pattern also?
    thanks :-)

    Hi littlehill,
    In general, you want to think of the input parameters (and return values) for
    a web service method as "hierarchical state", not objects :-)
    The main motivation for taking this approach is to reduce the likelihood of interoperability
    issues with other (noteably non-Java) SOAP packages. The JavaBean model provides
    a simple, easy to implement mechanism for creating "hierarchical state", because
    it allows nesting. Using this nested JavaBean approach, you should be able to
    create an object graph that represents your "value object", but again the key
    here is to not thinking of them (the value objects) as objects, but state ;-)
    Each SOAP (or Web Services) toolkit will have a different approach and API for
    writing SOAP clients, unless it supports JAX-RPC. This being the case, it is a
    bit difficult to come up with an "across the board" design for a web service client
    ;-) In the case of Java-based SOAP toolkits, most developers prefer to "stay in
    the object world" as opposed to dealing with XML parsing APIs. To accommodate
    this desire, most Java-based SOAP toolkits have a "XML-to-Java, Java-to-XML" type
    mapping mechanism to handle the complexities of this task. If you don't want to
    muck around with type mappings, you should look around for a product that can
    generate Java classes from XML Schema, and vis-versa. WLS 7.0 does a better good
    of this than WLS 6.1, so you might want to check it out. I've also had a fair
    amount of success with the Exolab Castor data binding package (http://castor.exolab.org/sourcegen.html).
    It has a very comprehensive implementation of "XML Schema Part 1: Structures"
    and "XML Schema Part 2: Datatypes", is open-source, and works quite well. When
    you get down to it, a good XML Schema processor is key to saving yourself lots
    of frustration and coding.
    Regards,
    Mike Wooten
    "littlehill lee" <[email protected]> wrote:
    >
    hello,Michael Wooten
    thank for your help, now I know the list of Java data types for the parameters
    and return values, and their corresponding SOAP data types.
    but how to design a client object, f.e: this object is value Object in
    ejb, their
    have some gets and sets methods, these set methods, their return type
    is void
    in java, but now in web service,how to deal with these prolem?
    like ejb, we have ejb's design pattern, for web service, do we have their
    design
    pattern also?
    thanks :-)

  • How to handle the Timestamp datasource while migration

    Hi All
    " I tried searching the forum,but didnt get the relevant one,hence posting this question".
    While migration from 4.7 to ECC in R/3 system,
    how to handle the Timestamp datasources( especially FI like COPA and other ) while extarcting the data from source to BW during source system migration.Since we need to empty the delta queue and should make sure that there are no delta records exists in delta queue.
    Like for sales datasources using LO,we will be executing the V3 jobs for execting the LUW's from LBWQ to RSA7?  In the same way is there any particular way for this also.
    Anyone whi knows abt this pls share your views
    Regards
    Shankar

    Hello Shankar.
    Before the upgrade (import of a queue), all extraction queues and open
    update orders in all clients must be processed. The content of the setup
    tables must be deleted. To avoid problems during the upgrade or to
    correct them, carry out the following steps:
    1. Call transaction SMQ1 and check whether all queues in all clients
    (client = '', queue name 'MCEX') have been processed. To process the
    queues, start the collective run report for each application in the
    displayed clients. If you no longer need the data in the BW system,
    deactivate the relevant extraction queues and DataSource in the LO
    cockpit (transaction LBWE) and delete the queue entries in transaction
    SMQ1.
    2. If you use the V3 update that is not serialized (usually only for
    application 03): Start collective run report RMBWV303. Then check the
    update orders in transaction SM13. If there are incorrect update orders
    in transaction SM13, correct the orders and then start the collective
    run report again. If you no longer require the update orders, you can
    delete them. There may be inconsistencies between tables VBMOD and
    VBHDR. For further information about this, see Notes 652310 and 67014.
    3. Before the upgrade, delete the contents of the setup tables. Execute
    report RMCEX_SETUP_ENTRIES to find out which setup tables still contain
    entries. You can use transaction LBWG to delete the contents of the
    setup tables for all clients.
    Unfortunately the check that the system carries out during the upgrade
    or when you import a Support Package does not display all affected
    applications. Therefore, Note 1083709 provides a check report that you
    can use to determine all affected applications and tables or queues.
    More detailed information please check these following notes:
    1083709-Error when you import Support Packages
    1081287-Data extraction orders block the upgrade process
    I hope I can be helpful.
    Thanks,
    Walter Oliveira.

Maybe you are looking for

  • Cannot send email from non .mac server

    I am only able to send/reply emails using my .mac address. My 2 other server addresses keep giving me the following message. "Cannot send mail. One of the recipient addresses was invalid". How can I fix this?

  • Can you associate a note with a To Do in iCal?

    I'm struggling to make sense of Apple's Notes and To Do functionality. I know I can create a note or a to do item in Mail, and the to do's will show up in a special calendar in iCal. I'm fine with that as it's a somewhat similar model as Outlook, wit

  • How to Displaying Operating specific data in Discoverer Reports.....?

    Hi Experts, My Requirement : I need to develope one custom report where it has to display operating unit specific data based on the resposibility selection in Discoverer. My Approach : I prepared the below query and I am trying to pick Business_group

  • Need user-exit ....

    Hi Gurus, In vendor line item display(FBL1N) ,when i'm changing Reference no. by going through the Display doc. header button...and save it ,,,it will update in BKPF table...... But for some purpose of mine i need to update in RBKP table (Invoice hea

  • Problems Migrating from iPhoto 6 to 11

    I'm moving from an older Macbook Pro to a brand new one, and used Migration Assistant to help get everything moved over. iPhoto 11 on the new machine found most of my photos but there were some anomalies. I'm wondering if anybody can shed any light o