• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
  • paul wheaton
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Rob Spoor
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:

Any luck with setting java.rmi.dgc.leaseValue

 
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did anybody have any luck with getting "-Djava.rmi.dgc.leaseValue" to work to change the default value ?. Please let me know,
-Rajesh
 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Ragesh
i have spent some time on the same problem and found the results to be very unpredictable. i generally end up with just the default results i think no matter how i set leaseValue. Was using it primarly for testing so i do not think i will use it in the final product.
If you find something useful on it mention it on this board as i am interested.
tom
 
Rajesh Matti
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tom- Same experience here too. I just could not get it to work.
-Rajesh
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What was leaseValue for? Is it necessary for the assignment? I don't remember seeing that one, maybe that is a cool one. Tell us some more about it
Mark
 
Ranch Hand
Posts: 1179
Mac OS X Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Set the sun.rmi.dgc.checkInterval property to half of the setting of
java.rmi.dgc.leaseValue.

You can read more about them here:
java.rmi Properties and sun.rmi Properties
/Ren�
 
Rajesh Matti
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you so much Ren�.
Mark-
This is the value used by the RMI to sense a unreferenced object in cases like client crash etc. Since I have implemented unreferenced interface, I needed to test the working of it and right now, it takes almost 15 minute to notice it working after I hard-kill the client. I just wanted to test more by temporarily reducing this wait time.
Hope this makes sense.
Thanks,
-Rajesh
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rajesh, cool. I knew I had seen it before, and thought that might be what it was for. I wanted to do that too, but I didn't, I waited those long 15 minutes
So did Rene's solution do the trick?
Mark
 
Rajesh Matti
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mark - Yes, it did work !!!. Thanks to Rane.
Hope you, busy man, read this one !!!.
-Rajesh
 
tom mcmorrow
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all
Still not clear on how to change leaseValue. Do i still use rmi.dgc.leaseValue=newValue on the command line. How do i employ sun.rmi.dgc.checkInterval()if I want to change my leaseValue?
tom
 
Rajesh Matti
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tom-
Use java -D option as illustrated below.
java -Djava.rmi.dgc.leaseValue=30000 -Djava.rmi.dgc.leaseValue=15000 MAINCLASS
 
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the requirements seem to be strict about the configuration parameters that can be used in the command lines to start the server / client.
have people have set the rmi.unreferenced lease value within the main method for their data server - using something like...
// Get system properties
Properties props = System.getProperties();

// Specify lease value
props.put("java.rmi.dgc.leaseValue", 15000);
[ May 26, 2002: Message edited by: dean tomlinson ]
 
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by tom mcmorrow:
hi all
Still not clear on how to change leaseValue. Do i still use rmi.dgc.leaseValue=newValue on the command line. How do i employ sun.rmi.dgc.checkInterval()if I want to change my leaseValue?
tom


java -Djava.rmi.dgc.leaseValue=30000 -Djava.rmi.dgc.checkInterval=15000
 
BJ Grau
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I thought of checking for crashed clients, but decided not to. Are any of you incorporating this into your final product? If so, what kind of lease times are you using?
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, you should check for crashed clients using Unreferenced. I used the default lease time.
Mark
 
BJ Grau
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By default, I am doing this because I am checking for clients that are finished with remote objects using Unreferenced. The only difference is that when clients finish gracefully Unreferenced.unreferenced() gets called very quickly, but with a crashed client it takes a while according ot the lease time and check interval. For this to be usefull for crashed clients the lease time and check interval need to be shortened, I would think, to a matter of seconds. Otherwise a crashed client could hold a lock for a matter of minutes, which in this application, might as ell be forever because a user isn't going sit around and wait to book a flight that is locked for so long.
But if you reduce the lease and check interval too low, you will tie up the network with lease renewalls.
What is everyone setting their lease time and check interval too? Since there is nothing in the requirements about crashed clients do we really need to worry about it? Mark, you and I discussed this in another post and you thought not.
-BJ
 
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys,
Any of u please explain me what is the need of executing the server with the following option, Is in necessary to use this option as per the sun's requirement.
java -Djava.rmi.dgc.leaseValue=30000
Will i loose any marks if iam not using this option.
 
Ramesh kumaar
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys,
Any of u please explain me what is the need of executing the server with the following option, Is in necessary to use this option as per the sun's requirement.
java -Djava.rmi.dgc.leaseValue=30000
Will i loose any marks if iam not using this option.
 
Ramesh kumaar
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys,
Any of u please explain me what is the need of executing the server with the following option, Is in necessary to use this option as per the sun's requirement.
java -Djava.rmi.dgc.leaseValue=30000
Will i loose any marks if iam not using this option.
 
Ranch Hand
Posts: 560
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't think your configuration parameter option is one of the listed ones in the requirement. You will lose marks if you use it.
 
dean tomlinson
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the requirements seem to be strict about the configuration parameters that can be used in the command lines to start the server / client.
what about setting the rmi.unreferenced lease value within the main method for their data server - using something like...
// Get system properties
Properties props = System.getProperties();
// Specify lease value
props.put("java.rmi.dgc.leaseValue", 15000);
 
Sai Prasad
Ranch Hand
Posts: 560
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I guess you can do that. I didn't restrict the leastime instead I had a cleanup thread to remove the unused locks.
 
Ramesh kumaar
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks sai prasad.
 
dean tomlinson
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi guys,
do we need to specify the check interval aswell as the lease value, if we are happy using the default check interval of half the lease value.

java -Djava.rmi.dgc.leaseValue=30000 -Djava.rmi.dgc.checkInterval=15000


i'm wondering if the setting of the checkInterval in the line above is redundant, becasue it is being set to half the lease value ?
 
On my planet I'm considered quite beautiful. Thanks to the poetry in this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic