RMI apps will not exit for 60 seconds.
Yes, I'm sure this has been asked more times than you can fit in a 32 bit int, but how can I get my RMI programs to exit when main() exits. Even seemingly innocent programs like this:
import java.rmi.*;
import java.rmi.server.*;
public class Stuff {
public static void main (String[] argv) {
try {
Hello local = new Hello("Hello, world!");
catch(Exception x) {
x.printStackTrace();
(where Hello is completely brain-dead stupid-simple object of type Remote) will not exit immediately.
I've tried adding calls to System.gc() after the catch block above, but to no avail.
My real problem is that I'm not just using Remote objects in my server, but also in my client. (My server objects need to be able to make calls to my client autonomously.) I wouldn't really care if the servers didn't exit with immediacy, but I don't want to have to tell other developers in my group that they have to add System.exit() in all their client applications to make use of my new RMI-based utilities. And I don't want them having to ctrl-c out of everything.
What can I do?
Thanks,
Matt
Dear Klagdon,
Thanks for the good information. I'll try this out and try to read more of the API docs; however, your response makes me wonder if I should be implementing my client-side remote objects in a different way (not using UnicastRemoteObject) so that the call to unexportObject() would not be necessary.
Roughly I want to do something like this with my clients:
public static void main(String[] args) {
try {
Client c = new Client();
ServerInterface s = (ServerInterface) Naming.lookup("//somehost.foo.com/Server");
s.register(c);
// do stuff
s.unregister(c);
catch(Exception x) {
x.printStackTrace();
}In particular, my Client Remote objects will never be placed in an RMI registry and only need to be contacted by my Server objects between the register and unregister calls.
Although I'm confident I can get this to work, any direction you can give me to implement this "correctly" would be appreciated. In particular, I do want the above application to exit gracefully and with immediacy after the unregister call.
Thanks again for your help
Matt Busche
Similar Messages
-
I really need my iMessage app to work. Please help me!
Try:
- Reset the iOS device. Nothing will be lost
Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
least ten seconds, until the Apple logo appears.
- Reset all settings
Go to Settings > General > Reset and tap Reset All Settings.
All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
- Restore from backup
- Restore to factory settings/new iOS device. -
Android Air 3.9 app will not exit on Galaxy Tab 3
It continues to run in the background with sounds after pressing the home button or start another app. On iOS xml the UIApplicationExitsOnSuspend did work...is it a similar solution for Android/Galaxy Tab?
I ran the install log and I'm including the contents to see if you can make any sense of it
. The only thing that sticks out is a line "Application not located", which I highlighted below. Otherwise it looks like it installed
just fine. I appreciate your taking a look at this.
Starting app install of file:///C:/Documents%20and%20Settings/Andrew.esposito/Desktop/ROI_CalculatorAir-060310.ai r
UI SWF load is complete
UI initialized
Unpackaging to C:\Documents and Settings\Andrew.esposito\Local Settings\Temp\flaA2.tmp
unpackaging is complete
application is bound to side-by-side version 1.0
application is bound to this version of the runtime
app id ROI-CalculatorAir3
pub id 579DB9134D64DA8D12906F2BE8761198D0983B68.1
Application not located
Waiting for user confirmation
User confirmed action: install
creating native installer in: C:\Documents and Settings\Andrew.esposito\Local Settings\Temp\flaA3.tmp
native installer creation complete
Starting install
Destination for installed application is C:\Program Files
Beginning install
Installing C:\Documents and Settings\Andrew.esposito\Local Settings\Temp\flaA3.tmp\setup.msi
Execution complete; beginning commit phase
Commit complete
Re-launching application from C:\Program Files\ROI_CalculatorAir3\ROI_CalculatorAir3.exe
starting cleanup of temporary files
application installer exiting -
When I tap an app to open it, the app will flash on for a second then go back to the menu screen. They won't stay open. Earlier in the day I had synced my phone and downloaded some itunes. Ever since then this has happened. Thanks!
Download any new app to fix this.
-
App will not open, stuck on title screen.
As simple as the title says. The app will not open for me.
Make/model of tablet? OS version?
Try uninstalling/reinstalling? -
my ipod app no longer works. Everytime I go to open the ipod app it stays open for a second and then shuts down. I am not able to get anything to play either through the standard ipod controls or the multitasking control panel. I'm sure there will be an update soon to correct this, i just wanted to see if anyone else was having the same problem.
wen i open ipod in my iphone ,, it gets stuck ,, and get backs to the menu ,,, and doesnot play anything ,, not video nor songIf your phone is not officially unlocked by the carrier in the UK, you can not use the phone using another SIM, unless you modify the software or the SIM, which can lead to unexpected results, such as non functioning apps.
Unauthorized modification of iPhone OS has been a major source of instability, disruption of services, and other issues
Problems resulting from those modifications can't be discussed in these forums, due to the Terms of Use -
I bought the app Atari greatest hits package for $9.99 and now the app will not even open... Every time I try to open it it closes on its own...any suggestions?
Try deleting it and reinstalling it.
you can also try giving your iPad a reset. Hold down the sleep and home keys for about 20 seconds or so until it reboots and see if that helps. -
I just got the 5s, every time in try to update my apps it's asking for a second password to an Apple ID that is not mine-- it asks for mine and then another one pops up after I enter mine .what do I do?
where did you get this phone from
-
I upgraded to Mountain Lion yesterday, but since doing so I find that my 1Password app will not work. I have checked for 1Password updates but there are none. Is there a compatibility issue
Hmmm...I'm using 1Password Version 3.8.20 (build 31499) with a fresh install (scrape and pave) of Mt. Lion on my iMac and it's working fine.
I use Dropbox to sync 1Password so for my fresh install I simply downloaded 1Password from Agilbits website and installed it.
Have you tried reinstalling 1Password? Depending on how you purchased it, download it from their website or from the Mac App store to reinstall/replace it. (IIRC v3.8.x comes directly from Agilbits and v3.9 from the Mac App store.) You shouldn't have to uninstall it, the new download should overwrite the existing copy.
As with anything else, be sure to run a backup first!
More here:
http://support.agilebits.com/discussions/1password-38-for-mac-from-agilebits-web site/17861-finding-existing-data-file-when-reinstalling-1password
http://support.agilebits.com/discussions/1password-in-mac-app-store/3377-how-to- reinstall
http://support.agilebits.com/discussions/1password-38-for-mac-from-agilebits-web site/13769-reinstall
http://support.agilebits.com/discussions/1password-in-mac-app-store/2394-reinsta lling-1-password
Hope that helps.
D'oh! Mende1 beat me to it! -
Please help me. My YouTube app will not work. Every time I open it says 'cannot connect to youtube'. I have searched for help and tried resetting my settings and rebooting my ipad2 but nothing has solved the issue.
Yes, I am connected to the Internet through my wifi. Everything is working fine with the e eption of youtube. I have reset all Internet settings and have tried synching to iTunes followed by rebooting. This is all the advice I have found although none of it has been helpful.
Has anyone else encountered this problem? -
Puchased items in my watchtime app will not restore to my ipad (1) after an ipad restore. The items appear ready for purchase. how can i restore the items.
Following ultimately helped me : Make sure that you are logged in at the App Store App or iTunes App with your apple ID and password with a US account. Turn your iPad off and on and than you should see the Radio button again. It won't work if you are logged on with a foreign account. If you are not logged in at all, it worked, too.
-
Chess.app runs OK on my MacBookPro under OS 10.6.8. Under the same OS on my Mac Pro Chess.app will not show the hint for the next move. The detail on the desktop MacPro is
Model Name: Mac Pro
Model Identifier: MacPro1,1
Processor Name: Dual-Core Intel Xeon
Processor Speed: 2.66 GHz
Number Of Processors: 2
Total Number Of Cores: 4
L2 Cache (per processor): 4 MB
Memory: 1 GB
Bus Speed: 1.33 GHz
Boot ROM Version: MP11.005C.B08
SMC Version (system): 1.7f10
Serial Number (system): G87212BJUPZ
Hardware UUID: 00000000-0000-1000-8000-0017F20A3C06Hello
did the keaybord shortcut work ?
For info chess app come from system install
HTH
Pierre -
apps will not update...says " account not in this store..account not valid for use in the U.S. must switch to Canadian store before purchasing"
Change to Canadian App Store
1. Tap "Settings"
2. Tap "iTunes & App Stores"
3.Tap "View Apple ID"
4. Enter your user name and password.
5. Tap "Country/Region."
6. Tap "Change Country/Region"
7. Select the region where you are located.
8. Tap "Done". -
My reminders app will not want to create reminders for me. What could be the problem, how to fix it? Thanks in advance
Lol idk I updated this iPhone right when I got it because it said there is a new update so I installed it as soon as possible and there is no plus sign over there. I don't know how that happened maybe its something in the setting do you think you know? And when I ask Siri to create me a new reminder and I tell her the time and everything she says are you sure you want to create this reminder I press confirm and then she says I'm sorry but the reminder you are trying to create can not be crated.
-
my apps will not download because it asks for security info and whenever i type it in it never validates. Can anyone help me?
Hi..
Perhaps a security code issue > iTunes Store: My credit card's security code or zip code does not match my bank's records
Maybe you are looking for
-
HI Friends, - Can anybody guide me how to close a PO after short delivery. I checked "Delivery Completed" indicator in the delivery tab of PO layout. But still its allowing me to post MIGO. - Also I need to know the procedure to close a contract. Reg
-
I'm not able to sign into business catalyst
I'm not able to sign into business catalyst with my Adobe ID and I have not recieved any other log in information.
-
Irritating Errors on help site
I am getting the following error EVERY time I click on anything within the support/forum. "An Error has occured in the script on this page" Line: 318 Char: 23 Error: Permission denied Code: 0 Url: (Varies depending on where I am and what I am doing)
-
How do I set up TC as network drive on my G4 running OSX 10.3.9?
Hello, I just bought a TimeCapsule and a new Macbook and set it up in my existing network of a PowerBook G4 and Airport. Backup from the new Mac to the TC works just fine. The Airport Utility on my old PowerBook can see the TimeCapsule as well. What
-
Cannot launch photoshop in new install of creative cloud following expired trial of CS6
Application is telling me that trial has expired & to enter activation code I'm running Win7, 64bit and have tried the Adobe Cleaner Tool I'm really reluctant to subscribe if i can't get the trial running Can anyone help or should I look at another