Re: LDAP producers and re-entrancy

2009-05-01 Thread Claus Ibsen
On Sat, May 2, 2009 at 6:22 AM, huntc  wrote:
>
> Hi there,
>
> Any comments? I'm thinking that I'll patch the ldap component so that it
> obtains the context and closes it within the process method each time.
> Thoughts?
Great that would be +1 from me.


>
> Kind regards,
> Christopher
> --
> View this message in context: 
> http://www.nabble.com/LDAP-producers-and-re-entrancy-tp23266701p23342889.html
> Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus
Apache Camel Reference Card:
http://refcardz.dzone.com/refcardz/enterprise-integration


Re: LDAP producers and re-entrancy

2009-05-01 Thread huntc

Hi there,

Any comments? I'm thinking that I'll patch the ldap component so that it
obtains the context and closes it within the process method each time.
Thoughts?

Kind regards,
Christopher
-- 
View this message in context: 
http://www.nabble.com/LDAP-producers-and-re-entrancy-tp23266701p23342889.html
Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.



Re: stopping a route in spring dsl

2009-05-01 Thread jburkhardt

Ahhh alright after some more time reading I've come up with a solution thanks
to you guys..  Here is what I've got now (publish route omitted):

  
  
  
${in.body} != null

  



  
  
//myxpath

  
  
${in.body} != null

  


This seems to work well..  Any critiques or suggestions for how I could
improve things further are very welcome.
Thanks,
Jason



Claus Ibsen-2 wrote:
> 
> On Thu, Apr 30, 2009 at 10:13 PM, jburkhardt 
> wrote:
>>
>> I've looked around JIRA and it seems using stop in spring dsl used to be
>> an
>> issue but has been resolved since Feb 09.  Perhaps I am attempting to use
>> it
>> incorrectly.
>> I am using Camel 2.0 M1
>>
>> Here's what I'm trying to do:
>> I have a route that receives messages from a JMS queue.
>> After receiving the message it is run through a splitter, each
>> "sub-message"
>> for lack of a better term, gets run through a validation process and a
>> security process.  The results are then aggregated back together and
>> continue on the route.
>>
>> Here is what I'm doing now in my spring dsl:
>> 
>>  > uri="jmsBean:queue:IncomingQueue?exchangePattern=InOut?disableReplyTo=true"/>
>>  
>>    //myxpath
>>    
>>    
>>  
>> .
>> .
>> .
>> 
>>
>> Right now this works okay - I set an exception on the exchange in the
>> validation or security process if it fails, and it does not get past the
>> split.
>> My issue is if it fails the validation process, I don't want it to even
>> bother going to the security process, let alone to the aggregator after
>> that.  Likewise if it fails security I don't want the aggregator to be
>> called.
>> Is this something that is possible?  Or is there some better way to
>> accomplish what I am trying to do?
> 
> Take a look at the filter EIP. It can drop unwanted messages.
> http://camel.apache.org/message-filter.html
> 
> And should be what your are looking for.
> 
> 
>>
>> I have tried defining an interceptor like this:
>> 
>>  
>>    ${exception.message} != null
>>  
>>  
>> 
>>
>> Hoping that the interceptor would pick when I had set an exception on the
>> exchange and stop the route.  This doesn't seem to have any effect.  The
>> aggregator is still called every time.
> 
> Yeah the intercept is really for incoming messages, should have had a
> better name IMHO.
> I recently blogged about it and updated the wiki about interceptors in
> Camel:
> http://camel.apache.org/intercept.html
> 
> 
> 
>>
>> Any help, especially if I am trying to do something completely the wrong
>> way, would be much appreciated.
>> Thanks,
>> Jason
>> --
>> View this message in context:
>> http://www.nabble.com/stopping-a-route-in-spring-dsl-tp23322604p23322604.html
>> Sent from the Camel - Users (activemq) mailing list archive at
>> Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> Apache Camel Reference Card:
> http://refcardz.dzone.com/refcardz/enterprise-integration
> 
> 

-- 
View this message in context: 
http://www.nabble.com/stopping-a-route-in-spring-dsl-tp23322604p23338072.html
Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.



Re: Router Blocked by full Destination Route Queue

2009-05-01 Thread Claus Ibsen
Hi

I was looking into another matter and the problem with the sending to
JMS hangs is explained a bit here:
http://www.nabble.com/Do-the-send-timeouts-actually-work--td20583221.html

The other matter is this one:
http://fusesource.com/issues/browse/MR-170

On Sun, Apr 12, 2009 at 6:47 PM, yesnid  wrote:
>
> Hello,
>
> Below you will find a simplified example, of what my router is doing,
> basically recieving on one queue and then resending on another in this
> example, now to get the test working properly, have a producer send messages
> to the recieving queue and no one listening to the destination queue
> eventually the router will hang.
>
> My producers are connecting with the following, settings to the broker;
> Delivery Mode = persistent, Message TTL = 0 (Essentially infinite),
> transacted = false, session = auto acknowledge.
>
> To see the problem faster you can set the memory in the policy entry for you
> queue to lower, I suggest really low so that the problem appears really fast
> and you don't have to wait to see it appear.
>
> public class TestCamelRouter extends RouteBuilder
> {
>        final static String BEAN_NAME = "TestCamelRouter";
>        final static String BEAN_METHOD = "route";
>
>       �...@recipientlist
>        public List route(Exchange exchange)
>        {
>                ArrayList returnSet = new ArrayList();
>                returnSet.add("JMS-BROKER" + ":queue:" + "TestDeliveryQueue");
>                return returnSet;
>        }
>
>       �...@override
>        public void configure() throws Exception
>        {
>                from("JMS-BROKER" + ":queue:" +
> "RecievingQueue").beanRef(TestCamelRouter.BEAN_NAME,
> TestCamelRouter.BEAN_METHOD);
>        }
>
>        public static void main(String[] args)
>        {
>                JndiContext jndiContext = null;
>                try
>                {
>                        jndiContext = new JndiContext();
>                        jndiContext.bind(TestCamelRouter.BEAN_NAME, new 
> TestCamelRouter());
>                }
>                catch (Exception e)
>                {
>                        e.printStackTrace();
>                        return;
>                }
>                CamelContext context = new DefaultCamelContext(jndiContext);
>                ActiveMQConnectionFactory factory = new
> ActiveMQConnectionFactory("tcp://localhost:61616");
>                factory.setDispatchAsync(true);
>                context.addComponent("JMS-BROKER",
> JmsComponent.jmsComponentAutoAcknowledge(factory));
>                try
>                {
>                        context.addRoutes(new TestCamelRouter());
>                        context.start();
>                        while (true)
>                                Thread.sleep(6);
>                }
>                catch (Exception e)
>                {
>                        e.printStackTrace();
>                        return;
>                }
>        }
>
> }
>
>
>
>
>
>
>
> huntc wrote:
>>
>> Can you please provide the route's specification in code or XML. This will
>> give us a better chance of answering your question.
>>
>> Having said that, sounds like you've got an internal seda queue... I would
>> have thought that an exception would be thrown once the queue becomes
>> full. By default a seda queue can only hold 1000 items.
>>
>> If it is a JMS queue, then would setting the time to live option be useful
>> to you?
>>
>
> --
> View this message in context: 
> http://www.nabble.com/Router-Blocked-by-full-Destination-Route-Queue-tp22981898p23012582.html
> Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus
Apache Camel Reference Card:
http://refcardz.dzone.com/refcardz/enterprise-integration