I have an EJB defined as follows:
@Stateless(name="Search") @TransactionAttribute(REQUIRED) @Local(SearchEngine.class) public class SearchEngineEJB extends AbstractEJB implements SearchEngine { @Resource( name="topic_conn_factory", authenticationType=AuthenticationType.CONTAINER, type=TopicConnectionFactory.class) private TopicConnectionFactory _connectionFactory; @Resource( name="topic_broadcast", authenticationType=AuthenticationType.CONTAINER, type=Topic.class) private Topic _broadcast; ... }
I'm trying to register the appropriate objects from JNDI to the names specitied in the @Resource annotations. My jboss.xml is as follows:
<jboss> <enterprise-beans> <session> <ejb-name>Search</ejb-name> <resource-env-ref> <resource-env-ref-name>topic_conn_factory</resource-env-ref-name> <jndi-name>java:/JmsXA</jndi-name> </resource-env-ref> <resource-env-ref> <resource-env-ref-name>topic_broadcast</resource-env-ref-name> <jndi-name>topic/foo</jndi-name> </resource-env-ref> </session> </enterprise-beans> </jboss>
The binding for the connection factory works fine. However, when I deploy jBoss reports the following problem:
Deployment "vfszip:/home/.../cc7.ear/" is in error due to the following reason(s): java.lang.RuntimeException: mapped-name or message-destination-link is required for topic_broadcast of deployment Search
Could someone shed some light on how I can resolve this?