Thanks Claus. After looking through some of the unit tests using 
HazelcastIdempotentRepository with Java DSL, I was able to figure out how to 
get an instance of HazelcastIdempotentRepository created in Spring:

<bean id="idempotentRepoHazel" 
class="org.apache.camel.processor.idempotent.hazelcast.HazelcastIdempotentRepository">
        <constructor-arg ref="hazelcast"/>
        <constructor-arg value="repo"/>
    </bean>
    <bean id="hazelcast" class="com.hazelcast.core.Hazelcast" 
factory-method="newHazelcastInstance">
        <constructor-arg>
            <null/>
        </constructor-arg>
</bean>

Now I just need to explore the various options for Hazelcast regarding 
eviction, persistence, etc.

thanks again

________________________________
From: Claus Ibsen-2 [via Camel] 
[mailto:ml-node+s465427n5728332...@n5.nabble.com]
Sent: Friday, March 01, 2013 1:58 AM
To: Dave Barker
Subject: Re: example using HazelcastIdempotentRepository in Spring DSL

Hi

I suggest to check some unit test of the camel-hazelcast, to see some
examples of this idempotent in use
https://svn.apache.org/repos/asf/camel/trunk/components/camel-hazelcast/

And I guess the Camel docs could be updated a bit with an example for
Spring XML as well.
As the sample we have is Java code based:
http://camel.apache.org/idempotent-consumer.html


On Thu, Feb 28, 2013 at 9:28 PM, davebarker <[hidden 
email]</user/SendEmail.jtp?type=node&node=5728332&i=0>> wrote:

> Hello all,
> I'm trying to figure out how to use the HazelcastIdempotentRepository as the
> idempotentConsumer for a duplicate filter in a Spring DSL route.
>
> example:
> ...
>    <idempotentConsumer messageidRepositoryRef="idempotentRepo">
>         <header>PrimaryValue</header>
>           .....
>
> <bean id="idempotentRepo"
> class="org.apache.camel.processor.idempotent.hazelcast.HazelcastIdempotentRepository"/>
>
> throws the following error:
>
> "No default constructor found; nested exception is
> java.lang.NoSuchMethodException: org.apache.c
> amel.processor.idempotent.hazelcast.HazelcastIdempotentRepository.<init>()"
>
> I tried supplying a string constructor to HazelcastIdempotentRepository as
> shown in the API, but I get the following error:
>
> "Could not convert constructor argument value of type [java.lang.String] to
> required type [com.hazelcast.core.HazelcastInstance]: Failed to convert
> value of type 'java.lang.String' to required type
> 'com.hazelcast.core.HazelcastInstance'; nested exception is
> java.lang.IllegalStateException: Cannot convert value of type
> [java.lang.String] to required type [com.hazelcast.core.HazelcastInstance]:
> no matching editors or conversion strategy found"
>
> What am I doing wrong?
>
> thanks for any help
> Dave
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/example-using-HazelcastIdempotentRepository-in-Spring-DSL-tp5728318.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



--
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: [hidden email]</user/SendEmail.jtp?type=node&node=5728332&i=1>
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


________________________________
If you reply to this email, your message will be added to the discussion below:
http://camel.465427.n5.nabble.com/example-using-HazelcastIdempotentRepository-in-Spring-DSL-tp5728318p5728332.html
To unsubscribe from example using HazelcastIdempotentRepository in Spring DSL, 
click 
here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5728318&code=ZGJhcmtlckBnZW5zY2FwZS5jb218NTcyODMxOHw4NjkwMTcxMTY=>.
NAML<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: 
http://camel.465427.n5.nabble.com/example-using-HazelcastIdempotentRepository-in-Spring-DSL-tp5728318p5728366.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to