How RMI implements multithreading in Server-side?

In [http://my.execpc.com/~gopalan/java/rmi_internals.html] says:
"On the server side, when a client connects to the server socket, a new thread is forked to deal with the incoming call. The original thread can continue listening to the original socket so that additional calls from other clients can be made."
I have traced Java source code (jdk-6u18-ea-src-b05-jrl-18_nov_2009.jar) , but i could not find where and how Java RMI do it.
Could anyone give me some hint? Thanks!

In [http://my.execpc.com/~gopalan/java/rmi_internals.html] says:
The status of that site is zero. All you can rely on is the RMI specification.
"On the server side, when a client connects to the server socket, a new thread is forked to deal with the incoming call. The original thread can continue listening to the original socket so that additional calls from other clients can be made."That accurately describes the Sun implementation of RMI as of 1.5, the latest source code I have looked at. It doesn't accurately describe the IBM implementation nor I suspect the Sun 1.6 implementation.
I have traced Java source code (jdk-6u18-ea-src-b05-jrl-18_nov_2009.jar) , but i could not find where and how Java RMI do it. So? Why does it matter? The RMI specification tells you what the multi-threading guarantees of RMI are. They are all you can rely on.

Similar Messages

  • How to start streaming from server side after applet initialized on client

    Hi,
    I am using JSP for on demand streaming server.
    I have included an applet in jsp page which start new player on client side after on streamreceive event.
    But my problem is how to give call to server that applet on client side has been initialized and now streaming can go on.
    Is there any method / way to call class file which will start streaming?

    Oracle is designed to support connection from client to server. The client originates the connection.
    If you want the server to initiate the connection, you need to make the server pretend it is a client. Oracle even does this internally, when they want to use 'External Procedures'
    You may also use Oracle's Message Queue mechanism, called 'Advanced Queueing' to use a 'publish subscribe' model instead of a connection model. That is discussed in the Advanced Queue manual in the documentation at http://docs.oracle.com
    Finally, you can explore the possibility of using RMI from the database, as discussed in the Java related documentation at the same location.

  • How to implement an ActiveX server in LabVIEW

    My task is to implement an ActiveX server in LabVIEW 8.0 that will be called from a data management software (DXE).
    The LV server will take care of data acquisition and control.
    I have been looking for tutorials and example code at the NI developer zone and elsewhere without any progress. Information is either to general or code is to old (LV 5.1) to give any help.
    Please, show me to a good example of an ActiveX server in LV 8 properly commented or with attached explanations.
    Alternatively, suggest any tutorial, short course or books with practical instructions.
    Specific information is most welcome.
    I suppose that it is possible to write a ActiveX client in LabVIEW to verify the functions of the ActiveX server ?

    rolfk wrote:
    skalis wrote:
    Thank You. Good to know that I am on the right track.
    However,
    Your sentence "If You look at the several shipping examples..." make me
    little concerned. I am not able to find any example of a LV ActiveX
    server in my LV 8.0 installation. I would be very grateful of You can
    send me any.
    Basically you can not create your own
    Active X server with your own object hierarchy and methods in LabVIEW.
    LabVIEW however can export a predefined Active X server interface that
    is just another access method to its internal VI server interface.
    With this interface you can determine what VIs are available to
    control, load specific VIs from disk if you know their path and,
    execute those VIs and passing parameters to it and receiving outputs.
    So if your software allows you to script the Active X access to an
    Active X server in some ways such as VBA or similar you should be fine.
    If your software expects a specific Active X interface you have to
    implement in the server application, you are out of luck with LabVIEW,
    without using an external component such as an extra Active X server
    DLL that translates between the expected interface and the exported
    LabIVEW interface. But this last method is quite likely not worth the
    hassle.
    Rolf Kalbermatter
    While I did follow the link mentioned above and found the Interop.LabVIEW.dll that is included in the C# project for the purpose of calling VIs from C#, I am frustrated that these methods are 'buried' in a .dll that you have to go and find on the NI web site, and are not ActiveX methods that are available in an ActiveX Object that is installed when you install LV 8.20 PDS. 
    Rolf, I don't know that you will get this email, but are you refering to the methods inside of the Interop.LabVIEW.dll in what you are saying above, and if so, how did you become aware of this .dll? 
    Is anyone aware of any documentation for these ActiveX methods?
    Thanks,
    Wes
    Wes Ramm, Cyth UK
    CLD, CPLI

  • How to parse XML in server side javascript (XSJS)?

    Hi Experts,
    I can get the XML file content through this method:var xmlString = $.response.body.asString() and I need to parse XML. If there XML parser in server side javascript? thanks very much!

    Hi Wenwen Hou,
    There is a blog available at
    Parse XML in server side javascript (XSJS)
    This can help you achieve parsing xml in server side javascript.
    Regards,
    Anjali.

  • How to get status of server side

    Dear All,
    I have developed the client program for communicating with server (Which can be developed again java or any language and on running on any platform ). So now I can connect with server and continue the communication but suppose if server down or unplugging the network wire, then how I know of that in client side programming. I try to some way but it does not work correctly.
    private void  monitor() throws Exception{
                  isConnected = s.isConnected() &&
                               !s.isClosed() &&
                                InetAddress.getByName("192.168.1.115").isReachable(1000);
         public void run() {
              while (true){
                   try {
                        Thread.sleep(2000);
                        monitor();
                        if(s !=null)
                             System.out.println(isConnected);
                   } catch (Exception e) {
                        e.printStackTrace();
         } "s" is the created socket which bound at a one time to continue communication
    InetAddress addr = InetAddress.getByName("192.168.1.115");
              SocketAddress sockaddr = new InetSocketAddress(addr,
                        8670);
              Socket s = new Socket();
              s.connect(sockaddr, 5000); Thing is it always print "true " even if the server is down
    Can you tell me what is the way to check this ?
    Regards
    -Kapila

         isConnected = s.isConnected() &&Tells you whether you have called connect(), implicitly or explicitly, or got the socket from an accept().
         !s.isClosed() && Tells you whether you have closed the socket.
    Neither of these tells you anything about the state of the connection.
         InetAddress.getByName("192.168.1.115").isReachable(1000);Meaningless.
    The only way to tell whether a server can be connected to is to try to connect to it.
    The only way to tell whether a server can be written to is to try to write to it, taking network buffering into account.
    The only way to tell whether a server can be read from is to set an appropriate read timeout and try to read from it.
    TCP doesn't maintain any other information about the state of a connection.

  • How to write file to server side?

    hello,
    Could anyone pls help me...
    I just want to see an example how can I write to a file that is placed at the server(save place as the applet).
    p.s. I have been successfully read a file from there...
    Suppose I have signed the applet (self-signed), anymore security problem I need to pay attention to?
    Thanks a lot!!

    hi mandy, from the applet u can send the file to be written into the server to a servlet running in server and the servlet can in turn write the file into the servlet. by applet - servlet communication, u can easily read and write files to the server.

  • How to handle Exception on Server Side as well as Client side

    Hello All,
    what is the method of EXCEPTION HANDLING in  Web Dynpro Java ? I have no idea how these exception throw.
    Thks in advance.

    Hi,
    Exception handling in WDJav ais similar to that of Java.
    exception handling in webdynpro
    Regards,
    SrinivaS

  • How to implement a kerberos server system

    Hi
    I want to develop a simple kerberos system which has just one client and one service server. I couldnt find any tutorials about kerberos. Could you please help me

    You may also want to look at JAAS. http://java.sun.com/developer/technicalArticles/Security/jaasv2/
    It's probably a tad overkill for some JSP applications, but it would give you an additional layer of protection for documents, i.e., you can control access to actual files based on roles. I say it's a bit of overkill because Tomcat incorporates most of the ideas into their realms.

  • New to sockets. How to implement multithreaded servers?

    I have been reading the JAVA tutorial, but can't get a simple "echo" threaded server working here:
    EchoServerThread.java
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.PrintWriter;
    import java.net.Socket;
    public class EchoServerThread extends Thread{
         private Socket s;
         public EchoServerThread(Socket socket){
              super("EchoServerThread");
              this.s=socket;
         public void run(){
              try {
                   PrintWriter out = new PrintWriter(s.getOutputStream(),true);
                   BufferedReader in = new BufferedReader(new InputStreamReader(s.getInputStream()));
                   String rline;
                   while((rline=in.readLine())!=null){
                        /*if(rline.equalsIgnoreCase("exit")) {
                             out.println("exit");
                             break;
                        out.println(rline);
                   in.close();
                   out.close();
                   s.close();
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
    }EchoServer.java
    import java.io.IOException;
    import java.net.ServerSocket;
    public class EchoServer {
         public static void main(String[] args) {
                   ServerSocket ssoc = null;
                   try {
                        ssoc = new ServerSocket(4444);
                   } catch (IOException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                   while(true)
                        try {
                             new EchoServerThread(ssoc.accept()).run();
                        } catch (IOException e) {
                             // TODO Auto-generated catch block
                             e.printStackTrace();
    }EchoClient.java
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.PrintWriter;
    import java.net.Socket;
    import java.net.UnknownHostException;
    public class EchoClient {
         public static void main (String [] args){
              try {
                   Socket soc = new Socket("localhost",4444);
                   PrintWriter out = new PrintWriter(soc.getOutputStream(),true);
                   BufferedReader in = new BufferedReader(new InputStreamReader(soc.getInputStream()));
                   BufferedReader stdIn= new BufferedReader(new InputStreamReader(System.in));
                   String rline;
                   while((rline=stdIn.readLine())!=null){
                        out.println(rline);
                        //System.out.println("written: "+rline);
                        /*String fromServer = in.readLine();
                        if(fromServer.equals("exit")){
                             System.out.println("Server is going down....");
                             System.out.println("fuck");
                             break;
                        else{*/
                        System.out.println("echo: "+in.readLine());
                   in.close();
                   out.close();
                   stdIn.close();
                   soc.close();
              } catch (UnknownHostException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
                   System.exit(1);
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
                   System.exit(2);
    }What happens, is that the server only accepts another connection after a client dies. If I do some input on the 2nd opened client ( the 1st is still beeing served) it produces no output until the 1st one ends, then it produces all the correct output.

    Hi,
    it's just an idea that has come to my mind rigth now while eating my pizza, probably a big mistake. You could try to flush the BufferedReader cause maybe it remains blocked in this while((rline=in.readLine())!=null){
         /*if(rline.equalsIgnoreCase("exit")) {
              out.println("exit");
              break;
         out.println(rline);
    }while loop. Just an idea though, probably it's wrong!
    JoY?TiCk

  • How to implement a client side map with ObjectImage control?

    We need to implement a client side map with an ADF Faces ObjectImage control. In the code below, the JSF Faces GraphicImage contol does support a client side image map using the usemap property. However, it appears that the ADF Faces ObjectImage control does not support a client side map. Is there someway of implementing this functionality in an ObjectImage control?
    <h:graphicImage url="/images/map-usa.gif"
    usemap="#m_mapusa"
    binding="#{backing_map.graphicImage2}"
    id="graphicImage2"
    style="border-style:none;"/>
    <af:objectImage source="/images/map-usa.gif"
    binding="#{backing_map.objectImage2}"
    id="objectImage2" />
    We could use the Graphic Image control except we have a problem by mixing a JSF GraphicImage control in the same table with a variety of ADF Faces controls in that when a user clicks on the GraphicImage, then the browser windows scrolls down to center the GraphicImage control. A user then needs to scroll back up to see the rest of the page. If an ObjectImage control is used with an onClick action, then the page does not scroll, which is what we want. So if we can figure out how to add a client side map to an ObjectImage control we would get the desired results.
    An alternative might be to use a server side map with the ObjectImage control. But our question here is how to implement the existing client side image map in a backing bean. As the following map code shows, not all image map areas are rectangles - some are polygons.
    <area id="_state_05" href="#"
    shape="rect"
    coords="681,38,702,50"
    target="_self" value="VT" alt="Vermont"
    onclick="javascript:getDtl(this);"/>
    <area id="_state_06" href="#"
    shape="poly"
    coords="221,442,209,436,209,418,191,403,155,382,116,367,101,370,98,364,
    122,355,158,367,203,388,212,394,242,427"
    target="_self" value="HI" alt="Hawaii"
    onclick="javascript:getDtl(this);"/>

    Hi,
    Any news about that issue, we are also interested in any solution.
    Thanks
    Math

  • How to send Subtopic Message From Server-Side to Client ?

    I’m new at flex and i have a new question about Flex
    Message Service.
    How to send messages from Server-Side Java Code with
    Subtopic?
    For example.
    I customed a Flex Message Adapter in Tomcat Server , with
    this Adapter , i can send message to Client with following code .
    ---------------------Send message to Client------------
    MessageBroker msgBroker =
    MessageBroker.getMessageBroker(null);
    String clientID = UUIDUtils.createUUID(false);
    AsyncMessage msg = new AsyncMessage();
    msg.setDestination("CustomMsgServiceDes");
    msg.setClientId(clientID);
    msg.setMessageId(UUIDUtils.createUUID(false));
    msg.setTimestamp(System.currentTimeMillis());
    msg.setBody(clientID + "this is my message from server! \n");
    msgBroker.routeMessageToService(msg, null);
    ---------------------Send message to Client------------
    But i want send a message that have Subtopic to the Client ,
    How to do ?
    Thank you for reply.

    There's a white paper that talks about this subject -
    http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=8f1eb6ea

  • How to implement content caching for jsp page ?

    Hello everyone,
    I am reading an article <Servlets and Jsp Best Practice>,at
    http://developer.java.sun.com/developer/technicalArticles/javaserverpages/servlets_jsp/#author, on one section it is saying :
    "Cache content: You should never dynamically regenerate content that doesn't
    change between requests. You can cache content on the client-side, proxy-
    side,or server-side. "
    Now I am working on a project. For every user, some of the content servlet generated will be the same for at least a week . I am thinking if I implement caching for these jsp pages, that would increase performace a lot.
    But I have no idea how to implement it either client-side or server-side, can someone give me a hint ?
    Thanks,
    Rachel

    You mean actually you are caching the response stream
    and the key to distinguish between different response
    streams are made of user's different request
    parameters. And the filter's function is to intercept
    the request to see if this request parameter's
    combination already exists in the Hashmap,then either
    use the cached response or forward to
    servlet.....really interesting...Do I get it right ?Yes that's it in a nutshell.
    >
    Then how do you build those response streams in
    advance ? You did it manually or have some mechanism
    to build it automatically ?
    The data gets cached the first time somebody visits the page.
    Find some examples on Filters, and take a look at the HttpServletResponseWrapper class. You need to cache response headers as well as the body. Another pitfall that you might run into is handling an If-modified-since header on the request. Don't cache the results of those requests.
    -Jonathan
    >
    Thanks again !
    Rachel

  • SAPUI5 Export to Excel in Server side

    Hi Experts,
    I have a requirement to export SAPUI5 table to excel.
    I tried different client side download and most of them failed in IE browser
    Export sap.ui.table.Table as CSV
    http://jsfiddle.net/hybrid13i/JXrwM/
    Can anyone able to guide me to implement it in server side?
    In my UI5 application I am having JSON data.
    one way is :
    I will create a "form" and will set the content in that form. And will submit that form.
    $("#myForm").submit();  
    Now I have to route this to my java server class for converting it to excel. In that point I am struggling.
    Can anyone help me?
    Regards,
    Jacob

    Hi,
    Check if this blog Displaying backend data both as SAPUI5 Table and an Excel File helps you.
    Regards,
    Chandra

  • Running server side methods prior to applet launch

    Hi all,
    I have recently become involved in the JSP world. My question is this:
    How can I get a server-side process to run prior to the launcing/running of an applet that must also be present on the page? Is there a way to force an order of execution within a JSP?
    Due to the nature of the code, it is impossible for me to create a secondary page that runs the server side process prior to being redirected to a page containing the applet.
    Any thoughts?
    Thanks from a newbie!
    --Speed Racer                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hey there,
    Yes, it did help, however, I realized that a redirection of the action to another URL (jsp) instead of the assigned action class would allow me to manage the auditing I needed to do.
    Thanks for the response!
    --Speed Racer                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        

  • Configure SAP for server-side trust

    Hi all,
    I am installing BusinessObejcts XI integration for SAP Solution. I need configure SAP for server-side trust. I have read BussinessObjects XI Integration for SAP Solution Installation Guide. In chapter 6, It introduce how to configure SAP Server-Side trust. But I don't understand how to configure SAP for server-side trust, specially configure SAP Cryptographic. Would you please to give me more detailed explanation?
    Please advise,
    Duypm

    Hi Duypm,
    the SAP server side configuration is part of the Installation Guide Chapter 6. It starts on Page 94.
    If you unclear about this and what SNC configuration means for the SAP server make sure you talk to the administrator for the SAP system. You need administrative rights for the SAP system and the system will have to be restarted as outlined in the installation guide
    Ingo

Maybe you are looking for

  • I have a 'Love - Hate' relationship with Adobe Lightroom

    Adobe's Lightroom is probably the best software out there for image manipulation, It is, however, just as probably the absolute worst for keeping track of your images.  I ask the questions, as many thousands of others, 'Where have my images gone?' 'W

  • Differences between -Xss[size] in linux and windows

    Simple thread test program which runs 3000 threads: startup options on windows: -server -Xms16m -Xmx16m -Xss7k startup options on linux: -server -Xms16m -Xmx16m -Xss97k (Why 90k bigger stack size??) Linux is using newest kernel and NPTL threads. With

  • NWDS 7.0  SP10 compatible Java JDK

    Hi, I have to install NWDS 7.0 SP10. Can any one tell me whats the correct Java Version will suit for this NWDS. Thanks Vj

  • EWA and SLR reports in different solutions, possible?

    Hi, We have a central Solution Manager to manage all the SAP systems of one of the business units of our company with 5 plants in different countries (Germany, USA, Argentina, Spain). The systems of each plant are administrated by the local SAP admin

  • Unable to login to SAP B1 after database migration

    I would like to know how to login to SAP B1 after database migration. I export data from MSSQL 2005 and import data to MSSQL 2008 which is located in different server. I failed to login to SAP B1 with both current password and default password. It wi