You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Matthew Shaw <Ma...@ambulance.qld.gov.au> on 2017/09/24 23:03:30 UTC

activemq component osgi classnotfound platformtransacitonmanager

Getting a class not found PlatformTransactionManager when trying to configure activemq component with latest karaf, here is my config:

        ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(System.getProperty("activemq.broker.url"));
//        camelContext.addComponent("mtaactivemq", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));


        PooledConnectionFactory mqConnPool = new PooledConnectionFactory();
        mqConnPool.setConnectionFactory(connectionFactory);
        mqConnPool.setMaxConnections(10);
        ActiveMQComponent mqComponent = new ActiveMQComponent();
        mqComponent.setConnectionFactory(mqConnPool);
        mqComponent.setUsePooledConnection(true);
        mqComponent.setTransacted(false);
        JmsTransactionManager transactionManager = new JmsTransactionManager(mqConnPool);
        SimpleRegistry simpleRegistry = (SimpleRegistry) camelContext.getRegistry();
        simpleRegistry.put("transactionManager", transactionManager);
        camelContext.addComponent("mtaactivemq", mqComponent);


The spring-tx is on the karaf classpath:
206


Apache ServiceMix :: Bundles :: spring-txorg.apache.servicemix.bundles.spring-tx<http://localhost:8181/system/console/bundles/206>

4.3.10.RELEASE_1

Active


What am I missing here?

Cheers,
Matt.
This email, including any attachments sent with it, is confidential and for the sole use of the intended recipient(s). This confidentiality is not waived or lost, if you receive it and you are not the intended recipient(s), or if it is transmitted/received in error.

Any unauthorised use, alteration, disclosure, distribution or review of this email is strictly prohibited. The information contained in this email, including any attachment sent with it, may be subject to a statutory duty of confidentiality if it relates to health service matters.

If you are not the intended recipient(s), or if you have received this email in error, you are asked to immediately notify the sender. You should also delete this email, and any copies, from your computer system network and destroy any hard copies produced.

If not an intended recipient of this email, you must not copy, distribute or take any action(s) that relies on it; any form of disclosure, modification, distribution and/or publication of this email is also prohibited.

Although the Queensland Ambulance Service takes all reasonable steps to ensure this email does not contain malicious software, the Queensland Ambulance Service does not accept responsibility for the consequences if any person's computer inadvertently suffers any disruption to services, loss of information, harm or is infected with a virus, other malicious computer programme or code that may occur as a consequence of receiving this email.

Unless stated otherwise, this email represents only the views of the sender and not the views of the Queensland Government.

********************************************************************************

The content presented in this publication is distributed by the Queensland Government as an information source only. The State of Queensland makes no statements, representations or warranties about the accuracy, completeness or reliability of any information contained in this publication. The State of Queensland disclaims all responsibility and all liability (including without limitation for liability in negligence) for all expenses, losses, damages and costs you might incur as a result of the information being inaccurate or incomplete in any way, and for any reason reliance was placed on such information.

RE: activemq component osgi classnotfound platformtransacitonmanager

Posted by Matthew Shaw <Ma...@ambulance.qld.gov.au>.
For anyone who is trying to do pure osgi, with DS and karaf and camel and would like to use connection pooling with activemq. Basically, don't use the camel activemq component. It has a bug, whereby it throws the classnotfound exception for the spring platformtransacitonmanager, which is what the component uses under the hood. 

After removing the component from my bundle and runtime and using the following config to setup the connection factory, pooling is working fine.

ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(System.getProperty("activemq.broker.url"));
            PooledConnectionFactory mqConnPool = new PooledConnectionFactory();
            mqConnPool.setConnectionFactory(connectionFactory);
            mqConnPool.setMaxConnections(10);
            JmsComponent mqComponent = new JmsComponent();
            mqComponent.setConnectionFactory(mqConnPool);
            mqComponent.setTransacted(false);
            mqComponent.setConcurrentConsumers(5);
            getContext().addComponent("mtaactivemq", mqComponent);

This code is inside my RouteBuilder configure method.

You will need activemq-pool dependency/bundle in your karaf runtime. 

Cheers,
Matt.



-----Original Message-----
From: Claus Ibsen [mailto:claus.ibsen@gmail.com] 
Sent: Tuesday, 26 September 2017 12:47 AM
To: users@camel.apache.org
Subject: Re: activemq component osgi classnotfound platformtransacitonmanager

On Mon, Sep 25, 2017 at 2:27 PM, Matthew Shaw <Ma...@ambulance.qld.gov.au> wrote:
> I understand, but I have a lot of other components I am working with / deploying that are not blueprint, just DS, I'm trying to be consistent in my approach. May I ask why you're insistent that I use blueprint? I use many other camel components with DS without issue. It's just the activemq component that is causing me problems.
>

Well you have a classloading issue in OSGi and that is always complex.
You have not really shown much details so nobody can really help you.
And as said when you do stuff on your own, you have a much higher chance of getting in trouble with osgi.

Transactions on OSGi is even more complex than the usual things you can do.

You can find some bullets here with good points when asking for help http://camel.apache.org/support.html


> -----Original Message-----
> From: Claus Ibsen [mailto:claus.ibsen@gmail.com]
> Sent: Monday, 25 September 2017 10:21 PM
> To: users@camel.apache.org
> Subject: Re: activemq component osgi classnotfound 
> platformtransacitonmanager
>
> Running in OSGi is not easy with the complex classloading, so try to avoid doing this yourself, and rely on camel-blueprint. Setup your <camelContext> there and the spring transaction manager and activemq components et all.
>
> If you want to use Camel routes in Java, then do so, and you can hook them up from the blueprint xml file.
>
> On Mon, Sep 25, 2017 at 2:16 PM, Matthew Shaw <Ma...@ambulance.qld.gov.au> wrote:
>> Hi Claus,
>>
>> I've bought your book and looked at the examples, but I'm still not understanding why I am getting this error. My code below appears to be correct in everything I'm reading, can you offer any further insight please?
>>
>> Cheers,
>> Matt.
>>
>> -----Original Message-----
>> From: Claus Ibsen [mailto:claus.ibsen@gmail.com]
>> Sent: Monday, 25 September 2017 6:39 PM
>> To: users@camel.apache.org
>> Subject: Re: activemq component osgi classnotfound 
>> platformtransacitonmanager
>>
>> Hi
>>
>> When using OSGi then its recommended to use camel-blueprint to setup Camel with OSGi. There is a bunch of stuff you otherwise need to do yourself if you dont do that.
>>
>> Take a look at some of the osgi and blueprint examples from Apache Camel.
>>
>> There is also external examples from JBoss Fuse on using transactions 
>> https://github.com/FuseByExample such as
>> https://github.com/FuseByExample/camel-persistence-part1
>>
>> And also the transaction chapter in the Camel in Action 2nd edition book has that with OSGi.
>> https://www.manning.com/books/camel-in-action-second-edition
>>
>>
>>
>> On Mon, Sep 25, 2017 at 1:03 AM, Matthew Shaw <Ma...@ambulance.qld.gov.au> wrote:
>>> Getting a class not found PlatformTransactionManager when trying to configure activemq component with latest karaf, here is my config:
>>>
>>>         ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(System.getProperty("activemq.broker.url"));
>>> //        camelContext.addComponent("mtaactivemq", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
>>>
>>>
>>>         PooledConnectionFactory mqConnPool = new PooledConnectionFactory();
>>>         mqConnPool.setConnectionFactory(connectionFactory);
>>>         mqConnPool.setMaxConnections(10);
>>>         ActiveMQComponent mqComponent = new ActiveMQComponent();
>>>         mqComponent.setConnectionFactory(mqConnPool);
>>>         mqComponent.setUsePooledConnection(true);
>>>         mqComponent.setTransacted(false);
>>>         JmsTransactionManager transactionManager = new JmsTransactionManager(mqConnPool);
>>>         SimpleRegistry simpleRegistry = (SimpleRegistry) camelContext.getRegistry();
>>>         simpleRegistry.put("transactionManager", transactionManager);
>>>         camelContext.addComponent("mtaactivemq", mqComponent);
>>>
>>>
>>> The spring-tx is on the karaf classpath:
>>> 206
>>>
>>>
>>> Apache ServiceMix :: Bundles ::
>>> spring-txorg.apache.servicemix.bundles.spring-tx<http://localhost:81
>>> 8
>>> 1
>>> /system/console/bundles/206>
>>>
>>> 4.3.10.RELEASE_1
>>>
>>> Active
>>>
>>>
>>> What am I missing here?
>>>
>>> Cheers,
>>> Matt.
>>> This email, including any attachments sent with it, is confidential and for the sole use of the intended recipient(s). This confidentiality is not waived or lost, if you receive it and you are not the intended recipient(s), or if it is transmitted/received in error.
>>>
>>> Any unauthorised use, alteration, disclosure, distribution or review of this email is strictly prohibited. The information contained in this email, including any attachment sent with it, may be subject to a statutory duty of confidentiality if it relates to health service matters.
>>>
>>> If you are not the intended recipient(s), or if you have received this email in error, you are asked to immediately notify the sender. You should also delete this email, and any copies, from your computer system network and destroy any hard copies produced.
>>>
>>> If not an intended recipient of this email, you must not copy, distribute or take any action(s) that relies on it; any form of disclosure, modification, distribution and/or publication of this email is also prohibited.
>>>
>>> Although the Queensland Ambulance Service takes all reasonable steps to ensure this email does not contain malicious software, the Queensland Ambulance Service does not accept responsibility for the consequences if any person's computer inadvertently suffers any disruption to services, loss of information, harm or is infected with a virus, other malicious computer programme or code that may occur as a consequence of receiving this email.
>>>
>>> Unless stated otherwise, this email represents only the views of the sender and not the views of the Queensland Government.
>>>
>>> ********************************************************************
>>> *
>>> *
>>> **********
>>>
>>> The content presented in this publication is distributed by the Queensland Government as an information source only. The State of Queensland makes no statements, representations or warranties about the accuracy, completeness or reliability of any information contained in this publication. The State of Queensland disclaims all responsibility and all liability (including without limitation for liability in negligence) for all expenses, losses, damages and costs you might incur as a result of the information being inaccurate or incomplete in any way, and for any reason reliance was placed on such information.
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> BLOCKEDdavsclaus[.]comBLOCKED @davsclaus Camel in Action 2:
>> https://www.manning.com/ibsen2
>>
>>
>> This email, including any attachments sent with it, is confidential and for the sole use of the intended recipient(s). This confidentiality is not waived or lost, if you receive it and you are not the intended recipient(s), or if it is transmitted/received in error.
>>
>> Any unauthorised use, alteration, disclosure, distribution or review of this email is strictly prohibited. The information contained in this email, including any attachment sent with it, may be subject to a statutory duty of confidentiality if it relates to health service matters.
>>
>> If you are not the intended recipient(s), or if you have received this email in error, you are asked to immediately notify the sender. You should also delete this email, and any copies, from your computer system network and destroy any hard copies produced.
>>
>> If not an intended recipient of this email, you must not copy, distribute or take any action(s) that relies on it; any form of disclosure, modification, distribution and/or publication of this email is also prohibited.
>>
>> Although the Queensland Ambulance Service takes all reasonable steps to ensure this email does not contain malicious software, the Queensland Ambulance Service does not accept responsibility for the consequences if any person's computer inadvertently suffers any disruption to services, loss of information, harm or is infected with a virus, other malicious computer programme or code that may occur as a consequence of receiving this email.
>>
>> Unless stated otherwise, this email represents only the views of the sender and not the views of the Queensland Government.
>>
>> *********************************************************************
>> *
>> **********
>>
>> The content presented in this publication is distributed by the Queensland Government as an information source only. The State of Queensland makes no statements, representations or warranties about the accuracy, completeness or reliability of any information contained in this publication. The State of Queensland disclaims all responsibility and all liability (including without limitation for liability in negligence) for all expenses, losses, damages and costs you might incur as a result of the information being inaccurate or incomplete in any way, and for any reason reliance was placed on such information.
>
>
>
> --
> Claus Ibsen
> -----------------
> BLOCKEDdavsclaus[.]comBLOCKED @davsclaus Camel in Action 2: 
> https://www.manning.com/ibsen2
>
>
> This email, including any attachments sent with it, is confidential and for the sole use of the intended recipient(s). This confidentiality is not waived or lost, if you receive it and you are not the intended recipient(s), or if it is transmitted/received in error.
>
> Any unauthorised use, alteration, disclosure, distribution or review of this email is strictly prohibited. The information contained in this email, including any attachment sent with it, may be subject to a statutory duty of confidentiality if it relates to health service matters.
>
> If you are not the intended recipient(s), or if you have received this email in error, you are asked to immediately notify the sender. You should also delete this email, and any copies, from your computer system network and destroy any hard copies produced.
>
> If not an intended recipient of this email, you must not copy, distribute or take any action(s) that relies on it; any form of disclosure, modification, distribution and/or publication of this email is also prohibited.
>
> Although the Queensland Ambulance Service takes all reasonable steps to ensure this email does not contain malicious software, the Queensland Ambulance Service does not accept responsibility for the consequences if any person's computer inadvertently suffers any disruption to services, loss of information, harm or is infected with a virus, other malicious computer programme or code that may occur as a consequence of receiving this email.
>
> Unless stated otherwise, this email represents only the views of the sender and not the views of the Queensland Government.
>
> **********************************************************************
> **********
>
> The content presented in this publication is distributed by the Queensland Government as an information source only. The State of Queensland makes no statements, representations or warranties about the accuracy, completeness or reliability of any information contained in this publication. The State of Queensland disclaims all responsibility and all liability (including without limitation for liability in negligence) for all expenses, losses, damages and costs you might incur as a result of the information being inaccurate or incomplete in any way, and for any reason reliance was placed on such information.



--
Claus Ibsen
-----------------
BLOCKEDdavsclaus[.]comBLOCKED @davsclaus Camel in Action 2: https://www.manning.com/ibsen2


This email, including any attachments sent with it, is confidential and for the sole use of the intended recipient(s). This confidentiality is not waived or lost, if you receive it and you are not the intended recipient(s), or if it is transmitted/received in error.

Any unauthorised use, alteration, disclosure, distribution or review of this email is strictly prohibited. The information contained in this email, including any attachment sent with it, may be subject to a statutory duty of confidentiality if it relates to health service matters.

If you are not the intended recipient(s), or if you have received this email in error, you are asked to immediately notify the sender. You should also delete this email, and any copies, from your computer system network and destroy any hard copies produced.

If not an intended recipient of this email, you must not copy, distribute or take any action(s) that relies on it; any form of disclosure, modification, distribution and/or publication of this email is also prohibited.

Although the Queensland Ambulance Service takes all reasonable steps to ensure this email does not contain malicious software, the Queensland Ambulance Service does not accept responsibility for the consequences if any person's computer inadvertently suffers any disruption to services, loss of information, harm or is infected with a virus, other malicious computer programme or code that may occur as a consequence of receiving this email.

Unless stated otherwise, this email represents only the views of the sender and not the views of the Queensland Government.

********************************************************************************

The content presented in this publication is distributed by the Queensland Government as an information source only. The State of Queensland makes no statements, representations or warranties about the accuracy, completeness or reliability of any information contained in this publication. The State of Queensland disclaims all responsibility and all liability (including without limitation for liability in negligence) for all expenses, losses, damages and costs you might incur as a result of the information being inaccurate or incomplete in any way, and for any reason reliance was placed on such information.

Re: activemq component osgi classnotfound platformtransacitonmanager

Posted by Claus Ibsen <cl...@gmail.com>.
On Mon, Sep 25, 2017 at 2:27 PM, Matthew Shaw
<Ma...@ambulance.qld.gov.au> wrote:
> I understand, but I have a lot of other components I am working with / deploying that are not blueprint, just DS, I'm trying to be consistent in my approach. May I ask why you're insistent that I use blueprint? I use many other camel components with DS without issue. It's just the activemq component that is causing me problems.
>

Well you have a classloading issue in OSGi and that is always complex.
You have not really shown much details so nobody can really help you.
And as said when you do stuff on your own, you have a much higher
chance of getting in trouble with osgi.

Transactions on OSGi is even more complex than the usual things you can do.

You can find some bullets here with good points when asking for help
http://camel.apache.org/support.html


> -----Original Message-----
> From: Claus Ibsen [mailto:claus.ibsen@gmail.com]
> Sent: Monday, 25 September 2017 10:21 PM
> To: users@camel.apache.org
> Subject: Re: activemq component osgi classnotfound platformtransacitonmanager
>
> Running in OSGi is not easy with the complex classloading, so try to avoid doing this yourself, and rely on camel-blueprint. Setup your <camelContext> there and the spring transaction manager and activemq components et all.
>
> If you want to use Camel routes in Java, then do so, and you can hook them up from the blueprint xml file.
>
> On Mon, Sep 25, 2017 at 2:16 PM, Matthew Shaw <Ma...@ambulance.qld.gov.au> wrote:
>> Hi Claus,
>>
>> I've bought your book and looked at the examples, but I'm still not understanding why I am getting this error. My code below appears to be correct in everything I'm reading, can you offer any further insight please?
>>
>> Cheers,
>> Matt.
>>
>> -----Original Message-----
>> From: Claus Ibsen [mailto:claus.ibsen@gmail.com]
>> Sent: Monday, 25 September 2017 6:39 PM
>> To: users@camel.apache.org
>> Subject: Re: activemq component osgi classnotfound
>> platformtransacitonmanager
>>
>> Hi
>>
>> When using OSGi then its recommended to use camel-blueprint to setup Camel with OSGi. There is a bunch of stuff you otherwise need to do yourself if you dont do that.
>>
>> Take a look at some of the osgi and blueprint examples from Apache Camel.
>>
>> There is also external examples from JBoss Fuse on using transactions
>> https://github.com/FuseByExample such as
>> https://github.com/FuseByExample/camel-persistence-part1
>>
>> And also the transaction chapter in the Camel in Action 2nd edition book has that with OSGi.
>> https://www.manning.com/books/camel-in-action-second-edition
>>
>>
>>
>> On Mon, Sep 25, 2017 at 1:03 AM, Matthew Shaw <Ma...@ambulance.qld.gov.au> wrote:
>>> Getting a class not found PlatformTransactionManager when trying to configure activemq component with latest karaf, here is my config:
>>>
>>>         ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(System.getProperty("activemq.broker.url"));
>>> //        camelContext.addComponent("mtaactivemq", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
>>>
>>>
>>>         PooledConnectionFactory mqConnPool = new PooledConnectionFactory();
>>>         mqConnPool.setConnectionFactory(connectionFactory);
>>>         mqConnPool.setMaxConnections(10);
>>>         ActiveMQComponent mqComponent = new ActiveMQComponent();
>>>         mqComponent.setConnectionFactory(mqConnPool);
>>>         mqComponent.setUsePooledConnection(true);
>>>         mqComponent.setTransacted(false);
>>>         JmsTransactionManager transactionManager = new JmsTransactionManager(mqConnPool);
>>>         SimpleRegistry simpleRegistry = (SimpleRegistry) camelContext.getRegistry();
>>>         simpleRegistry.put("transactionManager", transactionManager);
>>>         camelContext.addComponent("mtaactivemq", mqComponent);
>>>
>>>
>>> The spring-tx is on the karaf classpath:
>>> 206
>>>
>>>
>>> Apache ServiceMix :: Bundles ::
>>> spring-txorg.apache.servicemix.bundles.spring-tx<http://localhost:818
>>> 1
>>> /system/console/bundles/206>
>>>
>>> 4.3.10.RELEASE_1
>>>
>>> Active
>>>
>>>
>>> What am I missing here?
>>>
>>> Cheers,
>>> Matt.
>>> This email, including any attachments sent with it, is confidential and for the sole use of the intended recipient(s). This confidentiality is not waived or lost, if you receive it and you are not the intended recipient(s), or if it is transmitted/received in error.
>>>
>>> Any unauthorised use, alteration, disclosure, distribution or review of this email is strictly prohibited. The information contained in this email, including any attachment sent with it, may be subject to a statutory duty of confidentiality if it relates to health service matters.
>>>
>>> If you are not the intended recipient(s), or if you have received this email in error, you are asked to immediately notify the sender. You should also delete this email, and any copies, from your computer system network and destroy any hard copies produced.
>>>
>>> If not an intended recipient of this email, you must not copy, distribute or take any action(s) that relies on it; any form of disclosure, modification, distribution and/or publication of this email is also prohibited.
>>>
>>> Although the Queensland Ambulance Service takes all reasonable steps to ensure this email does not contain malicious software, the Queensland Ambulance Service does not accept responsibility for the consequences if any person's computer inadvertently suffers any disruption to services, loss of information, harm or is infected with a virus, other malicious computer programme or code that may occur as a consequence of receiving this email.
>>>
>>> Unless stated otherwise, this email represents only the views of the sender and not the views of the Queensland Government.
>>>
>>> *********************************************************************
>>> *
>>> **********
>>>
>>> The content presented in this publication is distributed by the Queensland Government as an information source only. The State of Queensland makes no statements, representations or warranties about the accuracy, completeness or reliability of any information contained in this publication. The State of Queensland disclaims all responsibility and all liability (including without limitation for liability in negligence) for all expenses, losses, damages and costs you might incur as a result of the information being inaccurate or incomplete in any way, and for any reason reliance was placed on such information.
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> BLOCKEDdavsclaus[.]comBLOCKED @davsclaus Camel in Action 2:
>> https://www.manning.com/ibsen2
>>
>>
>> This email, including any attachments sent with it, is confidential and for the sole use of the intended recipient(s). This confidentiality is not waived or lost, if you receive it and you are not the intended recipient(s), or if it is transmitted/received in error.
>>
>> Any unauthorised use, alteration, disclosure, distribution or review of this email is strictly prohibited. The information contained in this email, including any attachment sent with it, may be subject to a statutory duty of confidentiality if it relates to health service matters.
>>
>> If you are not the intended recipient(s), or if you have received this email in error, you are asked to immediately notify the sender. You should also delete this email, and any copies, from your computer system network and destroy any hard copies produced.
>>
>> If not an intended recipient of this email, you must not copy, distribute or take any action(s) that relies on it; any form of disclosure, modification, distribution and/or publication of this email is also prohibited.
>>
>> Although the Queensland Ambulance Service takes all reasonable steps to ensure this email does not contain malicious software, the Queensland Ambulance Service does not accept responsibility for the consequences if any person's computer inadvertently suffers any disruption to services, loss of information, harm or is infected with a virus, other malicious computer programme or code that may occur as a consequence of receiving this email.
>>
>> Unless stated otherwise, this email represents only the views of the sender and not the views of the Queensland Government.
>>
>> **********************************************************************
>> **********
>>
>> The content presented in this publication is distributed by the Queensland Government as an information source only. The State of Queensland makes no statements, representations or warranties about the accuracy, completeness or reliability of any information contained in this publication. The State of Queensland disclaims all responsibility and all liability (including without limitation for liability in negligence) for all expenses, losses, damages and costs you might incur as a result of the information being inaccurate or incomplete in any way, and for any reason reliance was placed on such information.
>
>
>
> --
> Claus Ibsen
> -----------------
> BLOCKEDdavsclaus[.]comBLOCKED @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
>
>
> This email, including any attachments sent with it, is confidential and for the sole use of the intended recipient(s). This confidentiality is not waived or lost, if you receive it and you are not the intended recipient(s), or if it is transmitted/received in error.
>
> Any unauthorised use, alteration, disclosure, distribution or review of this email is strictly prohibited. The information contained in this email, including any attachment sent with it, may be subject to a statutory duty of confidentiality if it relates to health service matters.
>
> If you are not the intended recipient(s), or if you have received this email in error, you are asked to immediately notify the sender. You should also delete this email, and any copies, from your computer system network and destroy any hard copies produced.
>
> If not an intended recipient of this email, you must not copy, distribute or take any action(s) that relies on it; any form of disclosure, modification, distribution and/or publication of this email is also prohibited.
>
> Although the Queensland Ambulance Service takes all reasonable steps to ensure this email does not contain malicious software, the Queensland Ambulance Service does not accept responsibility for the consequences if any person's computer inadvertently suffers any disruption to services, loss of information, harm or is infected with a virus, other malicious computer programme or code that may occur as a consequence of receiving this email.
>
> Unless stated otherwise, this email represents only the views of the sender and not the views of the Queensland Government.
>
> ********************************************************************************
>
> The content presented in this publication is distributed by the Queensland Government as an information source only. The State of Queensland makes no statements, representations or warranties about the accuracy, completeness or reliability of any information contained in this publication. The State of Queensland disclaims all responsibility and all liability (including without limitation for liability in negligence) for all expenses, losses, damages and costs you might incur as a result of the information being inaccurate or incomplete in any way, and for any reason reliance was placed on such information.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

RE: activemq component osgi classnotfound platformtransacitonmanager

Posted by Matthew Shaw <Ma...@ambulance.qld.gov.au>.
I understand, but I have a lot of other components I am working with / deploying that are not blueprint, just DS, I'm trying to be consistent in my approach. May I ask why you're insistent that I use blueprint? I use many other camel components with DS without issue. It's just the activemq component that is causing me problems.

-----Original Message-----
From: Claus Ibsen [mailto:claus.ibsen@gmail.com] 
Sent: Monday, 25 September 2017 10:21 PM
To: users@camel.apache.org
Subject: Re: activemq component osgi classnotfound platformtransacitonmanager

Running in OSGi is not easy with the complex classloading, so try to avoid doing this yourself, and rely on camel-blueprint. Setup your <camelContext> there and the spring transaction manager and activemq components et all.

If you want to use Camel routes in Java, then do so, and you can hook them up from the blueprint xml file.

On Mon, Sep 25, 2017 at 2:16 PM, Matthew Shaw <Ma...@ambulance.qld.gov.au> wrote:
> Hi Claus,
>
> I've bought your book and looked at the examples, but I'm still not understanding why I am getting this error. My code below appears to be correct in everything I'm reading, can you offer any further insight please?
>
> Cheers,
> Matt.
>
> -----Original Message-----
> From: Claus Ibsen [mailto:claus.ibsen@gmail.com]
> Sent: Monday, 25 September 2017 6:39 PM
> To: users@camel.apache.org
> Subject: Re: activemq component osgi classnotfound 
> platformtransacitonmanager
>
> Hi
>
> When using OSGi then its recommended to use camel-blueprint to setup Camel with OSGi. There is a bunch of stuff you otherwise need to do yourself if you dont do that.
>
> Take a look at some of the osgi and blueprint examples from Apache Camel.
>
> There is also external examples from JBoss Fuse on using transactions 
> https://github.com/FuseByExample such as
> https://github.com/FuseByExample/camel-persistence-part1
>
> And also the transaction chapter in the Camel in Action 2nd edition book has that with OSGi.
> https://www.manning.com/books/camel-in-action-second-edition
>
>
>
> On Mon, Sep 25, 2017 at 1:03 AM, Matthew Shaw <Ma...@ambulance.qld.gov.au> wrote:
>> Getting a class not found PlatformTransactionManager when trying to configure activemq component with latest karaf, here is my config:
>>
>>         ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(System.getProperty("activemq.broker.url"));
>> //        camelContext.addComponent("mtaactivemq", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
>>
>>
>>         PooledConnectionFactory mqConnPool = new PooledConnectionFactory();
>>         mqConnPool.setConnectionFactory(connectionFactory);
>>         mqConnPool.setMaxConnections(10);
>>         ActiveMQComponent mqComponent = new ActiveMQComponent();
>>         mqComponent.setConnectionFactory(mqConnPool);
>>         mqComponent.setUsePooledConnection(true);
>>         mqComponent.setTransacted(false);
>>         JmsTransactionManager transactionManager = new JmsTransactionManager(mqConnPool);
>>         SimpleRegistry simpleRegistry = (SimpleRegistry) camelContext.getRegistry();
>>         simpleRegistry.put("transactionManager", transactionManager);
>>         camelContext.addComponent("mtaactivemq", mqComponent);
>>
>>
>> The spring-tx is on the karaf classpath:
>> 206
>>
>>
>> Apache ServiceMix :: Bundles ::
>> spring-txorg.apache.servicemix.bundles.spring-tx<http://localhost:818
>> 1
>> /system/console/bundles/206>
>>
>> 4.3.10.RELEASE_1
>>
>> Active
>>
>>
>> What am I missing here?
>>
>> Cheers,
>> Matt.
>> This email, including any attachments sent with it, is confidential and for the sole use of the intended recipient(s). This confidentiality is not waived or lost, if you receive it and you are not the intended recipient(s), or if it is transmitted/received in error.
>>
>> Any unauthorised use, alteration, disclosure, distribution or review of this email is strictly prohibited. The information contained in this email, including any attachment sent with it, may be subject to a statutory duty of confidentiality if it relates to health service matters.
>>
>> If you are not the intended recipient(s), or if you have received this email in error, you are asked to immediately notify the sender. You should also delete this email, and any copies, from your computer system network and destroy any hard copies produced.
>>
>> If not an intended recipient of this email, you must not copy, distribute or take any action(s) that relies on it; any form of disclosure, modification, distribution and/or publication of this email is also prohibited.
>>
>> Although the Queensland Ambulance Service takes all reasonable steps to ensure this email does not contain malicious software, the Queensland Ambulance Service does not accept responsibility for the consequences if any person's computer inadvertently suffers any disruption to services, loss of information, harm or is infected with a virus, other malicious computer programme or code that may occur as a consequence of receiving this email.
>>
>> Unless stated otherwise, this email represents only the views of the sender and not the views of the Queensland Government.
>>
>> *********************************************************************
>> *
>> **********
>>
>> The content presented in this publication is distributed by the Queensland Government as an information source only. The State of Queensland makes no statements, representations or warranties about the accuracy, completeness or reliability of any information contained in this publication. The State of Queensland disclaims all responsibility and all liability (including without limitation for liability in negligence) for all expenses, losses, damages and costs you might incur as a result of the information being inaccurate or incomplete in any way, and for any reason reliance was placed on such information.
>
>
>
> --
> Claus Ibsen
> -----------------
> BLOCKEDdavsclaus[.]comBLOCKED @davsclaus Camel in Action 2: 
> https://www.manning.com/ibsen2
>
>
> This email, including any attachments sent with it, is confidential and for the sole use of the intended recipient(s). This confidentiality is not waived or lost, if you receive it and you are not the intended recipient(s), or if it is transmitted/received in error.
>
> Any unauthorised use, alteration, disclosure, distribution or review of this email is strictly prohibited. The information contained in this email, including any attachment sent with it, may be subject to a statutory duty of confidentiality if it relates to health service matters.
>
> If you are not the intended recipient(s), or if you have received this email in error, you are asked to immediately notify the sender. You should also delete this email, and any copies, from your computer system network and destroy any hard copies produced.
>
> If not an intended recipient of this email, you must not copy, distribute or take any action(s) that relies on it; any form of disclosure, modification, distribution and/or publication of this email is also prohibited.
>
> Although the Queensland Ambulance Service takes all reasonable steps to ensure this email does not contain malicious software, the Queensland Ambulance Service does not accept responsibility for the consequences if any person's computer inadvertently suffers any disruption to services, loss of information, harm or is infected with a virus, other malicious computer programme or code that may occur as a consequence of receiving this email.
>
> Unless stated otherwise, this email represents only the views of the sender and not the views of the Queensland Government.
>
> **********************************************************************
> **********
>
> The content presented in this publication is distributed by the Queensland Government as an information source only. The State of Queensland makes no statements, representations or warranties about the accuracy, completeness or reliability of any information contained in this publication. The State of Queensland disclaims all responsibility and all liability (including without limitation for liability in negligence) for all expenses, losses, damages and costs you might incur as a result of the information being inaccurate or incomplete in any way, and for any reason reliance was placed on such information.



--
Claus Ibsen
-----------------
BLOCKEDdavsclaus[.]comBLOCKED @davsclaus Camel in Action 2: https://www.manning.com/ibsen2


This email, including any attachments sent with it, is confidential and for the sole use of the intended recipient(s). This confidentiality is not waived or lost, if you receive it and you are not the intended recipient(s), or if it is transmitted/received in error.

Any unauthorised use, alteration, disclosure, distribution or review of this email is strictly prohibited. The information contained in this email, including any attachment sent with it, may be subject to a statutory duty of confidentiality if it relates to health service matters.

If you are not the intended recipient(s), or if you have received this email in error, you are asked to immediately notify the sender. You should also delete this email, and any copies, from your computer system network and destroy any hard copies produced.

If not an intended recipient of this email, you must not copy, distribute or take any action(s) that relies on it; any form of disclosure, modification, distribution and/or publication of this email is also prohibited.

Although the Queensland Ambulance Service takes all reasonable steps to ensure this email does not contain malicious software, the Queensland Ambulance Service does not accept responsibility for the consequences if any person's computer inadvertently suffers any disruption to services, loss of information, harm or is infected with a virus, other malicious computer programme or code that may occur as a consequence of receiving this email.

Unless stated otherwise, this email represents only the views of the sender and not the views of the Queensland Government.

********************************************************************************

The content presented in this publication is distributed by the Queensland Government as an information source only. The State of Queensland makes no statements, representations or warranties about the accuracy, completeness or reliability of any information contained in this publication. The State of Queensland disclaims all responsibility and all liability (including without limitation for liability in negligence) for all expenses, losses, damages and costs you might incur as a result of the information being inaccurate or incomplete in any way, and for any reason reliance was placed on such information.

Re: activemq component osgi classnotfound platformtransacitonmanager

Posted by Claus Ibsen <cl...@gmail.com>.
Running in OSGi is not easy with the complex classloading, so try to
avoid doing this yourself, and rely on camel-blueprint. Setup your
<camelContext> there and the spring transaction manager and activemq
components et all.

If you want to use Camel routes in Java, then do so, and you can hook
them up from the blueprint xml file.

On Mon, Sep 25, 2017 at 2:16 PM, Matthew Shaw
<Ma...@ambulance.qld.gov.au> wrote:
> Hi Claus,
>
> I've bought your book and looked at the examples, but I'm still not understanding why I am getting this error. My code below appears to be correct in everything I'm reading, can you offer any further insight please?
>
> Cheers,
> Matt.
>
> -----Original Message-----
> From: Claus Ibsen [mailto:claus.ibsen@gmail.com]
> Sent: Monday, 25 September 2017 6:39 PM
> To: users@camel.apache.org
> Subject: Re: activemq component osgi classnotfound platformtransacitonmanager
>
> Hi
>
> When using OSGi then its recommended to use camel-blueprint to setup Camel with OSGi. There is a bunch of stuff you otherwise need to do yourself if you dont do that.
>
> Take a look at some of the osgi and blueprint examples from Apache Camel.
>
> There is also external examples from JBoss Fuse on using transactions https://github.com/FuseByExample such as
> https://github.com/FuseByExample/camel-persistence-part1
>
> And also the transaction chapter in the Camel in Action 2nd edition book has that with OSGi.
> https://www.manning.com/books/camel-in-action-second-edition
>
>
>
> On Mon, Sep 25, 2017 at 1:03 AM, Matthew Shaw <Ma...@ambulance.qld.gov.au> wrote:
>> Getting a class not found PlatformTransactionManager when trying to configure activemq component with latest karaf, here is my config:
>>
>>         ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(System.getProperty("activemq.broker.url"));
>> //        camelContext.addComponent("mtaactivemq", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
>>
>>
>>         PooledConnectionFactory mqConnPool = new PooledConnectionFactory();
>>         mqConnPool.setConnectionFactory(connectionFactory);
>>         mqConnPool.setMaxConnections(10);
>>         ActiveMQComponent mqComponent = new ActiveMQComponent();
>>         mqComponent.setConnectionFactory(mqConnPool);
>>         mqComponent.setUsePooledConnection(true);
>>         mqComponent.setTransacted(false);
>>         JmsTransactionManager transactionManager = new JmsTransactionManager(mqConnPool);
>>         SimpleRegistry simpleRegistry = (SimpleRegistry) camelContext.getRegistry();
>>         simpleRegistry.put("transactionManager", transactionManager);
>>         camelContext.addComponent("mtaactivemq", mqComponent);
>>
>>
>> The spring-tx is on the karaf classpath:
>> 206
>>
>>
>> Apache ServiceMix :: Bundles ::
>> spring-txorg.apache.servicemix.bundles.spring-tx<http://localhost:8181
>> /system/console/bundles/206>
>>
>> 4.3.10.RELEASE_1
>>
>> Active
>>
>>
>> What am I missing here?
>>
>> Cheers,
>> Matt.
>> This email, including any attachments sent with it, is confidential and for the sole use of the intended recipient(s). This confidentiality is not waived or lost, if you receive it and you are not the intended recipient(s), or if it is transmitted/received in error.
>>
>> Any unauthorised use, alteration, disclosure, distribution or review of this email is strictly prohibited. The information contained in this email, including any attachment sent with it, may be subject to a statutory duty of confidentiality if it relates to health service matters.
>>
>> If you are not the intended recipient(s), or if you have received this email in error, you are asked to immediately notify the sender. You should also delete this email, and any copies, from your computer system network and destroy any hard copies produced.
>>
>> If not an intended recipient of this email, you must not copy, distribute or take any action(s) that relies on it; any form of disclosure, modification, distribution and/or publication of this email is also prohibited.
>>
>> Although the Queensland Ambulance Service takes all reasonable steps to ensure this email does not contain malicious software, the Queensland Ambulance Service does not accept responsibility for the consequences if any person's computer inadvertently suffers any disruption to services, loss of information, harm or is infected with a virus, other malicious computer programme or code that may occur as a consequence of receiving this email.
>>
>> Unless stated otherwise, this email represents only the views of the sender and not the views of the Queensland Government.
>>
>> **********************************************************************
>> **********
>>
>> The content presented in this publication is distributed by the Queensland Government as an information source only. The State of Queensland makes no statements, representations or warranties about the accuracy, completeness or reliability of any information contained in this publication. The State of Queensland disclaims all responsibility and all liability (including without limitation for liability in negligence) for all expenses, losses, damages and costs you might incur as a result of the information being inaccurate or incomplete in any way, and for any reason reliance was placed on such information.
>
>
>
> --
> Claus Ibsen
> -----------------
> BLOCKEDdavsclaus[.]comBLOCKED @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
>
>
> This email, including any attachments sent with it, is confidential and for the sole use of the intended recipient(s). This confidentiality is not waived or lost, if you receive it and you are not the intended recipient(s), or if it is transmitted/received in error.
>
> Any unauthorised use, alteration, disclosure, distribution or review of this email is strictly prohibited. The information contained in this email, including any attachment sent with it, may be subject to a statutory duty of confidentiality if it relates to health service matters.
>
> If you are not the intended recipient(s), or if you have received this email in error, you are asked to immediately notify the sender. You should also delete this email, and any copies, from your computer system network and destroy any hard copies produced.
>
> If not an intended recipient of this email, you must not copy, distribute or take any action(s) that relies on it; any form of disclosure, modification, distribution and/or publication of this email is also prohibited.
>
> Although the Queensland Ambulance Service takes all reasonable steps to ensure this email does not contain malicious software, the Queensland Ambulance Service does not accept responsibility for the consequences if any person's computer inadvertently suffers any disruption to services, loss of information, harm or is infected with a virus, other malicious computer programme or code that may occur as a consequence of receiving this email.
>
> Unless stated otherwise, this email represents only the views of the sender and not the views of the Queensland Government.
>
> ********************************************************************************
>
> The content presented in this publication is distributed by the Queensland Government as an information source only. The State of Queensland makes no statements, representations or warranties about the accuracy, completeness or reliability of any information contained in this publication. The State of Queensland disclaims all responsibility and all liability (including without limitation for liability in negligence) for all expenses, losses, damages and costs you might incur as a result of the information being inaccurate or incomplete in any way, and for any reason reliance was placed on such information.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

RE: activemq component osgi classnotfound platformtransacitonmanager

Posted by Matthew Shaw <Ma...@ambulance.qld.gov.au>.
Hi Claus,

I've bought your book and looked at the examples, but I'm still not understanding why I am getting this error. My code below appears to be correct in everything I'm reading, can you offer any further insight please?

Cheers,
Matt.

-----Original Message-----
From: Claus Ibsen [mailto:claus.ibsen@gmail.com] 
Sent: Monday, 25 September 2017 6:39 PM
To: users@camel.apache.org
Subject: Re: activemq component osgi classnotfound platformtransacitonmanager

Hi

When using OSGi then its recommended to use camel-blueprint to setup Camel with OSGi. There is a bunch of stuff you otherwise need to do yourself if you dont do that.

Take a look at some of the osgi and blueprint examples from Apache Camel.

There is also external examples from JBoss Fuse on using transactions https://github.com/FuseByExample such as
https://github.com/FuseByExample/camel-persistence-part1

And also the transaction chapter in the Camel in Action 2nd edition book has that with OSGi.
https://www.manning.com/books/camel-in-action-second-edition



On Mon, Sep 25, 2017 at 1:03 AM, Matthew Shaw <Ma...@ambulance.qld.gov.au> wrote:
> Getting a class not found PlatformTransactionManager when trying to configure activemq component with latest karaf, here is my config:
>
>         ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(System.getProperty("activemq.broker.url"));
> //        camelContext.addComponent("mtaactivemq", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
>
>
>         PooledConnectionFactory mqConnPool = new PooledConnectionFactory();
>         mqConnPool.setConnectionFactory(connectionFactory);
>         mqConnPool.setMaxConnections(10);
>         ActiveMQComponent mqComponent = new ActiveMQComponent();
>         mqComponent.setConnectionFactory(mqConnPool);
>         mqComponent.setUsePooledConnection(true);
>         mqComponent.setTransacted(false);
>         JmsTransactionManager transactionManager = new JmsTransactionManager(mqConnPool);
>         SimpleRegistry simpleRegistry = (SimpleRegistry) camelContext.getRegistry();
>         simpleRegistry.put("transactionManager", transactionManager);
>         camelContext.addComponent("mtaactivemq", mqComponent);
>
>
> The spring-tx is on the karaf classpath:
> 206
>
>
> Apache ServiceMix :: Bundles :: 
> spring-txorg.apache.servicemix.bundles.spring-tx<http://localhost:8181
> /system/console/bundles/206>
>
> 4.3.10.RELEASE_1
>
> Active
>
>
> What am I missing here?
>
> Cheers,
> Matt.
> This email, including any attachments sent with it, is confidential and for the sole use of the intended recipient(s). This confidentiality is not waived or lost, if you receive it and you are not the intended recipient(s), or if it is transmitted/received in error.
>
> Any unauthorised use, alteration, disclosure, distribution or review of this email is strictly prohibited. The information contained in this email, including any attachment sent with it, may be subject to a statutory duty of confidentiality if it relates to health service matters.
>
> If you are not the intended recipient(s), or if you have received this email in error, you are asked to immediately notify the sender. You should also delete this email, and any copies, from your computer system network and destroy any hard copies produced.
>
> If not an intended recipient of this email, you must not copy, distribute or take any action(s) that relies on it; any form of disclosure, modification, distribution and/or publication of this email is also prohibited.
>
> Although the Queensland Ambulance Service takes all reasonable steps to ensure this email does not contain malicious software, the Queensland Ambulance Service does not accept responsibility for the consequences if any person's computer inadvertently suffers any disruption to services, loss of information, harm or is infected with a virus, other malicious computer programme or code that may occur as a consequence of receiving this email.
>
> Unless stated otherwise, this email represents only the views of the sender and not the views of the Queensland Government.
>
> **********************************************************************
> **********
>
> The content presented in this publication is distributed by the Queensland Government as an information source only. The State of Queensland makes no statements, representations or warranties about the accuracy, completeness or reliability of any information contained in this publication. The State of Queensland disclaims all responsibility and all liability (including without limitation for liability in negligence) for all expenses, losses, damages and costs you might incur as a result of the information being inaccurate or incomplete in any way, and for any reason reliance was placed on such information.



--
Claus Ibsen
-----------------
BLOCKEDdavsclaus[.]comBLOCKED @davsclaus Camel in Action 2: https://www.manning.com/ibsen2


This email, including any attachments sent with it, is confidential and for the sole use of the intended recipient(s). This confidentiality is not waived or lost, if you receive it and you are not the intended recipient(s), or if it is transmitted/received in error.

Any unauthorised use, alteration, disclosure, distribution or review of this email is strictly prohibited. The information contained in this email, including any attachment sent with it, may be subject to a statutory duty of confidentiality if it relates to health service matters.

If you are not the intended recipient(s), or if you have received this email in error, you are asked to immediately notify the sender. You should also delete this email, and any copies, from your computer system network and destroy any hard copies produced.

If not an intended recipient of this email, you must not copy, distribute or take any action(s) that relies on it; any form of disclosure, modification, distribution and/or publication of this email is also prohibited.

Although the Queensland Ambulance Service takes all reasonable steps to ensure this email does not contain malicious software, the Queensland Ambulance Service does not accept responsibility for the consequences if any person's computer inadvertently suffers any disruption to services, loss of information, harm or is infected with a virus, other malicious computer programme or code that may occur as a consequence of receiving this email.

Unless stated otherwise, this email represents only the views of the sender and not the views of the Queensland Government.

********************************************************************************

The content presented in this publication is distributed by the Queensland Government as an information source only. The State of Queensland makes no statements, representations or warranties about the accuracy, completeness or reliability of any information contained in this publication. The State of Queensland disclaims all responsibility and all liability (including without limitation for liability in negligence) for all expenses, losses, damages and costs you might incur as a result of the information being inaccurate or incomplete in any way, and for any reason reliance was placed on such information.

RE: activemq component osgi classnotfound platformtransacitonmanager

Posted by Matthew Shaw <Ma...@ambulance.qld.gov.au>.
Thanks Claus, I'm using declarative services, not blueprint. I'll check out the reference book.

-----Original Message-----
From: Claus Ibsen [mailto:claus.ibsen@gmail.com] 
Sent: Monday, 25 September 2017 6:39 PM
To: users@camel.apache.org
Subject: Re: activemq component osgi classnotfound platformtransacitonmanager

Hi

When using OSGi then its recommended to use camel-blueprint to setup Camel with OSGi. There is a bunch of stuff you otherwise need to do yourself if you dont do that.

Take a look at some of the osgi and blueprint examples from Apache Camel.

There is also external examples from JBoss Fuse on using transactions https://github.com/FuseByExample such as
https://github.com/FuseByExample/camel-persistence-part1

And also the transaction chapter in the Camel in Action 2nd edition book has that with OSGi.
https://www.manning.com/books/camel-in-action-second-edition



On Mon, Sep 25, 2017 at 1:03 AM, Matthew Shaw <Ma...@ambulance.qld.gov.au> wrote:
> Getting a class not found PlatformTransactionManager when trying to configure activemq component with latest karaf, here is my config:
>
>         ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(System.getProperty("activemq.broker.url"));
> //        camelContext.addComponent("mtaactivemq", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
>
>
>         PooledConnectionFactory mqConnPool = new PooledConnectionFactory();
>         mqConnPool.setConnectionFactory(connectionFactory);
>         mqConnPool.setMaxConnections(10);
>         ActiveMQComponent mqComponent = new ActiveMQComponent();
>         mqComponent.setConnectionFactory(mqConnPool);
>         mqComponent.setUsePooledConnection(true);
>         mqComponent.setTransacted(false);
>         JmsTransactionManager transactionManager = new JmsTransactionManager(mqConnPool);
>         SimpleRegistry simpleRegistry = (SimpleRegistry) camelContext.getRegistry();
>         simpleRegistry.put("transactionManager", transactionManager);
>         camelContext.addComponent("mtaactivemq", mqComponent);
>
>
> The spring-tx is on the karaf classpath:
> 206
>
>
> Apache ServiceMix :: Bundles :: 
> spring-txorg.apache.servicemix.bundles.spring-tx<http://localhost:8181
> /system/console/bundles/206>
>
> 4.3.10.RELEASE_1
>
> Active
>
>
> What am I missing here?
>
> Cheers,
> Matt.
> This email, including any attachments sent with it, is confidential and for the sole use of the intended recipient(s). This confidentiality is not waived or lost, if you receive it and you are not the intended recipient(s), or if it is transmitted/received in error.
>
> Any unauthorised use, alteration, disclosure, distribution or review of this email is strictly prohibited. The information contained in this email, including any attachment sent with it, may be subject to a statutory duty of confidentiality if it relates to health service matters.
>
> If you are not the intended recipient(s), or if you have received this email in error, you are asked to immediately notify the sender. You should also delete this email, and any copies, from your computer system network and destroy any hard copies produced.
>
> If not an intended recipient of this email, you must not copy, distribute or take any action(s) that relies on it; any form of disclosure, modification, distribution and/or publication of this email is also prohibited.
>
> Although the Queensland Ambulance Service takes all reasonable steps to ensure this email does not contain malicious software, the Queensland Ambulance Service does not accept responsibility for the consequences if any person's computer inadvertently suffers any disruption to services, loss of information, harm or is infected with a virus, other malicious computer programme or code that may occur as a consequence of receiving this email.
>
> Unless stated otherwise, this email represents only the views of the sender and not the views of the Queensland Government.
>
> **********************************************************************
> **********
>
> The content presented in this publication is distributed by the Queensland Government as an information source only. The State of Queensland makes no statements, representations or warranties about the accuracy, completeness or reliability of any information contained in this publication. The State of Queensland disclaims all responsibility and all liability (including without limitation for liability in negligence) for all expenses, losses, damages and costs you might incur as a result of the information being inaccurate or incomplete in any way, and for any reason reliance was placed on such information.



--
Claus Ibsen
-----------------
BLOCKEDdavsclaus[.]comBLOCKED @davsclaus Camel in Action 2: https://www.manning.com/ibsen2


This email, including any attachments sent with it, is confidential and for the sole use of the intended recipient(s). This confidentiality is not waived or lost, if you receive it and you are not the intended recipient(s), or if it is transmitted/received in error.

Any unauthorised use, alteration, disclosure, distribution or review of this email is strictly prohibited. The information contained in this email, including any attachment sent with it, may be subject to a statutory duty of confidentiality if it relates to health service matters.

If you are not the intended recipient(s), or if you have received this email in error, you are asked to immediately notify the sender. You should also delete this email, and any copies, from your computer system network and destroy any hard copies produced.

If not an intended recipient of this email, you must not copy, distribute or take any action(s) that relies on it; any form of disclosure, modification, distribution and/or publication of this email is also prohibited.

Although the Queensland Ambulance Service takes all reasonable steps to ensure this email does not contain malicious software, the Queensland Ambulance Service does not accept responsibility for the consequences if any person's computer inadvertently suffers any disruption to services, loss of information, harm or is infected with a virus, other malicious computer programme or code that may occur as a consequence of receiving this email.

Unless stated otherwise, this email represents only the views of the sender and not the views of the Queensland Government.

********************************************************************************

The content presented in this publication is distributed by the Queensland Government as an information source only. The State of Queensland makes no statements, representations or warranties about the accuracy, completeness or reliability of any information contained in this publication. The State of Queensland disclaims all responsibility and all liability (including without limitation for liability in negligence) for all expenses, losses, damages and costs you might incur as a result of the information being inaccurate or incomplete in any way, and for any reason reliance was placed on such information.

Re: activemq component osgi classnotfound platformtransacitonmanager

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

When using OSGi then its recommended to use camel-blueprint to setup
Camel with OSGi. There is a bunch of stuff you otherwise need to do
yourself if you dont do that.

Take a look at some of the osgi and blueprint examples from Apache Camel.

There is also external examples from JBoss Fuse on using transactions
https://github.com/FuseByExample such as
https://github.com/FuseByExample/camel-persistence-part1

And also the transaction chapter in the Camel in Action 2nd edition
book has that with OSGi.
https://www.manning.com/books/camel-in-action-second-edition



On Mon, Sep 25, 2017 at 1:03 AM, Matthew Shaw
<Ma...@ambulance.qld.gov.au> wrote:
> Getting a class not found PlatformTransactionManager when trying to configure activemq component with latest karaf, here is my config:
>
>         ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(System.getProperty("activemq.broker.url"));
> //        camelContext.addComponent("mtaactivemq", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));
>
>
>         PooledConnectionFactory mqConnPool = new PooledConnectionFactory();
>         mqConnPool.setConnectionFactory(connectionFactory);
>         mqConnPool.setMaxConnections(10);
>         ActiveMQComponent mqComponent = new ActiveMQComponent();
>         mqComponent.setConnectionFactory(mqConnPool);
>         mqComponent.setUsePooledConnection(true);
>         mqComponent.setTransacted(false);
>         JmsTransactionManager transactionManager = new JmsTransactionManager(mqConnPool);
>         SimpleRegistry simpleRegistry = (SimpleRegistry) camelContext.getRegistry();
>         simpleRegistry.put("transactionManager", transactionManager);
>         camelContext.addComponent("mtaactivemq", mqComponent);
>
>
> The spring-tx is on the karaf classpath:
> 206
>
>
> Apache ServiceMix :: Bundles :: spring-txorg.apache.servicemix.bundles.spring-tx<http://localhost:8181/system/console/bundles/206>
>
> 4.3.10.RELEASE_1
>
> Active
>
>
> What am I missing here?
>
> Cheers,
> Matt.
> This email, including any attachments sent with it, is confidential and for the sole use of the intended recipient(s). This confidentiality is not waived or lost, if you receive it and you are not the intended recipient(s), or if it is transmitted/received in error.
>
> Any unauthorised use, alteration, disclosure, distribution or review of this email is strictly prohibited. The information contained in this email, including any attachment sent with it, may be subject to a statutory duty of confidentiality if it relates to health service matters.
>
> If you are not the intended recipient(s), or if you have received this email in error, you are asked to immediately notify the sender. You should also delete this email, and any copies, from your computer system network and destroy any hard copies produced.
>
> If not an intended recipient of this email, you must not copy, distribute or take any action(s) that relies on it; any form of disclosure, modification, distribution and/or publication of this email is also prohibited.
>
> Although the Queensland Ambulance Service takes all reasonable steps to ensure this email does not contain malicious software, the Queensland Ambulance Service does not accept responsibility for the consequences if any person's computer inadvertently suffers any disruption to services, loss of information, harm or is infected with a virus, other malicious computer programme or code that may occur as a consequence of receiving this email.
>
> Unless stated otherwise, this email represents only the views of the sender and not the views of the Queensland Government.
>
> ********************************************************************************
>
> The content presented in this publication is distributed by the Queensland Government as an information source only. The State of Queensland makes no statements, representations or warranties about the accuracy, completeness or reliability of any information contained in this publication. The State of Queensland disclaims all responsibility and all liability (including without limitation for liability in negligence) for all expenses, losses, damages and costs you might incur as a result of the information being inaccurate or incomplete in any way, and for any reason reliance was placed on such information.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2