Connecting to multiple clients

I have a question. i have one client and one server. the server connects a client and send some data which i am able to achieve it. my question is (is there a way to connect the same server to multiple clients?) secondly i want to make a check lets say that one client machine can accept only 30 data like (Dell $30.00). once the client recieve 30 data my client should say that i am full and then the client should write the data to another client machine ? is it possible?

If you feel like getting fancy, a scalable server could use NIO: http://java.sun.com/j2se/1.5.0/docs/guide/nio/index.html

Similar Messages

  • Connect CRM multiple clients to ECC

    Hi SAP Gurus,
    I have one Question regarding CRM->ECC connectivity.
    Will it be possible to connect multiple clients of CRM to ECC ? Like more than one client can talk to ECC ?
    Because in BW we can not connect multiple clients to source system ! does this true with CRM also or not ?
    Thank you

    1) As datasources are client independent so do we need to activate the datasources (like 2lis*) in all clients one by one? or just activating in one client will make it ?
    You need to activate the datasources individually for all the client. If you will activate in one client, it will be specific to that only
    ) If we replicate the datasources for new clients in BW side and then want to reload the data from New clients (set-up tables filling and INIT)?would it have an affect on existing deltas (for datasources 2lis*)for existing Source client 100? What shud be the precautions? How we can proceed?Please let us know your opinons plz
    If you will replicate in one client system, it wont affect delta and init from other client.
    One thing you can do, to identify data from different source systems, you can use source system compounding in your infoobjects. Make sure you are not loading data from both the client at the same time. it may lock the DSO and master data.

  • Accepting connection from multiple client

    Hi, i try to open a port on the server and allows others client to connect to this port and sent in data. It works well when it's 1 server to 1 client relationship. But when i turn on 1 server to many client connection where all the client will connect at the same time... none of the client data were capture in the server. Here is my code :
    Server code:
    static class Listener extends Thread
              public void run()
                   ServerSocket svrSocket;
                   Socket soc;
                   try
                        svrSocket = new ServerSocket(20);
                        System.out.println("---------------------------------------");
                        soc = svrSocket.accept();
                        System.out.println("---------------------------------------");
                        BufferedReader in = new BufferedReader(new InputStreamReader(soc.getInputStream()));
                        String strTest;
                        while((strTest = in.readLine()) != null)
                             System.out.println("SEE THIS !!!!!!!!!!!!! " + strTest);
                   catch(Exception e)
                        e.printStackTrace();
    Client code:
    socClient = new Socket("10.1.8.101", 4444);
    outPrintWriter = new PrintWriter(socClient.getOutputStream(), true);
    outPrintWriter.println(strWrite);
    Can anyone help me??? IT"S URGENT....
    THANKS

    Your code will only handle one connection at a time currently. To handle more connections it needs to be reorganized, see below. Also, you may be having a problem with binding port 20 in your server and trying to connect to port 4444 in your client. These ports obviously have to be the same or its never going to work at all! :-)
    Without getting into thread pools and stuff, this is a sample of how you might want to organize your server.
    import java.net.*;
    import java.io.*;
    import java.util.*;
    public class SocServ implements Runnable {
        // running flag set to false to stop server.
        public static boolean isRunning=true;
        // set of servicing threads, if needed.
        private static Set servicers = new HashSet();
        public void run() {
            ServerSocket svrSocket;
            Socket soc;
            Thread t;
            // open the server socket, error if port is in use, etc.
         try {
                svrSocket = new ServerSocket(4096);
                // accept connections, and start new SocServicer threads.
                while (SocServ.isRunning) {
                    soc = svrSocket.accept();
                    t = new Thread(new SocServicer(soc));
              SocServ.servicers.add(t);
                    t.start();
                // server finished, close socket
                svrSocket.close();
            } catch (IOException e) { e.printStackTrace(); }
    import java.net.*;
    public class SocServicer implements Runnable {
         // socket connection being serviced...
         Socket s;
         public SocServicer(Socket soc) { s=soc; }
         public void run() {
              if (s==null) { return; } // for sanity
              * Do all the interaction with each socket here.
    }The idea is to run one thread that listens for connections and then spawn new threads to process each connection. This way one connection does not have to wait for the previous one to finish. For a serious application you will probably want to do some more careful management of the SocServicer threads [because each thread eats up memory & resources].

  • Multiple Client Logon in JCO

    Dear All,
    We import an RFC as a Model and the names used for the connections are used to create JCO connections in the WEB AS.
    However we have a need where we will know the SAP Client number only on the runtime. This means that the JCO connections can not be pre created in the WEB AS.
    To solve this i tried the following solution:
    I created 2 JCO connections for 2 different client Numbers in WEB AS. After importing the RFC i went to the class file where the connection name is mentioned. I applied a condition by coding to choose one of the JCO Connections which i created programatically. However when i rebuild the project this complete code is overwritten to the connection name specified in the wizard during the RFC model import.
    Can anyone suggest answers for the following ?
    - How can i manipulate the connection name of the JCO in code without being overwritten during rebuild ?
    - Do you know of any other ways other of achieving my objective of connecting to multiple clients and deciding the connection name on the runtime?
    Kind Regards,
    Mukesh

    Hi Mukesh,
       If you already have a JCo connection created based on the LDAP credentials, you can fetch the details like this:
    try {
    IWDJCOClientConnection clientCon =  WDSystemLandscape.getJCOClientConnection("<name of the JCO connection>");
    String clientName      = clientCon.getClientName();
    String lang          = clientCon.getLanguage();
    String passowrd          = clientCon.getPassword();
    String sysID          = clientCon.getSystemIdentifier();
    String user          = clientCon.getUser();
    //etc...
    } catch (WDSystemLandscapeException e1) {
    // TODO Auto-generated catch block
    e1.printStackTrace();
    Is this what you are looking for?
    Regards,
    Satyajit.
    Message was edited by: Satyajit Chakraborty

  • Ep 6.0 single backend multiple clients

    Dear all,
    system details: ecc 5.0 unicode sap aba 16, basis 16,appl 11,hr 19+MSSQL 2000 with collation bin2 (SP4) and windows 2003. EP 6.0 SP9 WebAS 6.40 sr1
    First i installed portal with rapid installer 2.5.1 but it connects only with client 000. i tried to give client 100 at installation time but it was not accepted.
    Then i installed with netweaver 04 dvd. it accepted client 100.
    now my company want that portal should be connected to multiple client with backend system as my backend system is development and they will check first in a sandbox client and then with user testing in a test client.
    How to do this.
    Secondly, in user management>role "page cannot be displayed" error and this error is coming only in this page.
    One thing i should tell you that when i installed with rapid installer it was working fine with client 000 but when i changed the client in system landscape i was able to logon no tab displayed. the message was that the user may not have proper authorizations. may be something to do with portal roles. I want to know how can i transport these portal roles or user config to other clients.
    in WP3R, it says no object found.
    Can anyone help
    Thanks
    Imran Hasware

    HI Imran,
    u used User management with ABAP system than u have to assign the role to user from R3 system side. after assignning a role u start the J2EE server.
    check the follwoing
    http://help.sap.com/saphelp_nw04/helpdata/en/49/9dd53f779c4e21e10000000a1550b0/content.htm
    regards,
    kaushal

  • Multiple clients on socket connection

    Hi!
    I understand that it is possible that multiple clients listen to one server (on the same port) and even write to it (then it should be a multi-threaded server).
    But i would like to refuse connectios, if one client is connected. How can I do that?
    In my case I have a (single threaded) server. Now one clients connects. The server waits to receive data from the client and answers, without ever closing the port. that works.
    Now if I connect with a second client, the openicng of the socket in the second client works fine, although the server does not seem to notice the second client. Communication is not possible between the server and the second client, and the server doesn't answer to the first client anymore, although he receives data from it.
    So, since the server does not seem to notice the second client (does not accept the connection) and I don't get an exception at the second client, what can I do?
    Thank you for your help!
    concerned Code (if you want to take a look at it):
    CLIENT:
    socket = new Socket(hostname, echo_port);
    SERVER:
    try
    ServerSocket waitingsocket = new ServerSocket(echo_port);
    try
         socket= waitingsocket.accept();
         System.out.println("Client connected");
         ReaderThread reader = new ReaderThread( this, socket );
         reader.start();          
    catch (Exception e)
    READER:
    public void run()
         while (true)
              try {
                   int bytesRead = inStream.read(inputBuffer,
                   0, inputBuffer.length);
                   readCallback.tcpUpdate(inputBuffer,bytesRead);
              catch (Exception oops)
                   readCallback.tcpUpdate(null,-1);
              

    Just to make sure this is clear: You can NOT have multiple clients on a given socket connection. You CAN have multiple clients connected to a particular port on a given server, but each client will be communicating with the server through a different of socket.
    The usual approach here is to set up a listening ServerSocket on the desired port, call accept() on it, then process the communication from the returned Socket object. This is usually done by spawning a new thread and allowing it to handle the socket communication, while the ServerSocket loops around to another accept() for the next communication.
    Here's an excellent intro to the concepts (the code is really ugly and poorly implemented, but it does a good job of explaining the overall concept). I used this as a starting point, and now (after a whole lot of development) have a pretty sweet extensible web server class that handles template expansion, etc... (I use this as a quick and dirty UI for some of my apps, instead of requiring the user to install a JSP container):
    http://developer.java.sun.com/developer/technicalArticles/Networking/Webserver/
    - K

  • How can I connect multiple clients to a single client ?

    I am currently developing an instant messaging program.I created a server and connected multiple clients to it by using thread logic.However I do not know how to connect multiple client to a single client.
    What shall I do for that?Does anybody know a good tutorial or sample program?Or shall anybody explain me what I shall do for building the Instant Messaging part of my chat program?
    Thank u in advance.

    You may use UDP multicast socket. But since you are using the UDP protocol you might risk losing the data that you send since UDP does not guarantee the safe transfer of data.
    Alternately, you might create a server that allows multiple client to connect to it whose connection Socket objects are then stored in a Vector <Socket> object. The server then sends back data to the connected client about the other clients connected to it. Now when the client wants to send data (like an IM) to another connected client, it has to send a request to the server specifying the client login name and the server in turn streams that particular client's Address and Port to the requesting client. The requesting client then initiates the connection with the other client and then starts a conversation. One more thing, when the client communicates it needs to send information to the server like the name by which it likes to be referenced. In this scenario the server acts like a central repository for clients to query the existence of other clients in the chat room. Each client here runs a thread that listens to incoming connections and when a connection is established, may be opens a IM window or something.
    The third option is to make the server to relay the information from one client to another. Like say, I'm connected to whoopy server and i want to send "Hello" to jackson, then i send the message (ie, Hello) along with the name of the client to which i wish to send it to (ie, jackson). The server then performs a lookup in its Vector <Socket> object and then initiates a connection with jackson and sends the information. However, this method is pretty costly in that you will be wasting a lot of processing behind the server.
    --Subhankar
    P.s. If you stumble upon any other brilliant ideas let me know.

  • Java client connecting to multiple weblogic instances

    We have a standalone java client JMS application that needs to connect to multiple
    Weblogic instances running in different domains.
    The client works fine when we obtain an initial context to the multiple instances
    without specifying a security principle and password. As soon as we add in this
    information, we get problems: The initial context is still successfully retrieved
    for each of the weblogic instances, but we cannot send JMS messages to destinations
    on one of the Weblogic instances due to a security exception which states that
    there is an 'Invalid Principal'.
    Any advice would be appreciated.

    You should first establish a trust relationship between your Weblogic
    servers:
    http://e-docs.bea.com/wls/docs70/secmanage/domain.html#1171534
    It is very poorly documented since this is a change in the behavior with
    previous versions and should have been in the Release Notes but instead
    is inside the normal documentation.
    --dejan
    jonathan wrote:
    Thanks Arvind, but both JVMs are the same (1.3.1) and there is no jsse stuff in
    the classpath.
    "Arvind Gudipati" <[email protected]> wrote:
    check if yr client's jvm version is the same as server's jvm.. ive noticed
    this problem a few times when i was using client jvm (1.4.x) connecting
    to
    server jvm (1.3.x).. also check if u have any jsse libraries in yr
    classpath.. if so remove 'em
    +arvind
    "Jonathan" <[email protected]> wrote in message
    news:3f2f9f19$[email protected]..
    We have a standalone java client JMS application that needs to connect
    to
    multiple
    Weblogic instances running in different domains.
    The client works fine when we obtain an initial context to the multiple
    instances
    without specifying a security principle and password. As soon as we
    add in
    this
    information, we get problems: The initial context is still successfully
    retrieved
    for each of the weblogic instances, but we cannot send JMS messages
    to
    destinations
    on one of the Weblogic instances due to a security exception which
    states
    that
    there is an 'Invalid Principal'.
    Any advice would be appreciated.

  • Connecting to multiple clusters from the same client

    We have a scenario where our cache client (extend client) should be able to connect to multiple clusters. All the clusters use the exact same configuration (same caches, same services etc) but running in different geographical locations. I know that the <remote-addresses> can be used to add multiple addresses but I'm assuming this is provided solely for fault tolerance. So, does the client actually support connecting to multiple clusters at the same time?
    Thanks
    Sijo Mathew

    Hi Sijo,
    Normally to connect a client to multiple clusters you would just define multiple <proxy-scheme> settings in your client configuration file, each one having a different name and pointing to a different cluster. You then map caches to the proxy-scheme for the cluster those caches live on.
    What may confuse things in your case is that you say the different clusters are identical and contain the same caches and services so you may have problems mapping caches on the client to different clusters.
    What are you trying to achieve by doing this if the clusters are all identical?
    JK

  • Connect Exception when I run multiple client processes

    hi All,
    I run a web logic RMI server on my machine and bind an object. When i try
    to run about 40 multiple clients (each client is a java process) i am refused
    connection. Why???

    wrong url, apparently.
    open the admin console and see that the url from your deployment is. try entering that into the browser instead of what you used to get the 404.
    also, check the logs.
    %

  • Multiple clients to be connected to One BI system

    Hello Experts,
      have to work on a tricky requirement.
      We have already connected one client (say R/3-100) to BI system.We are already running the deltas for the Logistics applications in BI production for this source system clent (100).
    Now the requirement is that we need to connect 4 more clients (say R/3-200,300,400,500) to the existing BI system.We need to take care of the existing delta and INIT for the LO-application for client100.
    My Doubts are :
    1) As datasources are client independent so do we need to activate the datasources (like 2lis*) in all clients one by one? or just activating in one client will make it ?
    2) If we replicate the datasources for new clients in BW side and then want to reload the data from New clients (set-up tables filling and INIT)?would it have an affect on existing deltas (for datasources 2lis*)for existing Source client 100? What shud be the precautions? How we can proceed?Please let us know your opinons plz..
    thank you,
    Balji

    1) As datasources are client independent so do we need to activate the datasources (like 2lis*) in all clients one by one? or just activating in one client will make it ?
    You need to activate the datasources individually for all the client. If you will activate in one client, it will be specific to that only
    ) If we replicate the datasources for new clients in BW side and then want to reload the data from New clients (set-up tables filling and INIT)?would it have an affect on existing deltas (for datasources 2lis*)for existing Source client 100? What shud be the precautions? How we can proceed?Please let us know your opinons plz
    If you will replicate in one client system, it wont affect delta and init from other client.
    One thing you can do, to identify data from different source systems, you can use source system compounding in your infoobjects. Make sure you are not loading data from both the client at the same time. it may lock the DSO and master data.

  • Connect one JAVA ADS instance to multiple clients from the same ABAP system

    Hi,
    Does anyone know whether it is possible to connect multplie clients from the same ABAP system to a JAVA instance running ADS?
    If so how do you setup the java destinations in Visual Admin and SM59 RFC connections?
    Any help is appreciated,
    Sander

    Dear Sander,
    this is always the case if you arrange the ADS connection.
    You have to set up the RFC connection 'ADS' in ABAP side and this connection/destination is client independent. So you can use this from all clients of your abap system.
    On Java side you have to arrange the already mentioned FP_ICF_DATA_<SID> destination. On the ABAP system and client (you specify in this destination) you have to maintain the user ADS_AGENT and your templates should also exist on this client. If there is no client defined, the default client will be used.
    Regards
    Istvan

  • How to use multiple clients within JCO?

    Hi,
    I'm pretty new to configuring Web Dynpro's with it's JCO connections. I have the following question.
    We are using one portal (SAP EP 6.0_640 SP15) and one R/3 system (SAP ECC 5.0) with multiple clients (multiple customers who are all using the same portal).
    Do I have to deploy a web dynpro for each client and maintain it's JCO connection for each client?
    Or is there another way how I can set this up?
    Thanks in advance.
    Kind regards,
    Dave Arends

    Hi Dave,
    <b><i>Do I have to deploy a web dynpro for each client and maintain it's JCO connection for each client?
    Or is there another way how I can set this up?</i></b>
    You dont need to deploy a web dynpro for each client . You can use same JCO connection for multiple User ID's  ( multiple Clients mean multiple user ID's on the same portal ).
    If this is the case then single JCo connection is enough to pull data from R/3 and show on portal page .
    Thanks,
    Nanda

  • How to control one server with multiple clients via TCP/IP

    I am wanting to control a single server with multiple clients.  Only one client would be active at a time, so there would be no conflict.  I want to use TCP/IP.  So far, I have programmed a cluster that passes data back to the server with no problems.  The challenge come in when a second client is added to the mix.  I have't been able to figure out how to turn each client on and send the appropriate data and then turn it off so it doesn't keep sending the same data to the server. 
    Here are the things that I have considered and did some preliminary testing, but don't really know how to impliment:
    1.  Send a numeric on the front of the cluster packet that tells the server that data is on the way.
    2.  Send a boolean on the front of the cluster packet to somehow turn the server TCP/IP on.
    The problem I have found is that LabVIEW TCP/IP doesn't like to be turned on and off.  If it doesn't get the data it expects, it goes into a reset mode and that kills the response time.
    Any help?

    You should consider implementing a set of simple one-byte commands that can be sent back and forth between the Server and the Clients. You can base all of these ideas off the example in the Example Finder under Networking >> TCP and UDP called Multiple Connections - Server.
    You will have two loops in the server VI: one to wait for new connections, and one to send and receive data from the existing connections. For instance, after one of the clients connects, it can request control of the server to send data to it by sending the character "R" for request. Every time the send/receive loop of the Server executes, the first thing it can do is to check all the existing connections to see if any of the clients have sent a control request ("R"). If so, it will create a buffer (array) of control requests. This could be in the form of Connection IDs or indexes in the array for a particular Connection ID. Your choice.
    After the Server receives a request for contol, if it is not already under control by another client, then it can send a response to the first client on the control request list. For instance, the server could send the first client a "S" command for send. Note that after the clients send their control request, they should execute a TCP Read and wait indefinitely for the server to respond with the one-byte "S" command. Then, once the client in control is finished sending data to the server, it could send the character "X" telling the Server to release it from control.
    The example I mentioned above already does a similar thing. Note how when a client wants to disconnect, they send the letter "Q". You can see this in the Multiple Connections - Client VI. The Server then checks each individual connection to see if it's received this one-byte command, and if it has, it closes the connection to the client. This is what you would want to implement, but instead of having just one command, you'll have to distinguish between a few and build up a buffer of control requests.
    Finally, if a client does decide to disconnect in your application, they could send the command "Q" just like the example above. At this point, close the connection and remove that Connection ID from the array of connections. You will also have to handle the case that this client was in the request control waiting line when it disconnected, in which case you need to delete it from that array as well.
    This will definitely work for you, but it will take some work. Best of luck!
    Jarrod S.
    National Instruments

  • Multiple clients with same account on a single IMAP server

    Hi,
    I am connecting to a IMAP server using same account but from 2 different machines. From one machine a mark a message as SEEN=FALSE. But on the second machine, the flag will still be TRUE.
    Is there any way to co-ordinate between multiple clients so that all the clients are in sync.
    Regards,
    Nitin.

    I was able to resolve the problem using addMessageCountListener and messagesAdded method, as suggested by you.
    I am now facing another problem. Whenever a new message is received, code inside messagesAdded method gets executed. Here I am trying to spawn another thread and do some stuff. But this new thread is not starting at all. It goes into some JavaMail:EventQueue and does nothing. What is the concept of EventQueue here? How can I get this new thread executed?
    Also will there be synchronization problems in messagesAdded method. Say I received a message and I am processing it in the messagesAdded method. In the mean time another message comes up. How will this behave.

Maybe you are looking for

  • Tree component and loading xml files into text field

    Hello and thank you for taking the time to read my issue.... I am making a simple self help application.  I have a tree component that loads the different catagories and topics for my help app dynamically via an xml file...no issues there. I then wan

  • Jms.dll anybody

    Hello, We have Suns JMS EE running in a cluster with multiple Java producer and consumer clients running. All works great. It works so well we need to expand the possibilities. Adding .NET producers in J# is one of them. However we need the jms.dll e

  • Simple features wish list

    Please allow the reading and writing of text files as a standard feature vs having third party software to do so.  In the file manager, please use the default interface for playing music instead of the video player. Same for pictures. Please allow ch

  • Is there anyhing odd with PDF and overlays?

    Hi, folks I have been building some overlays following the advice given in DPS tips (thanks, Bob) and the help. So far, so good. Nothing very particular or strange. But since this last weekend (23rd-24th June) or so, the overlays I include have start

  • HT5569 Updated my iPad to iOS 7.0.6 and lost internet connectivity.

    The iPad connects to the router. The router sees the iPad, the iPad sees the router. All other devices on router work and have internet. iPad has no internet activity. Completed restart, reset and not sure what else to do. Issue started immediately a