Michal Szynkiewicz [
http://community.jboss.org/people/michal11] created the discussion
"Re: JMS, Spring and Snowdrop. Listening for an injection of bean factory to
JNDI"
To view the discussion, visit:
http://community.jboss.org/message/623834#623834
--------------------------------------------------------------
We use JBoss 5.1, Spring 3.0.5 and Snowdrop 1.1.0.GA (with Deployer 3.3).
Whole app is deployed as EAR and it has one EJB module (it doesn't have a web
module).
The EJB module contains +jboss-spring.xml+ that looks as follows:
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
http://www.springframework.org/schema/jee
http://www.springframework.org/schema/jee/spring-jee-3.0.xsd"
xmlns:jee="http://www.springframework.org/schema/jee">
<description>BeanFactory=(OurBeanFactory)</description>
<import resource="classpath:META-INF/jmsConfig.xml" />
<context:component-scan
base-package="com.ourcompany"/>
<tx:annotation-driven/>
<tx:jta-transaction-manager/>
...
</beans>
The EJB module also contains a Message Driven Bean which has two annotations:
+(a)Interceptors(SpringLifecycleInterceptor.class)+ and +@MessageDriven+ and extends
+MessageListener+. Into that MDB we inject spring beans via:
@Spring(jndiName = "OurBeanFactory", bean = "OurBeanName")
How to set a deployer's priority?
Thanks
Michal
Message was edited by: Michal Szynkiewicz
Added missing citation marks
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/623834#623834]
Start a new discussion in Snowdrop at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]