Announcement Announcement Module
No announcement yet.
Calling JMS from a Web Application failing. Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Calling JMS from a Web Application failing.

    Hi All,

    We have an issue with multiple clusters, where we have 5 servers of which 3 Servers which hosts JMS Capabilities and in under a single cluster Cluster1. and 2 Other servers which is hosted under Cluster2 and contains Web Applications.

    Now if all the servers are under a single cluster and JMS Servers are targerted to a cluster, then spring call contains JMS capabilities will work fine and if we move webapps into a different cluster which doesnot have JMS Servers , then the call fails with error in creating bean containing Connectories and Destinations.

    Below is the Code

    ================================================== ====

    <bean name="msf:jmsConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryB ean">
    <property name="jndiTemplate" ref="wlInitalContext"></property>
    <property name="jndiName" value="${msf.outbound.jmsConnectionFactory}"/>
    <bean id="wlInitalContext" class="org.springframework.jndi.JndiTemplate" singleton="true">
    <property name="environment">
    <prop key="java.naming.factory.initial">weblogic.jndi.WL InitialContextFactory</prop>
    <prop key="java.naming.provider.url">t3://x.x.x.x:61003</prop>
    <bean id="userCredentialsConnectionFactory" class="org.springframework.jms.connection.UserCred entialsConnectionFactoryAdapter">
    <property name="targetConnectionFactory">
    <ref bean="msf:jmsConnectionFactory" />
    <property name="username" value="weblogic" />
    <property name="password" value="weblogic" />

    <bean class=" essagePublisherHandler">
    <property name="publisher">
    <bean class=" tandardHeaderAwareJMSTextMessagePublisher">
    <property name="jmsTemplate">
    <bean class="org.springframework.jms.core.JmsTemplate102 ">
    <property name="connectionFactory" ref="msf:jmsConnectionFactory"/>
    <property name="defaultDestination" value="${msf.outbound.jmsDestination}">
    <!--bean class="org.springframework.jndi.JndiObjectFactoryB ean">
    <property name="jndiName" value="${msf.outbound.jmsDestination}"/>


    ================================================== ====

    How do we do remoting if we donot have JMS Server on the same server.