RE: [JBoss-user] Confused with JAAS! Please help

2001-06-29 Thread Schouten, Andreas

It seems, that the data related to users and roles is cached by the
SecurityManager.
(I added users with a third party tool but could login with this accounts
only after restarting jBoss.)

Can somebody explain if and how to caus the security manager rereading the
data from the database?
Then a bean which add/remove useres could call the security manager.

Andreas 

> -Original Message-
> From: Shotton Mark MMUk [SMTP:[EMAIL PROTECTED]]
> Sent: 29 June 2001 12:33
> To:   '[EMAIL PROTECTED]'
> Subject:      [JBoss-user] Confused with JAAS! Please help
> 
> Hello
> 
> I'm running JBoss 2.2.1-Tomcat 3.2.1 with InstantDB. The Tomcat JDBCRealm
> and JBoss DatabaseServerLoginModule point to the same database tables
> (Users
> and Roles) for JAAS authentication. While my enterprise application is
> running, I add new users to the Users and Roles tables from a session
> bean,
> using a connection to the database that I have retrieved from JBoss's pool
> (by looking up the java:/DefaultDS data source). However when I try to
> login
> to a secure web page as the new user, Tomcat's JDBCRealm cannot find the
> data that I have inserted in the database. If I close JDBCRealm's database
> connection, I get the message "instantdb is shutting down ..." and when I
> try to login as the new user again with a new database connection
> established in JDBCRealm, the login is successful.
> As far as I understand, the message "instantdb is shutting down ..." is
> only
> printed when there are no connections to InstantDB left on the VM.
> However,
> I know that JBoss is still holding connections to InstantDB when I get
> this
> message ( I have tested this by holding a connection from the JBoss pool
> while the JDBCRealm database connection is being closed). So the behaviour
> is almost as if Tomcat's JDBCRealm is holding it's connection to InstantDB
> on a different VM to my JBoss EJBs? This would explain why I have to close
> the JDBCRealm connection and reopen it to see the inserted data, as
> InstantDB only allows access from one VM at a time. But JBoss and Tomcat
> run
> on the same VM don't they (I downloaded the JBoss-Tomcat bundle)? And when
> I
> print out the ClassLoaders that loaded the InstantDB connections in
> JDBCRealm and the EJB, they are identical.
> I'm really confused by this. Can anyone point out where I am being stupid?
> Mark
> 
> 
> Dr M.W. Shotton
> MICROMASS UK LIMITED
> Floats Road
> Wythenshawe
> Manchester M23 9LZ
> UK
> 
> +44 (0) 161 718 4548
> 
> 
> 
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user


If you have received this e-mail in error or wish to read our e-mail disclaimer 
statement and monitoring policy, please refer to
http://www.drkw.com/disc/email/ or contact the sender.

___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] Confused with JAAS! Please help

2001-06-29 Thread Shotton Mark MMUk

Hello

I'm running JBoss 2.2.1-Tomcat 3.2.1 with InstantDB. The Tomcat JDBCRealm
and JBoss DatabaseServerLoginModule point to the same database tables (Users
and Roles) for JAAS authentication. While my enterprise application is
running, I add new users to the Users and Roles tables from a session bean,
using a connection to the database that I have retrieved from JBoss's pool
(by looking up the java:/DefaultDS data source). However when I try to login
to a secure web page as the new user, Tomcat's JDBCRealm cannot find the
data that I have inserted in the database. If I close JDBCRealm's database
connection, I get the message "instantdb is shutting down ..." and when I
try to login as the new user again with a new database connection
established in JDBCRealm, the login is successful.
As far as I understand, the message "instantdb is shutting down ..." is only
printed when there are no connections to InstantDB left on the VM. However,
I know that JBoss is still holding connections to InstantDB when I get this
message ( I have tested this by holding a connection from the JBoss pool
while the JDBCRealm database connection is being closed). So the behaviour
is almost as if Tomcat's JDBCRealm is holding it's connection to InstantDB
on a different VM to my JBoss EJBs? This would explain why I have to close
the JDBCRealm connection and reopen it to see the inserted data, as
InstantDB only allows access from one VM at a time. But JBoss and Tomcat run
on the same VM don't they (I downloaded the JBoss-Tomcat bundle)? And when I
print out the ClassLoaders that loaded the InstantDB connections in
JDBCRealm and the EJB, they are identical.
I'm really confused by this. Can anyone point out where I am being stupid?
Mark


Dr M.W. Shotton
MICROMASS UK LIMITED
Floats Road
Wythenshawe
Manchester M23 9LZ
UK

+44 (0) 161 718 4548



___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user