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

Reply via email to