How to make the server threadsafe (Please Help)

Hi to all,
I have urgent question, and any
reply will be welcome.
How i make my server that use rmi threadsafe,
i want that each request from clients,the
server will make a separate thread.
the ejb use jndi to do this, how can i do this in rmi
i want that a client will get a reference to a factory
object in the server, the factory object will create a
thread and will return the reference to the client.
Thanks,
dan

Hi Bill,
Thanks for your reply.
at the rmi specification it said that :
3.2 Thread Usage in Remote Method Invocations
A method dispatched by the RMI runtime to a remote object implementation may or may not execute in a separate thread. The RMI runtime makes no guarantees with respect to mapping remote object invocations to threads. Since remote method invocation on the same remote object may execute concurrently, a remote object implementation needs to make sure its implementation is thread-safe.
this is all what sun has to say about using
threads with rmi.
do you have any example for using rmi server
that handle concurrent access?
again,
lots of thanks for your help.
dan

Similar Messages

  • I'm trying to use the public library to access my icloud email and I keep getting an error message stating icloud is encountered an error when connecting to the server.  Please help.

    I am trying to access my icloud email via a public library and I keep receiving an error message that icloud is experiencing a problem connecting to the server.  Please assist.

    How are you trying, using a web browser?

  • How to make the server respond with a popup?

    I want to make the server respond with a popup?my code is like this,but it does not work,why?
    <code>
    public class Welcome2
         public static void main(String[] args)throws IOException
              ServerSocket server = new ServerSocket(2222);
              while(true)
                   Socket s = server.accept();
                   BufferedReader in = new BufferedReader(new InputStreamReader(s.getInputStream()));
                   String msg = in.readLine();
                   if(msg.equals("visitor"))
                        System.out.println("recv...");               
                        JOptionPane.showMessageDialog(null,"Visitor coming!\n");
         System.exit(0);
                   server.close();
    </code>
    it can properly print out "recv...",but no popup,why?

    Define "does not work". What happens?
    Does your program compile? Do you get an exception? Does the program receive a line? Is the line equal to whatever you expect? Is showMessageDialog() called? Put in some debugging println's to see what happens.

  • BI BEANS - Graph - How to change the color .. please help

    Hi Everyone,
    Can anyone please tell me how to change the color of the Graph bars or slices. I mean the color which represents the data.
    For example in a pie chart I want to set specific color for specific slice. Please help.
    Regards
    SRT

    It seems to be the SET_SERIE_COLOR() method added to the FormsGraph revised version, but this latest version is momentarily not available for download.
    I think there is an existant open thread on this. Maybe you could find it using the Forum Search box.
    Francois

  • I am hacked on all my apple devices. How to solve the issue? Please help!

    Hi everyone,
    So whenever I open certain websites on Safari, suddenly I am redirected to either a women's health or a doctor's ad. (I am guessing this is called phishing)
    1)I've asked my friends if they've had the same problem with those certain sites and they replied no. Does this mean it is about my network? (I am the only one using this network at my home as I live alone)
    2)This happens on all my Apple devices including iPad and iPhone (when I tried to open the same website on my İphone while using mobile data, the problem did not happen- when I opened wifi on my phone it happened. same for iPad as well)
    Admedic said there were no adware, I have never changed my DNS so it has always stayed the way it always was also. So I am guessing my network is the problem.  (I am also guessing that this happened after I tried to watch a movie free online) BUT, this problem does not occur with Google Chrome on the same website. So is this about my network or my safari?
    I am now so scared if this person who hacked me gets all my information. What am I supposed to do? Please help!

    Hi! Thanks for your quick reply.
    A few things happened since I've posted this.
    1)I've deleted all the history and cookies from my macbook safari and when I opened the website with the issue, the problem did not happen this time.
    2)Seeing this, I've deleted my history on iPhone's safari and opened the same website but the problem was there again.
    3)The problem does not happen on iPad.
    So, I do not have the problem at all on Google Chrome but on Safari (now just on iPhone)
    Is this still about my router settings? If so would changing my phone DNS settings would suffice? Or do you think the problem might still remain on my computer as well?
    This is so frustrating for a person who does not know anything about technology at all
    Thank you!

  • How to track the Modified Data-Please help

    Hi Gurus,
    Background about the issue.... We have Customers and Customer Tier on Siebel On Demand. Every month after bookings are done customer tier is modified depending on the reveune genrated by the customer. Say for example ....Customer XXX was under 'A' but due to bad bookings for the month now they are degraded 'B'. Like this we get a list of customer tiers for the month of all customers and are uploaded in to Siebel.
    Now the challenge for me is while reporting in Analytics... how to retain the previous value. For example...For Customer xxx the customer tier was A in Aug and is modified as B in September. I want retain the previous value in my reports....
    In one of the Siebel Query documents i saw that PRE <'Field Refrence'> syntax holds the previous value of the field ..But it did not work in my case...
    Any suggestions to retain the old value after doing modifications..
    Thanks for the help.
    BK

    BK,
    My suggestion would be to write workflows that capture the data when it changes into the task description e.g.
    PRE(CustomerTier) <> (CustomerTier) creates a task that puts (Customer Tier into the description)
    then using the Task created date reflect that in the activity report.
    cheers
    Alex

  • I purchased a second hand iPad mini and it's on activation lock because I don't know how to contact the original owner please help me

    Please help me

    You will not be able to activate the iPad without the Apple ID and Password of previous owner.

  • HT1694 Still getting error: "cannot get mail   the connection to the server failed"  please help, for ipad 1; for hotmail account

    cannot get my hotmail email with an ipad, get a connection to server failed error.  I have tried to delete and install the email with area on settings, did not change.  This email did work in the past until today,
    Thanks in advance

    Due to a screen issue, I had my iPhone 5 replaced two days ago. I repeated deleted the mail account and kept adding it but this did not make any difference. When I attempted to setup the new phone with my Google (Gmail via exchange active sync) accounts I was receiving this same "Cannot Get Mail" error. From what I was able to gather, this problem should be affecting Gmail accounts set up via Exchange. When originally purchasing the phone I was assisted and directed to set up my Gmail account through Exchange because it had the ability to use "ActiveSync" and push not only mail and calendars, but all of my contacts as well. I found this article regarding the subject.
    http://www.pcmag.com/article2/0,2817,2413283,00.asp
    What it came down to was having to delete my Gmail via Exchange account and separate it into two different accounts, a regular gmail account for my mail and a CardDAV account for my contacts.
    Here is what I did. Google is changing their system and for new registrars Exchange ActiveSync will not work so you will be unable to register your account via Exchange and have your mail, calenders, and contacts all pushed together. I find this change really annoying. If you are having problems accessing your contacts after deleting the mail account, like I was, here is the work around.
    To circumvent this issue go to Setting > Mail, Contacts, Calendars > Add Account > Other > Add CardDAV Account: Under server ender google.com, then your email user name and password, then click next to verify the information.
    I hope this helps.

  • I am getting an error report and not sure how to fix the script. Please help... 3

    So now Im getting a new error report. I named the instance of the button in the properties panel btn_ccbil.
    Here is the code I have now:
    import flash.net.URLRequest;
    var url:String = 'http://www.lexiefyfe.com/ccbill9001/index.htm';
    btn_ccbil.addEventListener(MouseEvent.CLICK, onOrderClick);
    function onOrderClick():void
          var request:URLRequest = new URLRequest(url);
          try {
                navigateToURL(request, '_blank');
          } catch (e:Error) {
                trace('An error occurred');
    Here is the error report:
    Scene=photogallery, layer=buttons, frame=1, Line 7 A type identifier is expected after the ':'.
    Scene=photogallery, layer=buttons, frame=1, Line 9 The class or interface 'flash.net.URLRequest' could not be loaded.
    This is the original code for the billing from ccbill I am trying to get to work with flash:
    <A HREF="http://www.lexiefyfe.com/ccbill9001/index.htm"><img src="ccbutton.jpg"></A>
    Is this just something that flash can't do? If so will someone please let me know. I am running in circles at this point and very frustrated... I'm new to as3 but I thought it could work.
    Thank you to all for the help and consideration,
    Thomas

    You appear to be using AS3 code in an AS2 setting.  Go into your Publish Settings and change the actionscript version to AS3 in the Flash section.
    Other matters...
    You do not need to import the URLRequest class while coding in the Flash IDE.
    You need to put an argument in the function definition due to the listeners throwing one when it is triggered...
    function onOrderClick(evt:MouseEvent):void

  • I am getting an error report and not sure how to fix the script. Please help...

    I am using action script 3. I have html codes from ccbill that I am trying to make work with flash. Here is the script I am trying to use:
    import flash.net.URLRequest;
    var url:String = 'http://www.lexiefyfe.com/ccbill9001/index.htm';
    myButton.addEventListener(MouseEvent.CLICK, onOrderClick);
    function onOrderClick():void
          var request:URLRequest = new URLRequest(url);
          try {
                navigateToURL(request, '_blank');
          } catch (e:Error) {
                trace('An error occurred');
    Here is the code from ccbill:
    <A HREF="http://www.lexiefyfe.com/ccbill9001/index.htm"><img src="ccbutton.jpg"></A>
    This is the error report I am getting:
    Scene=photogallery, layer=buttons, frame=1, Line 1 Statement must appear within on handler
    Scene=photogallery, layer=buttons, frame=1, Line 3 Statement must appear within on handler
    Scene=photogallery, layer=buttons, frame=1, Line 5 Statement must appear within on handler
    Scene=photogallery, layer=buttons, frame=1, Line 7 A type identifier is expected after the ':'.
    Scene=photogallery, layer=buttons, frame=1, Line 9 The class or interface 'flash.net.URLRequest' could not be loaded.
    Scene=photogallery, layer=buttons, frame=1, Line 7 Statement must appear within on handler
    If anyone can help me with this issue I would be most grateful.
    Thank you for any consideration,
    Thomas

    You have a mixture of things going on... AS3 code in an AS2 setting.  Those are all AS2 error messages, and they are indicating you have placed the code on the buttons.  To use that code, it must be placed on the timeline, and your Flash Publish Settings need to have AS3 specified instead of AS2.  AS3 does not allow code to be placed on objects like AS2 does.

  • How to make the server aware of  changes in schemas?

    It seems that the SOA sever has difficulties with changes in schemas. For instance changes in elements names and/or types.
    Is it really nescessary to bounce server for each change?
    Rgds, Henrik

    Depends on how you deploy, if you undeploy first this has a better success rate.
    cheers
    James

  • How to make the server slide form validation using JSP?

    anyone knows how to do server-side form validation??
    Thanks in advanced

    try this way
         //create a validation java class in that class u create separate methods for validating
         for example if u want to validate that a particular text box should not be empty
         then u can try this way
         say like this
         class ServerValidation()
         boolean message=false;
         public static boolean isTextBoxEmpty(String value)
         if(value.length<1)
         System.out.println("Text box is empty");
         message=false
         else
         message=true
         return message
    now say u r having a html page in which there is a text box on submiting u call say validate.jsp
    in this jsp u write this way
    <%
    String message=request.getParameter("name of ur text box");
    boolean b=ServerValidation.isTextBoxEmpty(message)
    if(b)
    //valid is true do ur other activity
    else
    String messageToUser="Please Enter Some value"
    u can now display this message on jsp and create a back button
    %>
    hope its clear

  • How to play the audio file please help me

    i would like to play audio files such wav files, au files etc
    I would like to know how to play audio file easily in Applet and
    applications
    Thank you

    import sun.audio.*; //import the sun.audio package
    import java.io.*;
    //** add this into your application code as appropriate
    // Open an input stream to the audio file.
    InputStream in = new FileInputStream(Filename);
    // Create an AudioStream object from the input stream.
    AudioStream as = new AudioStream(in);
    // Use the static class member "player" from class AudioPlayer to play
    // clip.
    AudioPlayer.player.start(as);
    // Similarly, to stop the audio.
    AudioPlayer.player.stop(as);

  • When I switched to foxfire the print got very tiny. I am new at this and don't know how to enlarge the print. Please help me.

    How do I enlarge the print?

    See this:
    https://support.mozilla.com/en-US/kb/Page+Zoom
    The Firefox Page Zoom feature does a domain by domain level of saving the users preferred zoom level settings, there is no default Page Zoom level setting in Firefox.
    Try the Default FullZoom Level extension: <br />
    https://addons.mozilla.org/en-US/firefox/addon/6965
    Or the NoSquint extension: <br />
    https://addons.mozilla.org/en-US/firefox/addon/2592/

  • I reset my phone and it now receives calls that were meant for my husband. I know how to fix this with messaging and facetime, but can't seem to find how to make it stop with the calls. Please help.

    I reset my phone and it now receives calls that were meant for my husband. I know how to fix this with messaging and facetime, but can't seem to find how to make it stop with the calls. Please help.

    It may be due to Continuity
    The following quote is from  Connect your iPhone, iPad, and iPod touch using Continuity
    Turn off iPhone cellular calls
    To turn off iPhone Cellular Calls on a device, go to Settings > FaceTime and turn off iPhone Cellular Calls.

Maybe you are looking for

  • Digital  sound on imac?

    Can the imac G5 provide digital sound output?

  • User Authentication Mechanism

    Hi All. I have some piece of code that I need your opinion of: It is deliberately "elongated" to show a bit of detail. Here we go then public boolean login(String usernameGiven, String passwordSupplied)         try             // Declare some constan

  • Visual Studio App Wizard won't install with Visual Studio 2005

    When I try run the Visual Studio App Wizard from the Acrobat SDK V8.1 on my PC it tells me 'Please install Visual Studio 2005 before install Acrobat 8 Plugin Wizard'. I have Visual Studio 2005 installed with SP1. I also have the .NET framework 2.0.50

  • How do you embed thumbnails in aperture 3.4.5

    Out of the camera raw and exported from lightroom, the photos hold their thumbnail preview. When brought into aperature and exported, it is gone. This is needed to generate online ordering for prints. Right now it takes forever for the entire image t

  • Seeing full Screen in Centurytel's new email program

    Centurytel rolled out a new mail program last weekend. When I retrieve my email through the Web, I cannot see the entire Centurytel screen--hence cannot view certain commands on the right side. Centurytel techs think I am stupid. I have screen resolu