You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by vcheruvu <v_...@hotmail.com> on 2010/11/19 06:56:01 UTC

Camel-QuickFIXJ - Proxool jar dependencies issues

Hi, 

I have configured quickfixj to use jdbc store to persist FIX  messages. I
have come to know that Proxool dependency jar files are missing in the fuse
repository. Is it possible to add the proxool dependencies in Fuse repo?


Kind regards,
-Vid-
-- 
View this message in context: http://camel.465427.n5.nabble.com/Camel-QuickFIXJ-Proxool-jar-dependencies-issues-tp3271906p3271906.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel-QuickFIXJ - Proxool jar dependencies issues

Posted by Claus Ibsen <cl...@gmail.com>.
On Fri, Nov 19, 2010 at 6:56 AM, vcheruvu <v_...@hotmail.com> wrote:
>
> Hi,
>
> I have configured quickfixj to use jdbc store to persist FIX  messages. I
> have come to know that Proxool dependency jar files are missing in the fuse
> repository. Is it possible to add the proxool dependencies in Fuse repo?
>

What do you mean? Can you be more precise?


>
> Kind regards,
> -Vid-
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-QuickFIXJ-Proxool-jar-dependencies-issues-tp3271906p3271906.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: Type converter

Posted by Remi Malessa <re...@llgc.org.uk>.
Claus,

On 11/22/2010 10:42 AM, Claus Ibsen wrote:
> But if the message was sent as an Object JMS message then you can just
> define the parameter as the same type
It works perfectly fine. Thanks.

Remi

Re: Type converter

Posted by Remi Malessa <re...@llgc.org.uk>.
Thanks Claus , I will have a go with it.

Remi

On 11/22/2010 10:42 AM, Claus Ibsen wrote:
> On Mon, Nov 22, 2010 at 11:33 AM, Remi Malessa<re...@llgc.org.uk>  wrote:
>> Hi.
>> I have a route when I'm sending from activemq to a Java class (POJO).
>> The problem is the message is of type JDom. I've read the type converter
>> http://camel.apache.org/type-converter.html manual
>> but can't find how to use a type converter with a POJO.
>>
> You can implement your custom type converter and have Camel pickup and
> use it automatic.
> http://camel.apache.org/type-converter.html
>
> Camel in Action book chapter 3 covers this as well.
>
>
> But if the message was sent as an Object JMS message then you can just
> define the parameter as the same type
>
> public void doSomething(JDom dom) {
>    ...
> }
>
>
>
>
>> Could somebody give me a hint, please ?
>>
>> Cheers
>> Remi
>>
>
>


Re: Type converter

Posted by Remi Malessa <re...@llgc.org.uk>.
Yes, it looks much easier. Thanks for the hints.

Remi

On 11/23/2010 01:50 PM, davsclaus wrote:
> Use the examples from the book.
>
> Its much easier just to use @Converter.
>
> Remember to add that TypeConverter file in the JAR. It tells Camel to
> automatic pickup and us your @Converter as type converters.
>
> This is the same technique we use in camel-core and all its components to
> auto register the type converters when Camel startup.


Re: Type converter

Posted by Remi Malessa <re...@llgc.org.uk>.
Claus and Tim, thanks a lot. Its working now.
I had placed a full name of the class together with the package (just 
like log4j) before, so it didn't work..

Remi


On 11/24/2010 06:14 AM, Claus Ibsen wrote:
> Hi
>
> See for example camel-mina which has custom type converters as well:
> https://svn.apache.org/repos/asf/camel/trunk/components/camel-mina/src/main/resources/META-INF/services/org/apache/camel/TypeConverter
>
> And camel-core have 3 packages listed
> https://svn.apache.org/repos/asf/camel/trunk/camel-core/src/main/resources/META-INF/services/org/apache/camel/TypeConverter
>


On 11/23/2010 06:12 PM, Tim wrote:
> 1. I think you mean META-INF
> 2. Also you don't have to include "org.apache.activemq.camel.converter"
> 3. You should have uk.org.llgc.camel in the TypeConverter file as that
> is your package not your class.
>
> If you jar tvf your compiled jar (type_converter.jar in your case) you
> should see something like:
>
>      39 Mon Nov 22 18:30:58 CST 2010
> META-INF/services/org/apache/camel/TypeConverter
>
> Lastly turn on debug logging and you will see messages that camel
> found your Converter


Re: Type converter

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

See for example camel-mina which has custom type converters as well:
https://svn.apache.org/repos/asf/camel/trunk/components/camel-mina/src/main/resources/META-INF/services/org/apache/camel/TypeConverter

And camel-core have 3 packages listed
https://svn.apache.org/repos/asf/camel/trunk/camel-core/src/main/resources/META-INF/services/org/apache/camel/TypeConverter


On Tue, Nov 23, 2010 at 6:24 PM, Remi Malessa <re...@llgc.org.uk> wrote:
> Still no luck.
>
> Remi
>
> On 11/23/2010 05:15 PM, Remi Malessa wrote:
>>
>> Hmmm, I think I know . . . "The contents are expected to be comma
>> separated package names..."
>>
>> Remi
>
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: Type converter

Posted by Tim <ch...@gmail.com>.
1. I think you mean META-INF
2. Also you don't have to include "org.apache.activemq.camel.converter"
3. You should have uk.org.llgc.camel in the TypeConverter file as that
is your package not your class.

If you jar tvf your compiled jar (type_converter.jar in your case) you
should see something like:

    39 Mon Nov 22 18:30:58 CST 2010
META-INF/services/org/apache/camel/TypeConverter

Lastly turn on debug logging and you will see messages that camel
found your Converter



On Tue, Nov 23, 2010 at 11:24 AM, Remi Malessa <re...@llgc.org.uk> wrote:
> Still no luck.
>
> Remi
>
> On 11/23/2010 05:15 PM, Remi Malessa wrote:
>>
>> Hmmm, I think I know . . . "The contents are expected to be comma
>> separated package names..."
>>
>> Remi
>
>

Re: Type converter

Posted by Remi Malessa <re...@llgc.org.uk>.
Still no luck.

Remi

On 11/23/2010 05:15 PM, Remi Malessa wrote:
> Hmmm, I think I know . . . "The contents are expected to be comma 
> separated package names..."
>
> Remi


Re: Type converter

Posted by Remi Malessa <re...@llgc.org.uk>.
Hmmm, I think I know . . . "The contents are expected to be comma 
separated package names..."

Remi

On 11/23/2010 05:07 PM, Remi Malessa wrote:
>
> inside the TypeConverter there is apache license disclaimer + two lines:
>
> org.apache.activemq.camel.converter
> uk.org.llgc.camel.JdomTypeConverter

Re: Type converter

Posted by Remi Malessa <re...@llgc.org.uk>.
On 11/23/2010 03:53 PM, Claus Ibsen wrote:
> You put that file inside your own JAR. And in that file you add a text
> line which is a package name for the package where your @Converter
> class is.
Claus, if you have a minute, please tell me if I am doing it right.

Here is my String to Jdom type converter:

package uk.org.llgc.camel;

import java.io.IOException;
import java.io.StringReader;

import org.apache.camel.Converter;
import org.apache.camel.Exchange;
import org.jdom.Document;
import org.jdom.JDOMException;
import org.jdom.input.SAXBuilder;

@Converter
public class JdomTypeConverter {

     @Converter
     public static Document toJdomDocument(String pString, Exchange 
pExchange) throws JDOMException, IOException{

         SAXBuilder tBuilder = new SAXBuilder();
         Document tDoc = tBuilder.build(new 
StringReader((String)pExchange.getIn().getBody(String.class)));
         return tDoc;
     }
}

I place the JdomTypeConverter.class in a type_converter.jar .
I also add the TypeConverter inside the type_converter.jar .
inside the TypeConverter there is apache license disclaimer + two lines:

org.apache.activemq.camel.converter
uk.org.llgc.camel.JdomTypeConverter

I've tried placing the TypeConverter directly inside my jar, inside the 
METS-INF directory and also tried placing the whole:
services/org/apache/camel/TypeConverter structure, both directly and 
inside the METS-INF directory (of my jar).

My jar file is in the activemq_home/lib directory.

I've also tried placing the above set-ups inside the 
activemq/webapps/camel/METS-INF with same results.


Remi

Re: Type converter

Posted by Claus Ibsen <cl...@gmail.com>.
On Tue, Nov 23, 2010 at 4:49 PM, Remi Malessa <re...@llgc.org.uk> wrote:
> Hi again.
>
> On 11/23/2010 01:50 PM, davsclaus wrote:
>>
>> Remember to add that TypeConverter file in the JAR. It tells Camel to
>> automatic pickup and us your @Converter as type converters.
>
> I have my Camel inside an Activemq server and I can't find
> /META-INF/services/org/apache/camel/TypeConverter /anywhere
> I had added my class as a jar into the activemg_home/lib dir , but that
> didn't work.
>
> Any chance you know how to register a type converter with such set-up ?
>

You put that file inside your own JAR. And in that file you add a text
line which is a package name for the package where your @Converter
class is.



>
> Cheers
> Remi
> /
> /
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: Type converter

Posted by Remi Malessa <re...@llgc.org.uk>.
Hi again.

On 11/23/2010 01:50 PM, davsclaus wrote:
> Remember to add that TypeConverter file in the JAR. It tells Camel to
> automatic pickup and us your @Converter as type converters.

I have my Camel inside an Activemq server and I can't find 
/META-INF/services/org/apache/camel/TypeConverter /anywhere
I had added my class as a jar into the activemg_home/lib dir , but that 
didn't work.

Any chance you know how to register a type converter with such set-up ?


Cheers
Remi
/
/

Re: Type converter

Posted by davsclaus <ci...@yahoo.dk>.
Use the examples from the book.

Its much easier just to use @Converter.

Remember to add that TypeConverter file in the JAR. It tells Camel to
automatic pickup and us your @Converter as type converters.

This is the same technique we use in camel-core and all its components to
auto register the type converters when Camel startup.
-- 
View this message in context: http://camel.465427.n5.nabble.com/Camel-QuickFIXJ-Proxool-jar-dependency-issues-tp3271906p3276817.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Type converter

Posted by Remi Malessa <re...@llgc.org.uk>.
Hi Claus

On 11/22/2010 10:42 AM, Claus Ibsen wrote:
> You can implement your custom type converter and have Camel pickup and
> use it automatic.
> http://camel.apache.org/type-converter.html
>
> Camel in Action book chapter 3 covers this as well.
In the Camel in Action book, Listing 3.12 shows a "plain" class, where 
the class on the
Camel's website implements TypeConverter.

I've noticed you are the author of the book. Could you tell me which 
example to follow ?

Cheers
Remi

Re: Type converter

Posted by Claus Ibsen <cl...@gmail.com>.
On Mon, Nov 22, 2010 at 11:33 AM, Remi Malessa <re...@llgc.org.uk> wrote:
> Hi.
> I have a route when I'm sending from activemq to a Java class (POJO).
> The problem is the message is of type JDom. I've read the type converter
> http://camel.apache.org/type-converter.html manual
> but can't find how to use a type converter with a POJO.
>

You can implement your custom type converter and have Camel pickup and
use it automatic.
http://camel.apache.org/type-converter.html

Camel in Action book chapter 3 covers this as well.


But if the message was sent as an Object JMS message then you can just
define the parameter as the same type

public void doSomething(JDom dom) {
  ...
}




> Could somebody give me a hint, please ?
>
> Cheers
> Remi
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Type converter

Posted by Remi Malessa <re...@llgc.org.uk>.
Hi.
I have a route when I'm sending from activemq to a Java class (POJO).
The problem is the message is of type JDom. I've read the type converter 
http://camel.apache.org/type-converter.html manual
but can't find how to use a type converter with a POJO.

Could somebody give me a hint, please ?

Cheers
Remi

Re: Camel-QuickFIXJ - Proxool jar dependency issues

Posted by Claus Ibsen <cl...@gmail.com>.
On Mon, Nov 22, 2010 at 10:26 PM, vcheruvu <v_...@hotmail.com> wrote:
>
> Thanks Claus, only dependency for Quickfixj jdbc store mode are Proxool 0.9.1
> & Proxool-CGI 0.9.1.
> --

The JARs is here now
http://repo.fusesource.com/maven2-all/proxool/

> View this message in context: http://camel.465427.n5.nabble.com/Camel-QuickFIXJ-Proxool-jar-dependency-issues-tp3271906p3276055.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: Camel-QuickFIXJ - Proxool jar dependency issues

Posted by vcheruvu <v_...@hotmail.com>.
Thanks Claus, only dependency for Quickfixj jdbc store mode are Proxool 0.9.1  
& Proxool-CGI 0.9.1.
-- 
View this message in context: http://camel.465427.n5.nabble.com/Camel-QuickFIXJ-Proxool-jar-dependency-issues-tp3271906p3276055.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel-QuickFIXJ - Proxool jar dependency issues

Posted by Claus Ibsen <cl...@gmail.com>.
On Sun, Nov 21, 2010 at 11:12 PM, vcheruvu <v_...@hotmail.com> wrote:
>
> Latest version of proxool is 0.9.1.  Public repository do not have latest
> version. So, I am wondering if latest proxool jar files could uploaded on
> Fuse or Apache repo.

Well its frankly best that if the various projects could post their
JARs to central maven them self.

What JARs do you need:
proxool-0.9.1.jar
proxool-cglib.jar



>
> http://proxool.sourceforge.net/
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-QuickFIXJ-Proxool-jar-dependency-issues-tp3271906p3274732.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: Camel-QuickFIXJ - Proxool jar dependency issues

Posted by vcheruvu <v_...@hotmail.com>.
Latest version of proxool is 0.9.1.  Public repository do not have latest
version. So, I am wondering if latest proxool jar files could uploaded on
Fuse or Apache repo.

http://proxool.sourceforge.net/
-- 
View this message in context: http://camel.465427.n5.nabble.com/Camel-QuickFIXJ-Proxool-jar-dependency-issues-tp3271906p3274732.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel-QuickFIXJ - Proxool jar dependency issues

Posted by Richard Kettelerij <ri...@gmail.com>.
According to the QuikcFIX/J installation manual
(http://www.quickfixj.org/quickfixj/usermanual/1.5.0/installation.html)
there's indeed a (direct) dependency on Proxool when you are using JDBC
persistence. 

However, why would you like to grab this dependency from the Fuse repo? It's
available in Maven central: http://repo1.maven.org/maven2/proxool/
-- 
View this message in context: http://camel.465427.n5.nabble.com/Camel-QuickFIXJ-Proxool-jar-dependency-issues-tp3271906p3273707.html
Sent from the Camel - Users mailing list archive at Nabble.com.