I'm building a JEE6-application that runs on Glassfish v3.0.1. It's a web-application with EJBs, deployed as a WAR (EJB 3.1).
Currently i'm trying to configure a login by using a JDBC-based security realm. Now i don't know how to configure my WAR-application to not use the default Glassfish Security Realm (file) and instead use my newly created JDBC-realm. I know how to do it in a EAR-application, there you can deploy a sun-application.xml together with the application with a content like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-application PUBLIC '-//Sun Microsystems, Inc.//DTD
Application Server 9.0 Java EE Application 5.0//EN'
'http://www.sun.com/software/appserver/dtds/sun-application_5_0-0.dtd'>
<sun-application>
<realm>jdbc</realm>
</sun-application>
But as i have a web-application, i can't use it, at least not when deploying the app (i get an error because my app isn't configured for EAR-deployment) Can i declare the default security realm within the sun-web.xml? I also couldn't find an option within the Glassfish-admin-interface, or did i miss it?