mercredi 25 mars 2015

designing java classes to send the message to the queue through spring

I am new to the world of spring jms , prior to this i have used the core java program without spring where we have manually create the connection factories but rite now i am learning spring jms , rite now i have configured the xml but plesae advise how can i design corresponding java classes by which i can send the text message to the queue



<bean id="tibcoEMSJndiTemplate" class="org.springframework.jndi.JndiTemplate">
<property name="environment">
<props>
<prop key="java.naming.factory.initial">com.tibco.tibjms.naming.TibjmsInitialContextFactory</prop>
<prop key="java.naming.provider.url">http://tcpabcnet:707</prop>
<prop key="java.naming.security.principal">abc</prop>
<prop key="java.naming.security.credentials">abc</prop>
</props>
</property>
</bean>


<bean id="tibcoEMSConnFactory" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiTemplate">
<ref bean="tibcoEMSJndiTemplate" />
</property>
<property name="jndiName">
<value>GenericConnectionFactory</value>
</property>
</bean>


<bean id="tibcosendJMSTemplate" class="org.springframework.jms.core.JmsTemplate">
<property name="connectionFactory">
<ref local="tibcoEMSConnFactory" />
</property>
<property name="defaultDestinationName">
<value>test.data</value>
</property>
<property name="pubSubDomain">
<value>false</value>
</property>
<property name ="receiveTimeout">
<value>120000</value>
</property>
</bean>

Aucun commentaire:

Enregistrer un commentaire