|
From: Sal I. <sal...@sy...> - 2004-01-05 20:00:36
|
I like what you're saying. I will find this new functionality useful for debugging whether the service is indeed running as we intended it to be: system account or domained user account (this is a must if you wanna be able to access printers & mount points). Additionally this is going to be very useful information to show somewhere on my UI for a sysadmin to see. So I will welcome these changes very much. Since one of the OS requests you're talking about are beefy, consider adding a separate mbean to display this info. Then from the existing wrapper mbean you can add a method like this: ObjectName getUserMBean () When you do this, the jmx consoles don't display the mbean ObjectName. Instead, they show it as a link to the mbean specified by the object name. This way the beefy domain call you're talking about does not get executed until you click on the link! -----Original Message----- From: wra...@li... [mailto:wra...@li...]On Behalf Of Leif Mortenson Sent: Sunday, January 04, 2004 10:09 PM To: Wrapper User List Subject: [Wrapper-user] Request for opinions on the API for requesting user information. The next version of the Wrapper will include the ability to request information about the user currently running the Wrapper as well as the user, if any, that is currently logged in to a Windows box. This is implemented using the following two calls: WrapperUser WrapperManager.getUser( boolean groups ) WrapperUser WrapperManager.getInteractiveUser( boolean groups ) Both methods take a parameter that specifies whether or not the returned WrapperUser object should contain information about which groups the user belongs to. This is a fairly heavy operation on Windows so I wanted to give the user the option of not requesting the groups if it is not needed. The returned WrapperUser object is actually an instance of a WrapperWin32User or a WrapperUNIXUser. They each contain additional platform specific information. On Windows the getUser call will always return a user. But when the Wrapper is being run as a service, this will most likely be the SYSTEM user. Which is not very interesting. If the getInteractiveUser method is called before a user logs on to the machine it will return null. Otherwise it will return the user, if any, which currently has interactive status with the Wrapper as a service. If the service is not interactive then this will always return null. User code will need to poll these methods manually to detect when a user logs on. They are not super heavy, but heavy enough that I do not want the wrapper to be making the calls unless the user code actually needs the user information. First of all does anyone have any opinions or concerns about the Windows implementation? My next question is what do you think would be best to do on the UNIX side? The getUser call will return the user that is currently running the Wrapper. But what should the getInteractiveUser method return? Currently I am thinking of having it return null unless a DISPLAY environment variable is detected. Otherwise it would return null. Users often ask how to detect when a user has opened an XWindows session under Linux so they can display a GUI. This is actually not very simple under UNIX however. Thoughts? Cheers, Leif ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ Wrapper-user mailing list Wra...@li... https://lists.sourceforge.net/lists/listinfo/wrapper-user |