<?xml version="1.0" encoding="UTF-8"?> <ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd" version="2.1"> <enterprise-beans> <session> <ejb-name>ItemLookupBean</ejb-name> <home>com.acme.anvil.service.ItemLookupHome</home> <remote>com.acme.anvil.service.ItemLookup</remote> <local-home>com.acme.anvil.service.ItemLookupLocalHome</local-home> <local>com.acme.anvil.service.ItemLookupLocal</local> <ejb-class>com.acme.anvil.service.ItemLookupBean</ejb-class> <session-type>Stateless</session-type> <transaction-type>Container</transaction-type> <security-identity> <run-as> <role-name>acme_user</role-name> </run-as> </security-identity> </session> <session> <ejb-name>ProductCatalogBean</ejb-name> <home>com.acme.anvil.service.ProductCatalogHome</home> <remote>com.acme.anvil.service.ProductCatalog</remote> <local-home>com.acme.anvil.service.ProductCatalogLocalHome</local-home> <local>com.acme.anvil.service.ProductCatalogLocal</local> <ejb-class>com.acme.anvil.service.ProductCatalogBean</ejb-class> <session-type>Stateless</session-type> <transaction-type>Container</transaction-type> <env-entry> <env-entry-name>StoreCode</env-entry-name> <env-entry-type>java.lang.String</env-entry-type> <env-entry-value>123</env-entry-value> </env-entry> <security-identity> <run-as> <role-name>acme_user</role-name> </run-as> </security-identity> </session> <message-driven> <ejb-name>LogEventSubscriber</ejb-name> <ejb-class>com.acme.anvil.service.jms.LogEventSubscriber</ejb-class> <transaction-type>Container</transaction-type> <activation-config> <activation-config-property> <activation-config-property-name>destinationType</activation-config-property-name> <activation-config-property-value>javax.jms.Topic</activation-config-property-value> </activation-config-property> </activation-config> <security-identity> <run-as> <role-name>acme_user</role-name> </run-as> </security-identity> </message-driven> </enterprise-beans> <assembly-descriptor> <security-role> <role-name>acme_user</role-name> </security-role> <method-permission> <role-name>acme_user</role-name> <method> <ejb-name>ProductCatalogBean</ejb-name> <method-name>*</method-name> </method> </method-permission> </assembly-descriptor> </ejb-jar>