• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic


hernan silberman
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there...
I've built a custom implementation of java.util.Preferences for my Java 1.4 application which uses a relational database as its backing store. The application I'm working on is a stand-alone Swing app that acts as a client in a multi-tiered architecture. Part of the application's startup is identifying and authenticating the user that started the app. The idea is that once this process is completed, I would be able to retrieve the preferences for this user and respond Preferences.getUserRoot() calls.
Unfortunately, this stack trace will show that the java.security.AccessController and related classes make their own call to Preferences.getUserRoot() when I display any UI elements. At this point, of course, I have no idea who the user is and haven't had a chance to authenticate them:
at com.dw.util.prefs.NileClientPreferences.getUserRoot(NileClientPreferences.java:61)
at com.dw.util.prefs.NilePreferencesFactory.userRoot(NilePreferencesFactory.java:24)userRoot()
at java.util.prefs.Preferences.userRoot(Preferences.java:341)
at sun.awt.im.ExecutableInputMethodManager$2.run(InputMethodManager.java:785)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.im.ExecutableInputMethodManager.getUserRoot(InputMethodManager.java:783)
at sun.awt.im.ExecutableInputMethodManager.<init>(InputMethodManager.java:274)
at sun.awt.im.InputMethodManager.getInstance(InputMethodManager.java:138)
at sun.awt.windows.WFramePeer.<init>(WFramePeer.java:148)
at sun.awt.windows.WToolkit.createFrame(WToolkit.java:331)
at java.awt.Frame.addNotify(Frame.java:469)
at java.awt.Window.addNotify(Window.java:390)
at java.awt.Window.show(Window.java:433)
at java.awt.Component.show(Component.java:1128)
at java.awt.Component.setVisible(Component.java:1083)
at com.dw.nile.app.ui.SplashWindow.<init>(SplashWindow.java:90)
at com.dw.nile.app.ui.SplashWindow.<init>(SplashWindow.java:26)
at com.dw.nile.app.NileClientApp.appInit(NileClientApp.java:95)
at com.dw.nile.app.NileClientApp.<init>(NileClientApp.java:53)
at com.dw.nile.app.NileClientBootstrap.main(NileClientBootstrap.java:96)
I understand that the Preferences API is a subsystem and I have done everything I can to make it available at the earliest possible point in my application's startup cycle.
Is there any way I might skirt this call to getUserRoot from sun.awt.im.ExecutableInputMethodManager?
Any advice is tremendously appreciated.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic