I am using the Tomcat user database to hold information for
users. What I need to do is retrieve the group a user is in from the database.
My problem comes when I have a servlet add a new user, assign it to a roll and
a group, then try to access the user from another servlet running in the same
context. I often get exceptions thrown when I call the save() method on the
user object stating that Tomcat cannot rename the tomcat-users.xml to
tomcat-users.xml.old. The user info is still in memory and if enough time
passes or the server is stopped, the data eventually gets flushed to disk.
There are methods for finding the user, finding a roll, and finding a group,
but I don’t see a method for finding a group for a given user using the
MBeanServer(). I had been using the XML libraries to load the database and
then search through it finding the user then getting the assigned roll but it
only works when the new user information is flushed to disk. What would be the
best way to do this? Robert S.
Harper (801)265-8800
Ext. 255 This e-mail is intended only for the addressee and may
contain confidential and/or privileged information. Any review, retransmission,
or action taken upon this information by persons other than the intended
recipient is prohibited by law. If you received this communication in error,
please contact us immediately at 801-265-8800. Although this e-mail and any
attachments are believed to be free of any virus or other defect, it is the
responsibility of the recipient to ensure that anything received or opened is
virus free. No responsibility is accepted by IAT for any loss or damage in the
event that such a virus or defect exists. |
- User database and user attributes Robert Harper
- Re: User database and user attributes Mikolaj Rydzewski
- RE: User database and user attributes Robert Harper