Java Reference
In-Depth Information
SeatBookedException {
}
What about if you don't want to use annotations for establishing security roles? For
example, if you have a security role that is used crosswise by all your EJB applica-
tions, perhaps it is simpler to use a plain old XML configuration instead of tagging all
EJBs with annotations. In this scenario, you have to declare the security constraints
first in the generic META-INF/ejb-jar.xml file:
<method-permission>
<role-name>Manager</role-name>
<method>
<ejb-name>*</ejb-name>
<method-name>*</method-name>
</method>
</method-permission>
Then, inside the META-INF/jboss-ejb3.xml configuration file, just add a refer-
ence to your security domain:
<jboss:ejb-jar>
<assembly-descriptor>
<s:security>
<ejb-name>*</ejb-name>
<s:security-domain>mysqldomain</s:security-domain>
</s:security>
</assembly-descriptor>
</jboss:ejb-jar>
Here's a snapshot illustrating the EJB-file-based role configuration:
Search WWH ::




Custom Search