Try this in the jboss.xml:
Thankx jaikiran, but it does not work as well. I think that in ejb-jar is wrong definition, I use <rsecurity-identity> but it is probably not what I need. When I use <rsecurity-role-ref> then I get erro NYI - Not Yet Implemented.
And one more question, Do I have to define <security-role> in <assembly-descriptor> even if I want JBoss to use roles retrieven from DatabaseServer LoginModule?
Anyway thanks, can anybody point me to good source? I was saerching, but most of EJB3 samples use annotatios. I found this : http://labs.jboss.com/portal/jbossws/user-guide/en/html/secure-ejb.html
but they use there <secure-role-ref> which does not work in this JBoss version.
Do I have to wait for implementation? Actually I'm downloading the source of Jboss5.0 beta2, maybe it helps.
But can anybody see other problems in posted configuration?
Thank you for your time
Ok, I found solution.
First of all - the jboss.xml must be in META-INF/jboss.xml . I had it in JBOSS_HOME/server/default/conf.
in jboss.xml I just tell to JBoss to use seecurity domain :
I did not defined <security-role> in <assembly-descriptor>, the are taken from LoginModule