Fwd: Using redis in a Karaf XML bundle

14 views
Skip to first unread message

William la Forge

unread,
May 24, 2013, 7:20:08 AM5/24/13
to AgileWikiDevelopers
From this I take it that Redis works with Karaf. --b

---------- Forwarded message ----------
From: Djeeaie . <djee...@gmail.com>
Date: Fri, May 24, 2013 at 4:32 PM
Subject: Re: Using redis in a Karaf XML bundle
To: us...@karaf.apache.org


Changed the uri to spring-redis and it works now, didn't think of it because it worked in a stand alone. Thanks a lot !


On 24 May 2013 12:26, Bilgin Ibryam <bib...@gmail.com> wrote:
Hi Djee,
the name of the component was changed to spring-redis at some point. Are you using the correct name?

Bilgin


On 24 May 2013 08:29, Djeeaie . <djee...@gmail.com> wrote:
Hi, 

I'm trying to deploy a file to redis route with a XML blueprint. Here is the blueprint code : 
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
    <camelContext xmlns="http://camel.apache.org/schema/blueprint" id="monContXML">
        <route>
            <from uri="file://inboxXML"/>
	    <to uri="redis://ip.of.server?command=lpush"/>
        </route>
    </camelContext>
</blueprint>

Here what is printed in the log : 

2013-05-22 16:30:41,128 | INFO  | rint Extender: 1 | BlueprintContainerImpl           | container.BlueprintContainerImpl  360 | 7 - org.apache.aries.blueprint.core - 1.1.0 | Bundle camel-test.xml is waiting for dependencies [(&(component=redis)(objectClass=org.apache.camel.spi.ComponentResolver))]
2013-05-22 16:35:41,117 | INFO  | rint Extender: 3 | BlueprintCamelContext            | e.camel.impl.DefaultCamelContext 1624 | 62 - org.apache.camel.camel-core - 2.11.0 | Apache Camel 2.11.0 (CamelContext: monContXML) is shutting down
2013-05-22 16:35:41,118 | INFO  | rint Extender: 3 | BlueprintCamelContext            | e.camel.impl.DefaultCamelContext 1695 | 62 - org.apache.camel.camel-core - 2.11.0 | Uptime not started
2013-05-22 16:35:41,118 | INFO  | rint Extender: 3 | BlueprintCamelContext            | e.camel.impl.DefaultCamelContext 1696 | 62 - org.apache.camel.camel-core - 2.11.0 | Apache Camel 2.11.0 (CamelContext: monContXML) is shutdown in 0.001 seconds
2013-05-22 16:35:41,119 | ERROR | rint Extender: 3 | BlueprintContainerImpl           | ntainer.BlueprintContainerImpl$1  332 | 7 - org.apache.aries.blueprint.core - 1.1.0 | Unable to start blueprint container for bundle camel-test.xml due to unresolved dependencies [(&(component=redis)(objectClass=org.apache.camel.spi.ComponentResolver))]
java.util.concurrent.TimeoutException
        at org.apache.aries.blueprint.container.BlueprintContainerImpl$1.run(BlueprintContainerImpl.java:328)[7:org.apache.aries.blueprint.core:1.1.0]
        at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[7:org.apache.aries.blueprint.core:1.1.0]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)[:1.7.0_11]
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)[:1.7.0_11]
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)[:1.7.0_11]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)[:1.7.0_11]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)[:1.7.0_11]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_11]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_11]
        at java.lang.Thread.run(Thread.java:722)[:1.7.0_11]

The camel-spring-redis plugin is installed in karaf. 

During the 5 minutes before the timeout, the bundle is shown as in GracePeriod, and as Failure after the timeout. 

Karaf version is 2.3.1. 

Thanks in advance, 
Djee

--
Benhamiche Sylvain




--
Benhamiche Sylvain

monster

unread,
May 24, 2013, 12:27:12 PM5/24/13
to agilewiki...@googlegroups.com
Now that is also very strange: "spring-redis" Redis is said to probably be the fastest in-memory DB out there. The last thing someone who goes through the trouble of using Redis wants, is to have something like large latency added to every call, because of the overhead of Spring ...
Reply all
Reply to author
Forward
0 new messages