1 Reply Latest reply on Apr 1, 2014 4:35 PM by Mike Hostetler

    Database authentication datasource -- howto?

    Mike Hostetler Newbie

      We have an application that uses the database's authentication and then uses that for the connection. Meaning, when they log into the application, the application tries to make a connection with that username/password to the database and uses that connection for the session. So if Fred logs into the application with username "fred", then there should be a user on the database named "fred" and Fred will use that connection when he uses the application.

      We already have a datasource that handles this for us by wrapping the vendor datasource inside our own and doing the authencication. It also has per-user pooling and it works fine in Glassfish if we turn off the database connection pooling.Thanks to Oracle, we are leaving Glassfish and trying to get our application running in Wildfly. But I can't get this to work

      I've tried setting min-pool-size and max-pool-size to 1, and that causes our JPA implementation to throw a "can't get managed connection" exception on startup.

      The following config gets the application started but can't log in because the login user doesn't match the username on the connection:










      We don't have to use the "wrapped" datasource but I'm kind of at a loss to figure out how we can get this working in Wildfly 8.