[jboss-user] [Security & JAAS/JBoss] - Re: EJB3 and security role references

Wolfgang Knauf do-not-reply at jboss.com
Fri Dec 5 07:39:46 EST 2008


Hi,

you don't need to specify your session beans in "ejb-jar.xml", if you just want to declare the roles. The beans can still use annotations.

Here is a sample:
<?xml version="1.0" encoding="UTF-8"?>
  | <ejb-jar id="ejb-jar_ID" version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
  | 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  | 	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
  |                            http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
  | 	...
  | 	<assembly-descriptor>
  | 		<security-role>
  | 			<description><![CDATA[...]]></description>
  | 			<role-name>...</role-name>
  | 		</security-role>
  |  		...
  | 	</assembly-descriptor>
  | </ejb-jar>  

I hope this works, and I hope that the "<enterprise-beans>" element is optional.

Wolfgang

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4194604#4194604

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4194604



More information about the jboss-user mailing list