Announcement Announcement Module
Collapse
No announcement yet.
durable subscriptions and jboss Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • durable subscriptions and jboss

    I'm attempting to set up a durable subscriber as a spring 2.5 message driven POJO. I've hit a road block in that JBoss (my jms provider) requires the durable subscriber to use a secure jms connection (see http://wiki.jboss.org/wiki/Wiki.jsp?...BossMQSecurity). Currently, exposing the JBoss JMS connection factory through a JndiObjectFactoryBean and using the Spring DefaultMessageListenerContainer. How can I add credentials to the createConnection() call?

    My spring configuration
    Code:
    <beans xmlns="http://www.springframework.org/schema/beans"
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"
    	default-lazy-init="false">
    
    	<bean id="propertyConfigurer"
    		class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    		<property name="location">
    			<value>classpath:deploy.properties</value>
    		</property>
    		<!-- Configure ability to override any properties in this file using Java system properties -->
    		<property name="systemPropertiesMode">
    			<value>2</value>
    		</property>
    	</bean>
    
    	<!-- JNDI configuration -->
    	<bean id="jmsProviderJndiTemplate"
    		class="org.springframework.jndi.JndiTemplate">
    		<property name="environment">
    			<props>
    				<prop key="java.naming.factory.initial">
    					${naming.factory.initial}
    				</prop>
    				<prop key="java.naming.provider.url">
    					${naming.provider.url}
    				</prop>
    				<prop key="java.naming.factory.url.pkgs">
    					${naming.factory.url.pkgs}
    				</prop>
    			</props>
    		</property>
    	</bean>
    
    	<!-- Transaction manager -->
    	<bean id="transactionManager"
    		class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
    		<property name="dataSource" ref="dataSource" />
    	</bean>
    
    	<!-- JMS destination defined in the JMS provider (JBoss/WebLogic) -->
    	<bean id="eodDestination"
    		class="org.springframework.jndi.JndiObjectFactoryBean">
    		<property name="jndiName" value="${jms.topic.name}" />
    		<property name="expectedType" value="javax.jms.Destination" />
    		<property name="jndiTemplate" ref="jmsProviderJndiTemplate" />
    	</bean>
    
    
    	<!-- JMS configuration -->
    	<bean name="jmsConnectionFactory"
    		class="org.springframework.jndi.JndiObjectFactoryBean">
    		<property name="jndiName" value="${jms.connectionFactory.name}" />
    		<property name="jndiTemplate" ref="jmsProviderJndiTemplate" />
    		<property name="resourceRef" value="false" />
    		<property name="expectedType"
    			value="javax.jms.ConnectionFactory" />
    	</bean>
    
    	<!-- Message Driven POJO (MDP) -->
    	<bean id="messageListener"
    		class="com.luxotticaRetail.settlement.jms.EodSubscriber">
    	</bean>
    
    	<!-- and this is the message listener container -->
    	<bean id="listenerContainer"
    		class="org.springframework.jms.listener.DefaultMessageListenerContainer">
    		<property name="connectionFactory" ref="jmsConnectionFactory" />
    		<property name="destination" ref="eodDestination" />
    		<property name="messageListener" ref="messageListener" />
    		<property name="subscriptionDurable" value="true" />
    		<property name="sessionTransacted" value="true" />
    		<property name="clientId" value="sundialSettlement" />
    	</bean>
    
    
    </beans>

  • #2
    Hello,

    I actually need a help from you. I am also trying to setup my jms using jboss jms and I defined my topic in the jbossmq-destination-service as following:

    <mbean code="org.jboss.mq.server.jmx.Topic"
    name="jboss.mq.destination:service=Topic,name=test Topic1">
    <depends optional-attribute-name="DestinationManager">jboss.mq:service=Destina tionManager</depends>
    </mbean>

    I was not sure how I can setup a durable subscription for this testTopic1. Can you provide me the jboss side configuration you are doing for setting up the durable subscriber?

    Thanks.

    Comment

    Working...
    X