You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by vvchoy <va...@ventyx.com> on 2010/09/10 03:38:48 UTC

configure failover for weblogic jms queue using jndi template

Hi 

my system is running camel 1.6.2.2 on servicemix 3.4.0.5. I have configured
camel to connect to my application through weblogic jms queue. Everything is
fine except that if my application is down (ie. web broker is down), I
cannot deploy nor start my service unit.
I notice that there is a way to configure camel to retry the connection
instead of throwing an exception --- through the "failover" transport.
Unfortunately, I cannot find an example showing how to do so with weblogic
configuration using jndi template. Does anyone know how to do so ? Would
appreciate your help very much.

Following is my bean configuration within camel_context.xml file:

    <bean id="weblogic" class="org.apache.camel.component.jms.JmsComponent">
       <property name="connectionFactory" ref="weblogicConnectionFactory"/>
       <property name="destinationResolver"
ref="webLogicDestinationResolver"/>
    </bean>
   
    <bean id="weblogicConnectionFactory"
class="org.springframework.jndi.JndiObjectFactoryBean">
		<property name="jndiName" value="weblogic.jms.ConnectionFactory"/>
		<property name="jndiTemplate" ref="webLogicJndiTemplate"/>
    </bean>
    
    <bean id="webLogicJndiTemplate"
class="org.springframework.jndi.JndiTemplate"> 
        <property name="environment"> 
            <props> 
                <prop
key="java.naming.factory.initial">weblogic.jndi.WLInitialContextFactory</prop> 
                <prop key="java.naming.provider.url">t3://host:port</prop>  
            </props>
        </property> 
    </bean>
    
    <bean id="webLogicDestinationResolver"
class="org.springframework.jms.support.destination.JndiDestinationResolver"> 
        <property name="jndiTemplate" ref="webLogicJndiTemplate" /> 
    </bean>

Thanks a lot

-- 
View this message in context: http://camel.465427.n5.nabble.com/configure-failover-for-weblogic-jms-queue-using-jndi-template-tp2834365p2834365.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: configure failover for weblogic jms queue using jndi template

Posted by "Willem.Jiang" <wi...@gmail.com>.
Cool, please post your solution to the mailing list if you find a way to do
this job.

Willem


vvchoy wrote:
> 
> Hi,
> Thanks for your suggestion. I also find out that weblogic client (both
> thin and full jar) does not seem to support the single server recovery
> scenario (though it supports the failover scenario for multiple redundant
> servers. I am currently exploring the scenario of bridging between the
> weblogic server and my application host machine. 
> 
> 
-- 
View this message in context: http://camel.465427.n5.nabble.com/configure-failover-for-weblogic-jms-queue-using-jndi-template-tp2834365p3206337.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: configure failover for weblogic jms queue using jndi template

Posted by vvchoy <va...@ventyx.com>.
Hi,
Thanks for your suggestion. I also find out that weblogic client (both thin
and full jar) does not seem to support the single server recovery scenario
(though it supports the failover scenario for multiple redundant servers. I
am currently exploring the scenario of bridging between the weblogic server
and my application host machine. 

-- 
View this message in context: http://camel.465427.n5.nabble.com/configure-failover-for-weblogic-jms-queue-using-jndi-template-tp2834365p3203452.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: configure failover for weblogic jms queue using jndi template

Posted by Willem Jiang <wi...@gmail.com>.
As Camel leverages the Spring to do the JMS related work, can you try to 
search for the failover configure from Spring doc or Weblogic doc ?

Willem

On 9/10/10 9:38 AM, vvchoy wrote:
>
> Hi
>
> my system is running camel 1.6.2.2 on servicemix 3.4.0.5. I have configured
> camel to connect to my application through weblogic jms queue. Everything is
> fine except that if my application is down (ie. web broker is down), I
> cannot deploy nor start my service unit.
> I notice that there is a way to configure camel to retry the connection
> instead of throwing an exception --- through the "failover" transport.
> Unfortunately, I cannot find an example showing how to do so with weblogic
> configuration using jndi template. Does anyone know how to do so ? Would
> appreciate your help very much.
>
> Following is my bean configuration within camel_context.xml file:
>
>      <bean id="weblogic" class="org.apache.camel.component.jms.JmsComponent">
>         <property name="connectionFactory" ref="weblogicConnectionFactory"/>
>         <property name="destinationResolver"
> ref="webLogicDestinationResolver"/>
>      </bean>
>
>      <bean id="weblogicConnectionFactory"
> class="org.springframework.jndi.JndiObjectFactoryBean">
> 		<property name="jndiName" value="weblogic.jms.ConnectionFactory"/>
> 		<property name="jndiTemplate" ref="webLogicJndiTemplate"/>
>      </bean>
>
>      <bean id="webLogicJndiTemplate"
> class="org.springframework.jndi.JndiTemplate">
>          <property name="environment">
>              <props>
>                  <prop
> key="java.naming.factory.initial">weblogic.jndi.WLInitialContextFactory</prop>
>                  <prop key="java.naming.provider.url">t3://host:port</prop>
>              </props>
>          </property>
>      </bean>
>
>      <bean id="webLogicDestinationResolver"
> class="org.springframework.jms.support.destination.JndiDestinationResolver">
>          <property name="jndiTemplate" ref="webLogicJndiTemplate" />
>      </bean>
>
> Thanks a lot
>