title: how to configure jms template at spring for weblogic?
body: <p>as my question title, how to configure jms template at spring for weblogic?</p>
  
  <p>i follow  an example at some website, but spring always complain about defaultDestination at JmsTemplate </p>
  
  <p>how to configure it correctly ?</p>
  
  <pre><code>&lt;bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate"&gt;
      &lt;property name="environment"&gt;
          &lt;props&gt;
              &lt;prop key="java.naming.factory.initial"&gt;weblogic.jndi.WLInitialContextFactory&lt;/prop&gt;
              &lt;prop key="java.naming.provider.url"&gt;t3://localhost:7001&lt;/prop&gt;
          &lt;/props&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  
  &lt;bean id="connectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean"&gt;
      &lt;property name="jndiTemplate" ref="jndiTemplate" /&gt;
      &lt;property name="jndiName" value="jms/confactory" /&gt;
  &lt;/bean&gt;
  
  &lt;bean id="jmsDestinationResolver" class="org.springframework.jms.support.destination.JndiDestinationResolver"&gt;
      &lt;property name="jndiTemplate" ref="jndiTemplate" /&gt;
      &lt;property name="cache" value="true" /&gt;
  &lt;/bean&gt;
  
  &lt;bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate"&gt;
      &lt;property name="connectionFactory" ref="connectionFactory" /&gt;
      &lt;property name="destinationResolver" ref="jmsDestinationResolver" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>nb : i use weblogic 9.2 for jms &amp; web server, spring 2.5.6</p>