]
Stuart Douglas reassigned WFLY-8560:
------------------------------------
Assignee: Stuart Douglas (was: David Lloyd)
EJBAccessException when MDB contains RunAs annotation
-----------------------------------------------------
Key: WFLY-8560
URL:
https://issues.jboss.org/browse/WFLY-8560
Project: WildFly
Issue Type: Bug
Components: EJB, Security
Affects Versions: 10.1.0.Final
Reporter: Josef Cacek
Assignee: Stuart Douglas
Priority: Blocker
Attachments: helloworld-mdb-src.zip, wildfly-helloworld-mdb.war
If an MDB contains {{@RunAs}} annotation, then receiving messages fails with
{noformat}
09:26:48,243 ERROR [org.apache.activemq.artemis.ra] (Thread-4
(ActiveMQ-client-global-threads-580560225)) AMQ154004: Failed to deliver message:
javax.ejb.EJBAccessException: WFLYEJB0364: Invocation on method: public void
org.jboss.as.quickstarts.ejb.remote.mdb.HelloWithRunAsMDB.onMessage(javax.jms.Message) of
bean: HelloWithRunAsMDB is not allowed
{noformat}
The {{@RunAs}} must not restrict access to a bean (incoming calls), it just says which
role will be used for outgoing calls.