Discussion:
How to setup ActiveMQ in TomEE to not use persistence for JMS ?
COURTAULT Francois
2017-10-23 07:30:21 UTC
Permalink
Hello,

First, it seems that, by default, ActiveMQ in TomEE, in case we use some JMS stuff in our application, uses persistent repository, right ?
Second, looking at some ActiveMQ docs, one way to disable persistence for JMS is to :

* Have an activemq.xml file with the following setting <broker persistent="false" ....

* Have a tomee.xml file which refers the activemq.xml.

The issue I have is that, for TomEE/ActiveMQ to read these files, we have to use some Spring libraries like activemq-spring.jar either in TomEE/lib (preferred way, right ?) or war WEB-INF/lib.

So, the question is: does it exist another way to disable persistence for JMS without having to use some Spring libraries ?

Best Regards.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
Romain Manni-Bucau
2017-10-23 07:32:31 UTC
Permalink
Hi Francois,

you are right, you can set the broker url to:
broker:(tcp://localhost:61616)?useJmx=false&persistent=false

to disable the persistence and jmx (for instance)

Romain Manni-Bucau
@rmannibucau | Blog | Old Blog | Github | LinkedIn
Post by COURTAULT Francois
Hello,
First, it seems that, by default, ActiveMQ in TomEE, in case we use some JMS stuff in our application, uses persistent repository, right ?
* Have an activemq.xml file with the following setting <broker persistent="false" ....
* Have a tomee.xml file which refers the activemq.xml.
The issue I have is that, for TomEE/ActiveMQ to read these files, we have to use some Spring libraries like activemq-spring.jar either in TomEE/lib (preferred way, right ?) or war WEB-INF/lib.
So, the question is: does it exist another way to disable persistence for JMS without having to use some Spring libraries ?
Best Regards.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
COURTAULT Francois
2017-10-23 07:54:16 UTC
Permalink
Hello Romain,

Thanks for your answer but my question is more on how to achieve that without using some Spring/ActiveMQ libraries which customizes TomEE distro => requires to copy some jars in TomEE/lib folder.
Another solution could be to have those jars inside our application (in WEB-INF/lib): do you know if it will work ? (avoid TomEE customization except for activemq.xml and tomee.xml)

Best Regards.

-----Original Message-----
From: Romain Manni-Bucau [mailto:***@gmail.com]
Sent: lundi 23 octobre 2017 09:33
To: ***@tomee.apache.org
Cc: ***@cxf.apache.org
Subject: Re: How to setup ActiveMQ in TomEE to not use persistence for JMS ?

Hi Francois,

you are right, you can set the broker url to:
broker:(tcp://localhost:61616)?useJmx=false&persistent=false

to disable the persistence and jmx (for instance)

Romain Manni-Bucau
@rmannibucau | Blog | Old Blog | Github | LinkedIn
Post by COURTAULT Francois
Hello,
First, it seems that, by default, ActiveMQ in TomEE, in case we use some JMS stuff in our application, uses persistent repository, right ?
* Have an activemq.xml file with the following setting <broker persistent="false" ....
* Have a tomee.xml file which refers the activemq.xml.
The issue I have is that, for TomEE/ActiveMQ to read these files, we have to use some Spring libraries like activemq-spring.jar either in TomEE/lib (preferred way, right ?) or war WEB-INF/lib.
So, the question is: does it exist another way to disable persistence for JMS without having to use some Spring libraries ?
Best Regards.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages
Romain Manni-Bucau
2017-10-23 07:55:49 UTC
Permalink
in WEB-INF/lib it will not work but the previous url was for tomee.xml
AMQ adapter and not related to any spring config

Romain Manni-Bucau
@rmannibucau | Blog | Old Blog | Github | LinkedIn
Post by COURTAULT Francois
Hello Romain,
Thanks for your answer but my question is more on how to achieve that without using some Spring/ActiveMQ libraries which customizes TomEE distro => requires to copy some jars in TomEE/lib folder.
Another solution could be to have those jars inside our application (in WEB-INF/lib): do you know if it will work ? (avoid TomEE customization except for activemq.xml and tomee.xml)
Best Regards.
-----Original Message-----
Sent: lundi 23 octobre 2017 09:33
Subject: Re: How to setup ActiveMQ in TomEE to not use persistence for JMS ?
Hi Francois,
broker:(tcp://localhost:61616)?useJmx=false&persistent=false
to disable the persistence and jmx (for instance)
Romain Manni-Bucau
@rmannibucau | Blog | Old Blog | Github | LinkedIn
Post by COURTAULT Francois
Hello,
First, it seems that, by default, ActiveMQ in TomEE, in case we use some JMS stuff in our application, uses persistent repository, right ?
* Have an activemq.xml file with the following setting <broker persistent="false" ....
* Have a tomee.xml file which refers the activemq.xml.
The issue I have is that, for TomEE/ActiveMQ to read these files, we have to use some Spring libraries like activemq-spring.jar either in TomEE/lib (preferred way, right ?) or war WEB-INF/lib.
So, the question is: does it exist another way to disable persistence for JMS without having to use some Spring libraries ?
Best Regards.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
COURTAULT Francois
2017-10-23 08:34:25 UTC
Permalink
Hello Romain,

Get it I think :-)

In my tomee.xml file (which is empty), I have added:
<Resource id="MyJmsResourceAdapter" type="ActiveMQResourceAdapter">
BrokerXmlConfig = broker:(tcp://localhost:61616)?useJmx=false&persistent=false
ServerUrl = vm://localhost
</Resource>


But when I started TomEE, I got:
23-Oct-2017 10:25:02.708 INFO [main] org.apache.openejb.config.ConfigurationFactory.init TomEE configuration file is ' C:\Users\.....\target\apache-tomee\conf\tomee.xml'
23-Oct-2017 10:25:02.736 SEVERE [main] org.apache.openejb.OpenEJB$Instance.<init> OpenEJB has encountered a fatal error and cannot be started: Assembler failed to build the container system.
org.apache.openejb.OpenEJBException: Unable to read OpenEJB configuration file
at C:\Users\...\target\apache-tomee\conf\tomee.xml: The reference to entity "persistent" must end with the ';' delimiter.

Any idea ?

Best Regards.

-----Original Message-----
From: Romain Manni-Bucau [mailto:***@gmail.com]
Sent: lundi 23 octobre 2017 09:56
To: ***@tomee.apache.org
Cc: ***@cxf.apache.org
Subject: Re: How to setup ActiveMQ in TomEE to not use persistence for JMS ?

in WEB-INF/lib it will not work but the previous url was for tomee.xml AMQ adapter and not related to any spring config

Romain Manni-Bucau
@rmannibucau | Blog | Old Blog | Github | LinkedIn
Post by COURTAULT Francois
Hello Romain,
Thanks for your answer but my question is more on how to achieve that without using some Spring/ActiveMQ libraries which customizes TomEE distro => requires to copy some jars in TomEE/lib folder.
Another solution could be to have those jars inside our application
(in WEB-INF/lib): do you know if it will work ? (avoid TomEE
customization except for activemq.xml and tomee.xml)
Best Regards.
-----Original Message-----
Sent: lundi 23 octobre 2017 09:33
Subject: Re: How to setup ActiveMQ in TomEE to not use persistence for JMS ?
Hi Francois,
broker:(tcp://localhost:61616)?useJmx=false&persistent=false
to disable the persistence and jmx (for instance)
Romain Manni-Bucau
@rmannibucau | Blog | Old Blog | Github | LinkedIn
Post by COURTAULT Francois
Hello,
First, it seems that, by default, ActiveMQ in TomEE, in case we use some JMS stuff in our application, uses persistent repository, right ?
* Have an activemq.xml file with the following setting <broker persistent="false" ....
* Have a tomee.xml file which refers the activemq.xml.
The issue I have is that, for TomEE/ActiveMQ to read these files, we have to use some Spring libraries like activemq-spring.jar either in TomEE/lib (preferred way, right ?) or war WEB-INF/lib.
So, the question is: does it exist another way to disable persistence for JMS without having to use some Spring libraries ?
Best Regards.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages c
Romain Manni-Bucau
2017-10-23 09:32:33 UTC
Permalink
& = &amp; in xml ;)

Romain Manni-Bucau
@rmannibucau | Blog | Old Blog | Github | LinkedIn
Post by COURTAULT Francois
Hello Romain,
Get it I think :-)
<Resource id="MyJmsResourceAdapter" type="ActiveMQResourceAdapter">
BrokerXmlConfig = broker:(tcp://localhost:61616)?useJmx=false&persistent=false
ServerUrl = vm://localhost
</Resource>
23-Oct-2017 10:25:02.708 INFO [main] org.apache.openejb.config.ConfigurationFactory.init TomEE configuration file is ' C:\Users\.....\target\apache-tomee\conf\tomee.xml'
23-Oct-2017 10:25:02.736 SEVERE [main] org.apache.openejb.OpenEJB$Instance.<init> OpenEJB has encountered a fatal error and cannot be started: Assembler failed to build the container system.
org.apache.openejb.OpenEJBException: Unable to read OpenEJB configuration file
at C:\Users\...\target\apache-tomee\conf\tomee.xml: The reference to entity "persistent" must end with the ';' delimiter.
Any idea ?
Best Regards.
-----Original Message-----
Sent: lundi 23 octobre 2017 09:56
Subject: Re: How to setup ActiveMQ in TomEE to not use persistence for JMS ?
in WEB-INF/lib it will not work but the previous url was for tomee.xml AMQ adapter and not related to any spring config
Romain Manni-Bucau
@rmannibucau | Blog | Old Blog | Github | LinkedIn
Post by COURTAULT Francois
Hello Romain,
Thanks for your answer but my question is more on how to achieve that without using some Spring/ActiveMQ libraries which customizes TomEE distro => requires to copy some jars in TomEE/lib folder.
Another solution could be to have those jars inside our application
(in WEB-INF/lib): do you know if it will work ? (avoid TomEE
customization except for activemq.xml and tomee.xml)
Best Regards.
-----Original Message-----
Sent: lundi 23 octobre 2017 09:33
Subject: Re: How to setup ActiveMQ in TomEE to not use persistence for JMS ?
Hi Francois,
broker:(tcp://localhost:61616)?useJmx=false&persistent=false
to disable the persistence and jmx (for instance)
Romain Manni-Bucau
@rmannibucau | Blog | Old Blog | Github | LinkedIn
Post by COURTAULT Francois
Hello,
First, it seems that, by default, ActiveMQ in TomEE, in case we use some JMS stuff in our application, uses persistent repository, right ?
* Have an activemq.xml file with the following setting <broker persistent="false" ....
* Have a tomee.xml file which refers the activemq.xml.
The issue I have is that, for TomEE/ActiveMQ to read these files, we have to use some Spring libraries like activemq-spring.jar either in TomEE/lib (preferred way, right ?) or war WEB-INF/lib.
So, the question is: does it exist another way to disable persistence for JMS without having to use some Spring libraries ?
Best Regards.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
COURTAULT Francois
2017-10-23 10:17:16 UTC
Permalink
Hello Romain,

Sorry to haven't found this by myself :-(

In my application, I have an MDB and in the log, I am able to see:
23-Oct-2017 11:36:02.079 INFO [localhost-startStop-1] org.apache.openejb.config.InitEjbDeployments.deploy Auto-deploying ejb MyMDB: EjbDeployment(deployment-id=MyMDB)
23-Oct-2017 11:36:02.083 INFO [localhost-startStop-1] org.apache.openejb.config.ConfigurationFactory.configureService Configuring Service(id=Default MDB Container, type=Container, provider-id=Default MDB Container)
23-Oct-2017 11:36:02.083 INFO [localhost-startStop-1] org.apache.openejb.config.AutoConfig.createContainer Auto-creating a container for bean MyMDB: Container(type=MESSAGE, id=Default MDB Container)
23-Oct-2017 11:36:02.084 INFO [localhost-startStop-1] org.apache.openejb.config.ConfigurationFactory.configureService Configuring Service(id=Default JMS Resource Adapter, type=Resource, provider-id=Default JMS Resource Adapter)
23-Oct-2017 11:36:02.085 INFO [localhost-startStop-1] org.apache.openejb.config.ConfigurationFactory.configureService Configuring Service(id=Default Unmanaged JDBC Database, type=Resource, provider-id=Default Unmanaged JDBC Database)
23-Oct-2017 11:36:02.085 INFO [localhost-startStop-1] org.apache.openejb.assembler.classic.Assembler.createRecipe Creating Resource(id=Default Unmanaged JDBC Database)

But before, which I fine, I am able to see:
23-Oct-2017 11:36:01.209 INFO [main] org.apache.openejb.assembler.classic.Assembler.createRecipe Creating Resource(id=MyJmsResourceAdapter)
23-Oct-2017 11:36:01.267 INFO [main] org.apache.openejb.assembler.classic.Assembler.doCreateResource Thread pool size for 'MyJmsResourceAdapter' is (30)
....
23-Oct-2017 11:36:01.466 INFO [main] org.apache.openejb.resource.activemq.ActiveMQ5Factory.createBroker Using ActiveMQ startup timeout of 10000ms
23-Oct-2017 11:36:01.466 INFO [ActiveMQFactory start and checkpoint] org.apache.openejb.resource.activemq.ActiveMQ5Factory$1.run Starting ActiveMQ BrokerService
23-Oct-2017 11:36:01.473 INFO [ActiveMQFactory start and checkpoint] org.apache.activemq.broker.BrokerService.doStartPersistenceAdapter Using Persistence Adapter: MemoryPersistenceAdapter
...

If I have well understood, my MDB uses "Default JMS Resource Adapter" and so, is using persistence, right ?

My question is then: how to configure this MDB to use MyJmsResourceAdapter instead of "Default JMS Resource Adapter" ?

I have looked at http://activemq.apache.org/activation-spec-properties.html but it seems that connectionFactory or connectionFactoryLookup is not defined :-(
Because by this way, I will be able to reference the right adapter by adding the following section to tomee.xml:
<Resource id="MyJmsConnectionFactory" type="javax.jms.ConnectionFactory">
ResourceAdapter = MyJmsResourceAdapter
</Resource>
And in my code:
@ActivationConfigProperty(propertyName = "connectionFactory", propertyValue = "MyJmsConnectionFactory")
right ?

Best Regards.

-----Original Message-----
From: Romain Manni-Bucau [mailto:***@gmail.com]
Sent: lundi 23 octobre 2017 11:33
To: ***@tomee.apache.org
Cc: ***@cxf.apache.org
Subject: [+SPAM+]: Re: How to setup ActiveMQ in TomEE to not use persistence for JMS ?

& = &amp; in xml ;)

Romain Manni-Bucau
@rmannibucau | Blog | Old Blog | Github | LinkedIn
Post by COURTAULT Francois
Hello Romain,
Get it I think :-)
<Resource id="MyJmsResourceAdapter" type="ActiveMQResourceAdapter">
BrokerXmlConfig = broker:(tcp://localhost:61616)?useJmx=false&persistent=false
ServerUrl = vm://localhost
</Resource>
23-Oct-2017 10:25:02.708 INFO [main] org.apache.openejb.config.ConfigurationFactory.init TomEE configuration file is ' C:\Users\.....\target\apache-tomee\conf\tomee.xml'
23-Oct-2017 10:25:02.736 SEVERE [main] org.apache.openejb.OpenEJB$Instance.<init> OpenEJB has encountered a fatal error and cannot be started: Assembler failed to build the container system.
org.apache.openejb.OpenEJBException: Unable to read OpenEJB
configuration file at C:\Users\...\target\apache-tomee\conf\tomee.xml: The reference to entity "persistent" must end with the ';' delimiter.
Any idea ?
Best Regards.
-----Original Message-----
Sent: lundi 23 octobre 2017 09:56
Subject: Re: How to setup ActiveMQ in TomEE to not use persistence for JMS ?
in WEB-INF/lib it will not work but the previous url was for tomee.xml
AMQ adapter and not related to any spring config
Romain Manni-Bucau
@rmannibucau | Blog | Old Blog | Github | LinkedIn
Post by COURTAULT Francois
Hello Romain,
Thanks for your answer but my question is more on how to achieve that without using some Spring/ActiveMQ libraries which customizes TomEE distro => requires to copy some jars in TomEE/lib folder.
Another solution could be to have those jars inside our application
(in WEB-INF/lib): do you know if it will work ? (avoid TomEE
customization except for activemq.xml and tomee.xml)
Best Regards.
-----Original Message-----
Sent: lundi 23 octobre 2017 09:33
Subject: Re: How to setup ActiveMQ in TomEE to not use persistence for JMS ?
Hi Francois,
broker:(tcp://localhost:61616)?useJmx=false&persistent=false
to disable the persistence and jmx (for instance)
Romain Manni-Bucau
@rmannibucau | Blog | Old Blog | Github | LinkedIn
Post by COURTAULT Francois
Hello,
First, it seems that, by default, ActiveMQ in TomEE, in case we use some JMS stuff in our application, uses persistent repository, right ?
* Have an activemq.xml file with the following setting <broker persistent="false" ....
* Have a tomee.xml file which refers the activemq.xml.
The issue I have is that, for TomEE/ActiveMQ to read these files, we have to use some Spring libraries like activemq-spring.jar either in TomEE/lib (preferred way, right ?) or war WEB-INF/lib.
So, the question is: does it exist another way to disable persistence for JMS without having to use some Spring libraries ?
Best Regards.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for d
Romain Manni-Bucau
2017-10-23 10:55:41 UTC
Permalink
Post by COURTAULT Francois
Hello Romain,
Sorry to haven't found this by myself :-(
23-Oct-2017 11:36:02.079 INFO [localhost-startStop-1] org.apache.openejb.config.InitEjbDeployments.deploy Auto-deploying ejb MyMDB: EjbDeployment(deployment-id=MyMDB)
23-Oct-2017 11:36:02.083 INFO [localhost-startStop-1] org.apache.openejb.config.ConfigurationFactory.configureService Configuring Service(id=Default MDB Container, type=Container, provider-id=Default MDB Container)
23-Oct-2017 11:36:02.083 INFO [localhost-startStop-1] org.apache.openejb.config.AutoConfig.createContainer Auto-creating a container for bean MyMDB: Container(type=MESSAGE, id=Default MDB Container)
23-Oct-2017 11:36:02.084 INFO [localhost-startStop-1] org.apache.openejb.config.ConfigurationFactory.configureService Configuring Service(id=Default JMS Resource Adapter, type=Resource, provider-id=Default JMS Resource Adapter)
23-Oct-2017 11:36:02.085 INFO [localhost-startStop-1] org.apache.openejb.config.ConfigurationFactory.configureService Configuring Service(id=Default Unmanaged JDBC Database, type=Resource, provider-id=Default Unmanaged JDBC Database)
23-Oct-2017 11:36:02.085 INFO [localhost-startStop-1] org.apache.openejb.assembler.classic.Assembler.createRecipe Creating Resource(id=Default Unmanaged JDBC Database)
23-Oct-2017 11:36:01.209 INFO [main] org.apache.openejb.assembler.classic.Assembler.createRecipe Creating Resource(id=MyJmsResourceAdapter)
23-Oct-2017 11:36:01.267 INFO [main] org.apache.openejb.assembler.classic.Assembler.doCreateResource Thread pool size for 'MyJmsResourceAdapter' is (30)
....
23-Oct-2017 11:36:01.466 INFO [main] org.apache.openejb.resource.activemq.ActiveMQ5Factory.createBroker Using ActiveMQ startup timeout of 10000ms
23-Oct-2017 11:36:01.466 INFO [ActiveMQFactory start and checkpoint] org.apache.openejb.resource.activemq.ActiveMQ5Factory$1.run Starting ActiveMQ BrokerService
23-Oct-2017 11:36:01.473 INFO [ActiveMQFactory start and checkpoint] org.apache.activemq.broker.BrokerService.doStartPersistenceAdapter Using Persistence Adapter: MemoryPersistenceAdapter
...
If I have well understood, my MDB uses "Default JMS Resource Adapter" and so, is using persistence, right ?
Normally persistent=false in the URL shouldnt use any datasource but
since the value is set by default it can still create it, try setting
DataSource=<empty> in the properties maybe
Post by COURTAULT Francois
My question is then: how to configure this MDB to use MyJmsResourceAdapter instead of "Default JMS Resource Adapter" ?
Define the MDB container and set the resource adapter id, alternative
is to name your resource adapter with the default name.
Post by COURTAULT Francois
I have looked at http://activemq.apache.org/activation-spec-properties.html but it seems that connectionFactory or connectionFactoryLookup is not defined :-(
<Resource id="MyJmsConnectionFactory" type="javax.jms.ConnectionFactory">
ResourceAdapter = MyJmsResourceAdapter
</Resource>
@ActivationConfigProperty(propertyName = "connectionFactory", propertyValue = "MyJmsConnectionFactory")
right ?
the resource adapter supports ConnectionFactoryLookup I think
Post by COURTAULT Francois
Best Regards.
-----Original Message-----
Sent: lundi 23 octobre 2017 11:33
Subject: [+SPAM+]: Re: How to setup ActiveMQ in TomEE to not use persistence for JMS ?
& = &amp; in xml ;)
Romain Manni-Bucau
@rmannibucau | Blog | Old Blog | Github | LinkedIn
Post by COURTAULT Francois
Hello Romain,
Get it I think :-)
<Resource id="MyJmsResourceAdapter" type="ActiveMQResourceAdapter">
BrokerXmlConfig = broker:(tcp://localhost:61616)?useJmx=false&persistent=false
ServerUrl = vm://localhost
</Resource>
23-Oct-2017 10:25:02.708 INFO [main] org.apache.openejb.config.ConfigurationFactory.init TomEE configuration file is ' C:\Users\.....\target\apache-tomee\conf\tomee.xml'
23-Oct-2017 10:25:02.736 SEVERE [main] org.apache.openejb.OpenEJB$Instance.<init> OpenEJB has encountered a fatal error and cannot be started: Assembler failed to build the container system.
org.apache.openejb.OpenEJBException: Unable to read OpenEJB
configuration file at C:\Users\...\target\apache-tomee\conf\tomee.xml: The reference to entity "persistent" must end with the ';' delimiter.
Any idea ?
Best Regards.
-----Original Message-----
Sent: lundi 23 octobre 2017 09:56
Subject: Re: How to setup ActiveMQ in TomEE to not use persistence for JMS ?
in WEB-INF/lib it will not work but the previous url was for tomee.xml
AMQ adapter and not related to any spring config
Romain Manni-Bucau
@rmannibucau | Blog | Old Blog | Github | LinkedIn
Post by COURTAULT Francois
Hello Romain,
Thanks for your answer but my question is more on how to achieve that without using some Spring/ActiveMQ libraries which customizes TomEE distro => requires to copy some jars in TomEE/lib folder.
Another solution could be to have those jars inside our application
(in WEB-INF/lib): do you know if it will work ? (avoid TomEE
customization except for activemq.xml and tomee.xml)
Best Regards.
-----Original Message-----
Sent: lundi 23 octobre 2017 09:33
Subject: Re: How to setup ActiveMQ in TomEE to not use persistence for JMS ?
Hi Francois,
broker:(tcp://localhost:61616)?useJmx=false&persistent=false
to disable the persistence and jmx (for instance)
Romain Manni-Bucau
@rmannibucau | Blog | Old Blog | Github | LinkedIn
Post by COURTAULT Francois
Hello,
First, it seems that, by default, ActiveMQ in TomEE, in case we use some JMS stuff in our application, uses persistent repository, right ?
* Have an activemq.xml file with the following setting <broker persistent="false" ....
* Have a tomee.xml file which refers the activemq.xml.
The issue I have is that, for TomEE/ActiveMQ to read these files, we have to use some Spring libraries like activemq-spring.jar either in TomEE/lib (preferred way, right ?) or war WEB-INF/lib.
So, the question is: does it exist another way to disable persistence for JMS without having to use some Spring libraries ?
Best Regards.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
COURTAULT Francois
2017-10-23 12:49:01 UTC
Permalink
Hello Romain,

Finally, with the following settings in tomee.xml:
<Resource id="Default JMS Resource Adapter" type="ActiveMQResourceAdapter">
BrokerXmlConfig = broker:(tcp://localhost:61616)?useJmx=false&amp;persistent=false
ServerUrl = vm://localhost
</Resource>

In the logs I have:
23-Oct-2017 14:28:59.895 INFO [main] org.apache.openejb.config.ConfigurationFactory.configureService Configuring Service(id=Default JMS Resource Adapter, type=Resource, provider-id=Default JMS Resource Adapter)
...
23-Oct-2017 14:28:59.971 INFO [main] org.apache.openejb.assembler.classic.Assembler.createRecipe Creating Resource(id=Default JMS Resource Adapter)
23-Oct-2017 14:29:00.028 INFO [main] org.apache.openejb.assembler.classic.Assembler.doCreateResource Thread pool size for 'Default JMS Resource Adapter' is (30)

23-Oct-2017 14:29:00.039 INFO [main] org.apache.openejb.resource.activemq.ActiveMQ5Factory.createBroker ActiveMQ5Factory creating broker
...
23-Oct-2017 14:29:00.237 INFO [main] org.apache.openejb.resource.activemq.ActiveMQ5Factory.createBroker Using ActiveMQ startup timeout of 10000ms
23-Oct-2017 14:29:00.238 INFO [ActiveMQFactory start and checkpoint] org.apache.openejb.resource.activemq.ActiveMQ5Factory$1.run Starting ActiveMQ BrokerService

23-Oct-2017 14:29:00.245 INFO [ActiveMQFactory start and checkpoint] org.apache.activemq.broker.BrokerService.doStartPersistenceAdapter Using Persistence Adapter: MemoryPersistenceAdapter
23-Oct-2017 14:29:00.379 INFO [ActiveMQFactory start and checkpoint] org.apache.activemq.broker.BrokerService.doStartBroker Apache ActiveMQ 5.14.5 (localhost, ID:FPB4KC2-59528-1508761740257-0:1) is starting

....
23-Oct-2017 14:29:00.850 INFO [localhost-startStop-1] org.apache.openejb.config.InitEjbDeployments.deploy Auto-deploying ejb MyMDB: EjbDeployment(deployment-id=MyMDB)
23-Oct-2017 14:29:00.855 INFO [localhost-startStop-1] org.apache.openejb.config.ConfigurationFactory.configureService Configuring Service(id=Default MDB Container, type=Container, provider-id=Default MDB Container)
23-Oct-2017 14:29:00.856 INFO [localhost-startStop-1] org.apache.openejb.config.AutoConfig.createContainer Auto-creating a container for bean MyMDB: Container(type=MESSAGE, id=Default MDB Container)
23-Oct-2017 14:29:00.856 INFO [localhost-startStop-1] org.apache.openejb.assembler.classic.Assembler.createRecipe Creating Container(id=Default MDB Container)
23-Oct-2017 14:29:00.866 INFO [localhost-startStop-1] org.apache.openejb.config.ConfigurationFactory.configureService Configuring Service(id=jms/MessageQueue, type=Resource, provider-id=Default Queue)
23-Oct-2017 14:29:00.866 INFO [localhost-startStop-1] org.apache.openejb.config.AutoConfig.logAutoCreateResource Auto-creating a Resource with id 'jms/MessageQueue' of type 'javax.jms.Queue for 'MyMDB'.
23-Oct-2017 14:29:00.866 INFO [localhost-startStop-1] org.apache.openejb.assembler.classic.Assembler.createRecipe Creating Resource(id=jms/MessageQueue)

Thanks a lot Romain for your help :-)

Best Regards.
-----Original Message-----
From: Romain Manni-Bucau [mailto:***@gmail.com]
Sent: lundi 23 octobre 2017 12:56
To: ***@tomee.apache.org
Cc: ***@cxf.apache.org
Subject: [+SPAM+]: Re: [+SPAM+]: Re: How to setup ActiveMQ in TomEE to not use persistence for JMS ?
Post by COURTAULT Francois
Hello Romain,
Sorry to haven't found this by myself :-(
23-Oct-2017 11:36:02.079 INFO [localhost-startStop-1]
org.apache.openejb.config.InitEjbDeployments.deploy Auto-deploying ejb
MyMDB: EjbDeployment(deployment-id=MyMDB)
23-Oct-2017 11:36:02.083 INFO [localhost-startStop-1]
org.apache.openejb.config.ConfigurationFactory.configureService
Configuring Service(id=Default MDB Container, type=Container,
provider-id=Default MDB Container)
23-Oct-2017 11:36:02.083 INFO [localhost-startStop-1]
org.apache.openejb.config.AutoConfig.createContainer Auto-creating a
container for bean MyMDB: Container(type=MESSAGE, id=Default MDB
Container)
23-Oct-2017 11:36:02.084 INFO [localhost-startStop-1]
org.apache.openejb.config.ConfigurationFactory.configureService
Configuring Service(id=Default JMS Resource Adapter, type=Resource,
provider-id=Default JMS Resource Adapter)
23-Oct-2017 11:36:02.085 INFO [localhost-startStop-1]
org.apache.openejb.config.ConfigurationFactory.configureService
Configuring Service(id=Default Unmanaged JDBC Database, type=Resource,
provider-id=Default Unmanaged JDBC Database)
23-Oct-2017 11:36:02.085 INFO [localhost-startStop-1]
org.apache.openejb.assembler.classic.Assembler.createRecipe Creating
Resource(id=Default Unmanaged JDBC Database)
23-Oct-2017 11:36:01.209 INFO [main]
org.apache.openejb.assembler.classic.Assembler.createRecipe Creating
Resource(id=MyJmsResourceAdapter)
23-Oct-2017 11:36:01.267 INFO [main]
org.apache.openejb.assembler.classic.Assembler.doCreateResource Thread pool size for 'MyJmsResourceAdapter' is (30) ....
23-Oct-2017 11:36:01.466 INFO [main]
org.apache.openejb.resource.activemq.ActiveMQ5Factory.createBroker
Using ActiveMQ startup timeout of 10000ms
23-Oct-2017 11:36:01.466 INFO [ActiveMQFactory start and checkpoint]
org.apache.openejb.resource.activemq.ActiveMQ5Factory$1.run Starting
ActiveMQ BrokerService
23-Oct-2017 11:36:01.473 INFO [ActiveMQFactory start and checkpoint]
org.apache.activemq.broker.BrokerService.doStartPersistenceAdapter Using Persistence Adapter: MemoryPersistenceAdapter ...
If I have well understood, my MDB uses "Default JMS Resource Adapter" and so, is using persistence, right ?
Normally persistent=false in the URL shouldnt use any datasource but since the value is set by default it can still create it, try setting DataSource=<empty> in the properties maybe
Post by COURTAULT Francois
My question is then: how to configure this MDB to use MyJmsResourceAdapter instead of "Default JMS Resource Adapter" ?
Define the MDB container and set the resource adapter id, alternative is to name your resource adapter with the default name.
Post by COURTAULT Francois
I have looked at
<Resource id="MyJmsConnectionFactory" type="javax.jms.ConnectionFactory">
ResourceAdapter = MyJmsResourceAdapter </Resource> And in my
@ActivationConfigProperty(propertyName = "connectionFactory",
propertyValue = "MyJmsConnectionFactory") right ?
the resource adapter supports ConnectionFactoryLookup I think
Post by COURTAULT Francois
Best Regards.
-----Original Message-----
Sent: lundi 23 octobre 2017 11:33
Subject: [+SPAM+]: Re: How to setup ActiveMQ in TomEE to not use persistence for JMS ?
& = &amp; in xml ;)
Romain Manni-Bucau
@rmannibucau | Blog | Old Blog | Github | LinkedIn
Post by COURTAULT Francois
Hello Romain,
Get it I think :-)
<Resource id="MyJmsResourceAdapter" type="ActiveMQResourceAdapter">
BrokerXmlConfig = broker:(tcp://localhost:61616)?useJmx=false&persistent=false
ServerUrl = vm://localhost
</Resource>
23-Oct-2017 10:25:02.708 INFO [main] org.apache.openejb.config.ConfigurationFactory.init TomEE configuration file is ' C:\Users\.....\target\apache-tomee\conf\tomee.xml'
23-Oct-2017 10:25:02.736 SEVERE [main] org.apache.openejb.OpenEJB$Instance.<init> OpenEJB has encountered a fatal error and cannot be started: Assembler failed to build the container system.
org.apache.openejb.OpenEJBException: Unable to read OpenEJB
configuration file at C:\Users\...\target\apache-tomee\conf\tomee.xml: The reference to entity "persistent" must end with the ';' delimiter.
Any idea ?
Best Regards.
-----Original Message-----
Sent: lundi 23 octobre 2017 09:56
Subject: Re: How to setup ActiveMQ in TomEE to not use persistence for JMS ?
in WEB-INF/lib it will not work but the previous url was for
tomee.xml AMQ adapter and not related to any spring config
Romain Manni-Bucau
@rmannibucau | Blog | Old Blog | Github | LinkedIn
Post by COURTAULT Francois
Hello Romain,
Thanks for your answer but my question is more on how to achieve that without using some Spring/ActiveMQ libraries which customizes TomEE distro => requires to copy some jars in TomEE/lib folder.
Another solution could be to have those jars inside our application
(in WEB-INF/lib): do you know if it will work ? (avoid TomEE
customization except for activemq.xml and tomee.xml)
Best Regards.
-----Original Message-----
Sent: lundi 23 octobre 2017 09:33
Subject: Re: How to setup ActiveMQ in TomEE to not use persistence for JMS ?
Hi Francois,
broker:(tcp://localhost:61616)?useJmx=false&persistent=false
to disable the persistence and jmx (for instance)
Romain Manni-Bucau
@rmannibucau | Blog | Old Blog | Github | LinkedIn
Post by COURTAULT Francois
Hello,
First, it seems that, by default, ActiveMQ in TomEE, in case we use some JMS stuff in our application, uses persistent repository, right ?
* Have an activemq.xml file with the following setting <broker persistent="false" ....
* Have a tomee.xml file which refers the activemq.xml.
The issue I have is that, for TomEE/ActiveMQ to read these files, we have to use some Spring libraries like activemq-spring.jar either in TomEE/lib (preferred way, right ?) or war WEB-INF/lib.
So, the question is: does it exist another way to disable persistence for JMS without having to use some Spring libraries ?
Best Regards.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for d
COURTAULT Francois
2017-10-24 17:17:31 UTC
Permalink
Hello Romain,

Sorry to come back to you ...
Just want to have some confirmation.

Previously, we have in our activemq.xml file, this stuff:
<systemUsage>
<systemUsage sendFailIfNoSpace="true">
<memoryUsage>
<memoryUsage limit="128 mb"/>
</memoryUsage>
</systemUsage>
</systemUsage>

I have looked at http://activemq.apache.org/broker-uri.html and I can't find something similar.

Does it means that, for advanced configuration like above, we have to have an activemq.xml which implies to copy some Spring libraries in TomEE/lib folder ?
Or is it possible to set this kind of option in tomee.xml directly ?

Best Regards.

-----Original Message-----
From: COURTAULT Francois [mailto:***@gemalto.com]
Sent: lundi 23 octobre 2017 14:49
To: ***@tomee.apache.org
Cc: ***@cxf.apache.org
Subject: [++SPAM++]: RE: [+SPAM+]: Re: [+SPAM+]: Re: How to setup ActiveMQ in TomEE to not use persistence for JMS ?

Hello Romain,

Finally, with the following settings in tomee.xml:
<Resource id="Default JMS Resource Adapter" type="ActiveMQResourceAdapter">
BrokerXmlConfig = broker:(tcp://localhost:61616)?useJmx=false&amp;persistent=false
ServerUrl = vm://localhost
</Resource>

In the logs I have:
23-Oct-2017 14:28:59.895 INFO [main] org.apache.openejb.config.ConfigurationFactory.configureService Configuring Service(id=Default JMS Resource Adapter, type=Resource, provider-id=Default JMS Resource Adapter) ...
23-Oct-2017 14:28:59.971 INFO [main] org.apache.openejb.assembler.classic.Assembler.createRecipe Creating Resource(id=Default JMS Resource Adapter)
23-Oct-2017 14:29:00.028 INFO [main] org.apache.openejb.assembler.classic.Assembler.doCreateResource Thread pool size for 'Default JMS Resource Adapter' is (30)

23-Oct-2017 14:29:00.039 INFO [main] org.apache.openejb.resource.activemq.ActiveMQ5Factory.createBroker ActiveMQ5Factory creating broker ...
23-Oct-2017 14:29:00.237 INFO [main] org.apache.openejb.resource.activemq.ActiveMQ5Factory.createBroker Using ActiveMQ startup timeout of 10000ms
23-Oct-2017 14:29:00.238 INFO [ActiveMQFactory start and checkpoint] org.apache.openejb.resource.activemq.ActiveMQ5Factory$1.run Starting ActiveMQ BrokerService

23-Oct-2017 14:29:00.245 INFO [ActiveMQFactory start and checkpoint] org.apache.activemq.broker.BrokerService.doStartPersistenceAdapter Using Persistence Adapter: MemoryPersistenceAdapter
23-Oct-2017 14:29:00.379 INFO [ActiveMQFactory start and checkpoint] org.apache.activemq.broker.BrokerService.doStartBroker Apache ActiveMQ 5.14.5 (localhost, ID:FPB4KC2-59528-1508761740257-0:1) is starting

....
23-Oct-2017 14:29:00.850 INFO [localhost-startStop-1] org.apache.openejb.config.InitEjbDeployments.deploy Auto-deploying ejb MyMDB: EjbDeployment(deployment-id=MyMDB)
23-Oct-2017 14:29:00.855 INFO [localhost-startStop-1] org.apache.openejb.config.ConfigurationFactory.configureService Configuring Service(id=Default MDB Container, type=Container, provider-id=Default MDB Container)
23-Oct-2017 14:29:00.856 INFO [localhost-startStop-1] org.apache.openejb.config.AutoConfig.createContainer Auto-creating a container for bean MyMDB: Container(type=MESSAGE, id=Default MDB Container)
23-Oct-2017 14:29:00.856 INFO [localhost-startStop-1] org.apache.openejb.assembler.classic.Assembler.createRecipe Creating Container(id=Default MDB Container)
23-Oct-2017 14:29:00.866 INFO [localhost-startStop-1] org.apache.openejb.config.ConfigurationFactory.configureService Configuring Service(id=jms/MessageQueue, type=Resource, provider-id=Default Queue)
23-Oct-2017 14:29:00.866 INFO [localhost-startStop-1] org.apache.openejb.config.AutoConfig.logAutoCreateResource Auto-creating a Resource with id 'jms/MessageQueue' of type 'javax.jms.Queue for 'MyMDB'.
23-Oct-2017 14:29:00.866 INFO [localhost-startStop-1] org.apache.openejb.assembler.classic.Assembler.createRecipe Creating Resource(id=jms/MessageQueue)

Thanks a lot Romain for your help :-)

Best Regards.
-----Original Message-----
From: Romain Manni-Bucau [mailto:***@gmail.com]
Sent: lundi 23 octobre 2017 12:56
To: ***@tomee.apache.org
Cc: ***@cxf.apache.org
Subject: [+SPAM+]: Re: [+SPAM+]: Re: How to setup ActiveMQ in TomEE to not use persistence for JMS ?
Post by COURTAULT Francois
Hello Romain,
Sorry to haven't found this by myself :-(
23-Oct-2017 11:36:02.079 INFO [localhost-startStop-1]
org.apache.openejb.config.InitEjbDeployments.deploy Auto-deploying ejb
MyMDB: EjbDeployment(deployment-id=MyMDB)
23-Oct-2017 11:36:02.083 INFO [localhost-startStop-1]
org.apache.openejb.config.ConfigurationFactory.configureService
Configuring Service(id=Default MDB Container, type=Container,
provider-id=Default MDB Container)
23-Oct-2017 11:36:02.083 INFO [localhost-startStop-1]
org.apache.openejb.config.AutoConfig.createContainer Auto-creating a
container for bean MyMDB: Container(type=MESSAGE, id=Default MDB
Container)
23-Oct-2017 11:36:02.084 INFO [localhost-startStop-1]
org.apache.openejb.config.ConfigurationFactory.configureService
Configuring Service(id=Default JMS Resource Adapter, type=Resource,
provider-id=Default JMS Resource Adapter)
23-Oct-2017 11:36:02.085 INFO [localhost-startStop-1]
org.apache.openejb.config.ConfigurationFactory.configureService
Configuring Service(id=Default Unmanaged JDBC Database, type=Resource,
provider-id=Default Unmanaged JDBC Database)
23-Oct-2017 11:36:02.085 INFO [localhost-startStop-1]
org.apache.openejb.assembler.classic.Assembler.createRecipe Creating
Resource(id=Default Unmanaged JDBC Database)
23-Oct-2017 11:36:01.209 INFO [main]
org.apache.openejb.assembler.classic.Assembler.createRecipe Creating
Resource(id=MyJmsResourceAdapter)
23-Oct-2017 11:36:01.267 INFO [main]
org.apache.openejb.assembler.classic.Assembler.doCreateResource Thread pool size for 'MyJmsResourceAdapter' is (30) ....
23-Oct-2017 11:36:01.466 INFO [main]
org.apache.openejb.resource.activemq.ActiveMQ5Factory.createBroker
Using ActiveMQ startup timeout of 10000ms
23-Oct-2017 11:36:01.466 INFO [ActiveMQFactory start and checkpoint]
org.apache.openejb.resource.activemq.ActiveMQ5Factory$1.run Starting
ActiveMQ BrokerService
23-Oct-2017 11:36:01.473 INFO [ActiveMQFactory start and checkpoint]
org.apache.activemq.broker.BrokerService.doStartPersistenceAdapter Using Persistence Adapter: MemoryPersistenceAdapter ...
If I have well understood, my MDB uses "Default JMS Resource Adapter" and so, is using persistence, right ?
Normally persistent=false in the URL shouldnt use any datasource but since the value is set by default it can still create it, try setting DataSource=<empty> in the properties maybe
Post by COURTAULT Francois
My question is then: how to configure this MDB to use MyJmsResourceAdapter instead of "Default JMS Resource Adapter" ?
Define the MDB container and set the resource adapter id, alternative is to name your resource adapter with the default name.
Post by COURTAULT Francois
I have looked at
<Resource id="MyJmsConnectionFactory" type="javax.jms.ConnectionFactory">
ResourceAdapter = MyJmsResourceAdapter </Resource> And in my
@ActivationConfigProperty(propertyName = "connectionFactory",
propertyValue = "MyJmsConnectionFactory") right ?
the resource adapter supports ConnectionFactoryLookup I think
Post by COURTAULT Francois
Best Regards.
-----Original Message-----
Sent: lundi 23 octobre 2017 11:33
Subject: [+SPAM+]: Re: How to setup ActiveMQ in TomEE to not use persistence for JMS ?
& = &amp; in xml ;)
Romain Manni-Bucau
@rmannibucau | Blog | Old Blog | Github | LinkedIn
Post by COURTAULT Francois
Hello Romain,
Get it I think :-)
<Resource id="MyJmsResourceAdapter" type="ActiveMQResourceAdapter">
BrokerXmlConfig = broker:(tcp://localhost:61616)?useJmx=false&persistent=false
ServerUrl = vm://localhost
</Resource>
23-Oct-2017 10:25:02.708 INFO [main] org.apache.openejb.config.ConfigurationFactory.init TomEE configuration file is ' C:\Users\.....\target\apache-tomee\conf\tomee.xml'
23-Oct-2017 10:25:02.736 SEVERE [main] org.apache.openejb.OpenEJB$Instance.<init> OpenEJB has encountered a fatal error and cannot be started: Assembler failed to build the container system.
org.apache.openejb.OpenEJBException: Unable to read OpenEJB
configuration file at C:\Users\...\target\apache-tomee\conf\tomee.xml: The reference to entity "persistent" must end with the ';' delimiter.
Any idea ?
Best Regards.
-----Original Message-----
Sent: lundi 23 octobre 2017 09:56
Subject: Re: How to setup ActiveMQ in TomEE to not use persistence for JMS ?
in WEB-INF/lib it will not work but the previous url was for
tomee.xml AMQ adapter and not related to any spring config
Romain Manni-Bucau
@rmannibucau | Blog | Old Blog | Github | LinkedIn
Post by COURTAULT Francois
Hello Romain,
Thanks for your answer but my question is more on how to achieve that without using some Spring/ActiveMQ libraries which customizes TomEE distro => requires to copy some jars in TomEE/lib folder.
Another solution could be to have those jars inside our application
(in WEB-INF/lib): do you know if it will work ? (avoid TomEE
customization except for activemq.xml and tomee.xml)
Best Regards.
-----Original Message-----
Sent: lundi 23 octobre 2017 09:33
Subject: Re: How to setup ActiveMQ in TomEE to not use persistence for JMS ?
Hi Francois,
broker:(tcp://localhost:61616)?useJmx=false&persistent=false
to disable the persistence and jmx (for instance)
Romain Manni-Bucau
@rmannibucau | Blog | Old Blog | Github | LinkedIn
Post by COURTAULT Francois
Hello,
First, it seems that, by default, ActiveMQ in TomEE, in case we use some JMS stuff in our application, uses persistent repository, right ?
* Have an activemq.xml file with the following setting <broker persistent="false" ....
* Have a tomee.xml file which refers the activemq.xml.
The issue I have is that, for TomEE/ActiveMQ to read these files, we have to use some Spring libraries like activemq-spring.jar either in TomEE/lib (preferred way, right ?) or war WEB-INF/lib.
So, the question is: does it exist another way to disable persistence for JMS without having to use some Spring libraries ?
Best Regards.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damage
Romain Manni-Bucau
2017-10-24 19:15:40 UTC
Permalink
Think we dont support it yet but it can be added (see
https://github.com/apache/tomee/blob/master/container/openejb-core/src/main/java/org/apache/openejb/resource/activemq/ActiveMQ5Factory.java#L83
for persistence adapter support for instance)

Romain Manni-Bucau
@rmannibucau | Blog | Old Blog | Github | LinkedIn
Post by COURTAULT Francois
Hello Romain,
Sorry to come back to you ...
Just want to have some confirmation.
<systemUsage>
<systemUsage sendFailIfNoSpace="true">
<memoryUsage>
<memoryUsage limit="128 mb"/>
</memoryUsage>
</systemUsage>
</systemUsage>
I have looked at http://activemq.apache.org/broker-uri.html and I can't find something similar.
Does it means that, for advanced configuration like above, we have to have an activemq.xml which implies to copy some Spring libraries in TomEE/lib folder ?
Or is it possible to set this kind of option in tomee.xml directly ?
Best Regards.
-----Original Message-----
Sent: lundi 23 octobre 2017 14:49
Subject: [++SPAM++]: RE: [+SPAM+]: Re: [+SPAM+]: Re: How to setup ActiveMQ in TomEE to not use persistence for JMS ?
Hello Romain,
<Resource id="Default JMS Resource Adapter" type="ActiveMQResourceAdapter">
BrokerXmlConfig = broker:(tcp://localhost:61616)?useJmx=false&amp;persistent=false
ServerUrl = vm://localhost
</Resource>
23-Oct-2017 14:28:59.895 INFO [main] org.apache.openejb.config.ConfigurationFactory.configureService Configuring Service(id=Default JMS Resource Adapter, type=Resource, provider-id=Default JMS Resource Adapter) ...
23-Oct-2017 14:28:59.971 INFO [main] org.apache.openejb.assembler.classic.Assembler.createRecipe Creating Resource(id=Default JMS Resource Adapter)
23-Oct-2017 14:29:00.028 INFO [main] org.apache.openejb.assembler.classic.Assembler.doCreateResource Thread pool size for 'Default JMS Resource Adapter' is (30)
23-Oct-2017 14:29:00.039 INFO [main] org.apache.openejb.resource.activemq.ActiveMQ5Factory.createBroker ActiveMQ5Factory creating broker ...
23-Oct-2017 14:29:00.237 INFO [main] org.apache.openejb.resource.activemq.ActiveMQ5Factory.createBroker Using ActiveMQ startup timeout of 10000ms
23-Oct-2017 14:29:00.238 INFO [ActiveMQFactory start and checkpoint] org.apache.openejb.resource.activemq.ActiveMQ5Factory$1.run Starting ActiveMQ BrokerService
23-Oct-2017 14:29:00.245 INFO [ActiveMQFactory start and checkpoint] org.apache.activemq.broker.BrokerService.doStartPersistenceAdapter Using Persistence Adapter: MemoryPersistenceAdapter
23-Oct-2017 14:29:00.379 INFO [ActiveMQFactory start and checkpoint] org.apache.activemq.broker.BrokerService.doStartBroker Apache ActiveMQ 5.14.5 (localhost, ID:FPB4KC2-59528-1508761740257-0:1) is starting
....
23-Oct-2017 14:29:00.850 INFO [localhost-startStop-1] org.apache.openejb.config.InitEjbDeployments.deploy Auto-deploying ejb MyMDB: EjbDeployment(deployment-id=MyMDB)
23-Oct-2017 14:29:00.855 INFO [localhost-startStop-1] org.apache.openejb.config.ConfigurationFactory.configureService Configuring Service(id=Default MDB Container, type=Container, provider-id=Default MDB Container)
23-Oct-2017 14:29:00.856 INFO [localhost-startStop-1] org.apache.openejb.config.AutoConfig.createContainer Auto-creating a container for bean MyMDB: Container(type=MESSAGE, id=Default MDB Container)
23-Oct-2017 14:29:00.856 INFO [localhost-startStop-1] org.apache.openejb.assembler.classic.Assembler.createRecipe Creating Container(id=Default MDB Container)
23-Oct-2017 14:29:00.866 INFO [localhost-startStop-1] org.apache.openejb.config.ConfigurationFactory.configureService Configuring Service(id=jms/MessageQueue, type=Resource, provider-id=Default Queue)
23-Oct-2017 14:29:00.866 INFO [localhost-startStop-1] org.apache.openejb.config.AutoConfig.logAutoCreateResource Auto-creating a Resource with id 'jms/MessageQueue' of type 'javax.jms.Queue for 'MyMDB'.
23-Oct-2017 14:29:00.866 INFO [localhost-startStop-1] org.apache.openejb.assembler.classic.Assembler.createRecipe Creating Resource(id=jms/MessageQueue)
Thanks a lot Romain for your help :-)
Best Regards.
-----Original Message-----
Sent: lundi 23 octobre 2017 12:56
Subject: [+SPAM+]: Re: [+SPAM+]: Re: How to setup ActiveMQ in TomEE to not use persistence for JMS ?
Post by COURTAULT Francois
Hello Romain,
Sorry to haven't found this by myself :-(
23-Oct-2017 11:36:02.079 INFO [localhost-startStop-1]
org.apache.openejb.config.InitEjbDeployments.deploy Auto-deploying ejb
MyMDB: EjbDeployment(deployment-id=MyMDB)
23-Oct-2017 11:36:02.083 INFO [localhost-startStop-1]
org.apache.openejb.config.ConfigurationFactory.configureService
Configuring Service(id=Default MDB Container, type=Container,
provider-id=Default MDB Container)
23-Oct-2017 11:36:02.083 INFO [localhost-startStop-1]
org.apache.openejb.config.AutoConfig.createContainer Auto-creating a
container for bean MyMDB: Container(type=MESSAGE, id=Default MDB
Container)
23-Oct-2017 11:36:02.084 INFO [localhost-startStop-1]
org.apache.openejb.config.ConfigurationFactory.configureService
Configuring Service(id=Default JMS Resource Adapter, type=Resource,
provider-id=Default JMS Resource Adapter)
23-Oct-2017 11:36:02.085 INFO [localhost-startStop-1]
org.apache.openejb.config.ConfigurationFactory.configureService
Configuring Service(id=Default Unmanaged JDBC Database, type=Resource,
provider-id=Default Unmanaged JDBC Database)
23-Oct-2017 11:36:02.085 INFO [localhost-startStop-1]
org.apache.openejb.assembler.classic.Assembler.createRecipe Creating
Resource(id=Default Unmanaged JDBC Database)
23-Oct-2017 11:36:01.209 INFO [main]
org.apache.openejb.assembler.classic.Assembler.createRecipe Creating
Resource(id=MyJmsResourceAdapter)
23-Oct-2017 11:36:01.267 INFO [main]
org.apache.openejb.assembler.classic.Assembler.doCreateResource Thread pool size for 'MyJmsResourceAdapter' is (30) ....
23-Oct-2017 11:36:01.466 INFO [main]
org.apache.openejb.resource.activemq.ActiveMQ5Factory.createBroker
Using ActiveMQ startup timeout of 10000ms
23-Oct-2017 11:36:01.466 INFO [ActiveMQFactory start and checkpoint]
org.apache.openejb.resource.activemq.ActiveMQ5Factory$1.run Starting
ActiveMQ BrokerService
23-Oct-2017 11:36:01.473 INFO [ActiveMQFactory start and checkpoint]
org.apache.activemq.broker.BrokerService.doStartPersistenceAdapter Using Persistence Adapter: MemoryPersistenceAdapter ...
If I have well understood, my MDB uses "Default JMS Resource Adapter" and so, is using persistence, right ?
Normally persistent=false in the URL shouldnt use any datasource but since the value is set by default it can still create it, try setting DataSource=<empty> in the properties maybe
Post by COURTAULT Francois
My question is then: how to configure this MDB to use MyJmsResourceAdapter instead of "Default JMS Resource Adapter" ?
Define the MDB container and set the resource adapter id, alternative is to name your resource adapter with the default name.
Post by COURTAULT Francois
I have looked at
<Resource id="MyJmsConnectionFactory" type="javax.jms.ConnectionFactory">
ResourceAdapter = MyJmsResourceAdapter </Resource> And in my
@ActivationConfigProperty(propertyName = "connectionFactory",
propertyValue = "MyJmsConnectionFactory") right ?
the resource adapter supports ConnectionFactoryLookup I think
Post by COURTAULT Francois
Best Regards.
-----Original Message-----
Sent: lundi 23 octobre 2017 11:33
Subject: [+SPAM+]: Re: How to setup ActiveMQ in TomEE to not use persistence for JMS ?
& = &amp; in xml ;)
Romain Manni-Bucau
@rmannibucau | Blog | Old Blog | Github | LinkedIn
Post by COURTAULT Francois
Hello Romain,
Get it I think :-)
<Resource id="MyJmsResourceAdapter" type="ActiveMQResourceAdapter">
BrokerXmlConfig = broker:(tcp://localhost:61616)?useJmx=false&persistent=false
ServerUrl = vm://localhost
</Resource>
23-Oct-2017 10:25:02.708 INFO [main] org.apache.openejb.config.ConfigurationFactory.init TomEE configuration file is ' C:\Users\.....\target\apache-tomee\conf\tomee.xml'
23-Oct-2017 10:25:02.736 SEVERE [main] org.apache.openejb.OpenEJB$Instance.<init> OpenEJB has encountered a fatal error and cannot be started: Assembler failed to build the container system.
org.apache.openejb.OpenEJBException: Unable to read OpenEJB
configuration file at C:\Users\...\target\apache-tomee\conf\tomee.xml: The reference to entity "persistent" must end with the ';' delimiter.
Any idea ?
Best Regards.
-----Original Message-----
Sent: lundi 23 octobre 2017 09:56
Subject: Re: How to setup ActiveMQ in TomEE to not use persistence for JMS ?
in WEB-INF/lib it will not work but the previous url was for
tomee.xml AMQ adapter and not related to any spring config
Romain Manni-Bucau
@rmannibucau | Blog | Old Blog | Github | LinkedIn
Post by COURTAULT Francois
Hello Romain,
Thanks for your answer but my question is more on how to achieve that without using some Spring/ActiveMQ libraries which customizes TomEE distro => requires to copy some jars in TomEE/lib folder.
Another solution could be to have those jars inside our application
(in WEB-INF/lib): do you know if it will work ? (avoid TomEE
customization except for activemq.xml and tomee.xml)
Best Regards.
-----Original Message-----
Sent: lundi 23 octobre 2017 09:33
Subject: Re: How to setup ActiveMQ in TomEE to not use persistence for JMS ?
Hi Francois,
broker:(tcp://localhost:61616)?useJmx=false&persistent=false
to disable the persistence and jmx (for instance)
Romain Manni-Bucau
@rmannibucau | Blog | Old Blog | Github | LinkedIn
Post by COURTAULT Francois
Hello,
First, it seems that, by default, ActiveMQ in TomEE, in case we use some JMS stuff in our application, uses persistent repository, right ?
* Have an activemq.xml file with the following setting <broker persistent="false" ....
* Have a tomee.xml file which refers the activemq.xml.
The issue I have is that, for TomEE/ActiveMQ to read these files, we have to use some Spring libraries like activemq-spring.jar either in TomEE/lib (preferred way, right ?) or war WEB-INF/lib.
So, the question is: does it exist another way to disable persistence for JMS without having to use some Spring libraries ?
Best Regards.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
Andy Gumbrecht
2017-10-31 10:54:40 UTC
Permalink
I think this is just a case of encoding the ampersand in the broker URL:

& = &amp;

Andy.
Post by COURTAULT Francois
Hello Romain,
Get it I think :-)
<Resource id="MyJmsResourceAdapter" type="ActiveMQResourceAdapter">
BrokerXmlConfig = broker:(tcp://localhost:61616)?useJmx=false&persistent=false
ServerUrl = vm://localhost
</Resource>
23-Oct-2017 10:25:02.708 INFO [main] org.apache.openejb.config.ConfigurationFactory.init TomEE configuration file is ' C:\Users\.....\target\apache-tomee\conf\tomee.xml'
23-Oct-2017 10:25:02.736 SEVERE [main] org.apache.openejb.OpenEJB$Instance.<init> OpenEJB has encountered a fatal error and cannot be started: Assembler failed to build the container system.
org.apache.openejb.OpenEJBException: Unable to read OpenEJB configuration file
at C:\Users\...\target\apache-tomee\conf\tomee.xml: The reference to entity "persistent" must end with the ';' delimiter.
Any idea ?
Best Regards.
-----Original Message-----
Sent: lundi 23 octobre 2017 09:56
Subject: Re: How to setup ActiveMQ in TomEE to not use persistence for JMS ?
in WEB-INF/lib it will not work but the previous url was for tomee.xml AMQ adapter and not related to any spring config
Romain Manni-Bucau
@rmannibucau | Blog | Old Blog | Github | LinkedIn
Post by COURTAULT Francois
Hello Romain,
Thanks for your answer but my question is more on how to achieve that without using some Spring/ActiveMQ libraries which customizes TomEE distro => requires to copy some jars in TomEE/lib folder.
Another solution could be to have those jars inside our application
(in WEB-INF/lib): do you know if it will work ? (avoid TomEE
customization except for activemq.xml and tomee.xml)
Best Regards.
-----Original Message-----
Sent: lundi 23 octobre 2017 09:33
Subject: Re: How to setup ActiveMQ in TomEE to not use persistence for JMS ?
Hi Francois,
broker:(tcp://localhost:61616)?useJmx=false&persistent=false
to disable the persistence and jmx (for instance)
Romain Manni-Bucau
@rmannibucau | Blog | Old Blog | Github | LinkedIn
Post by COURTAULT Francois
Hello,
First, it seems that, by default, ActiveMQ in TomEE, in case we use some JMS stuff in our application, uses persistent repository, right ?
* Have an activemq.xml file with the following setting <broker persistent="false" ....
* Have a tomee.xml file which refers the activemq.xml.
The issue I have is that, for TomEE/ActiveMQ to read these files, we have to use some Spring libraries like activemq-spring.jar either in TomEE/lib (preferred way, right ?) or war WEB-INF/lib.
So, the question is: does it exist another way to disable persistence for JMS without having to use some Spring libraries ?
Best Regards.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
Andy Gumbrecht
2017-11-01 09:44:16 UTC
Permalink
Hmm, and in case that gets escaped in the list ;-)

& = <code>&amp;</code> (& a m p ;)

Andy.
& = &
Andy.
Post by COURTAULT Francois
Hello Romain,
Get it I think :-)
<Resource id="MyJmsResourceAdapter" type="ActiveMQResourceAdapter">
BrokerXmlConfig = broker:(tcp://localhost:61616)?useJmx=false&persistent=false
ServerUrl = vm://localhost
</Resource>
23-Oct-2017 10:25:02.708 INFO [main] org.apache.openejb.config.ConfigurationFactory.init TomEE configuration file is ' C:\Users\.....\target\apache-tomee\conf\tomee.xml'
23-Oct-2017 10:25:02.736 SEVERE [main] org.apache.openejb.OpenEJB$Instance.<init> OpenEJB has encountered a fatal error and cannot be started: Assembler failed to build the container system.
org.apache.openejb.OpenEJBException: Unable to read OpenEJB configuration file
at C:\Users\...\target\apache-tomee\conf\tomee.xml: The reference to entity "persistent" must end with the ';' delimiter.
Any idea ?
Best Regards.
-----Original Message-----
Sent: lundi 23 octobre 2017 09:56
Subject: Re: How to setup ActiveMQ in TomEE to not use persistence for JMS ?
in WEB-INF/lib it will not work but the previous url was for tomee.xml AMQ adapter and not related to any spring config
Romain Manni-Bucau
@rmannibucau | Blog | Old Blog | Github | LinkedIn
Post by COURTAULT Francois
Hello Romain,
Thanks for your answer but my question is more on how to achieve that without using some Spring/ActiveMQ libraries which customizes TomEE distro => requires to copy some jars in TomEE/lib folder.
Another solution could be to have those jars inside our application
(in WEB-INF/lib): do you know if it will work ? (avoid TomEE
customization except for activemq.xml and tomee.xml)
Best Regards.
-----Original Message-----
Sent: lundi 23 octobre 2017 09:33
Subject: Re: How to setup ActiveMQ in TomEE to not use persistence for JMS ?
Hi Francois,
broker:(tcp://localhost:61616)?useJmx=false&persistent=false
to disable the persistence and jmx (for instance)
Romain Manni-Bucau
@rmannibucau | Blog | Old Blog | Github | LinkedIn
Post by COURTAULT Francois
Hello,
First, it seems that, by default, ActiveMQ in TomEE, in case we use some JMS stuff in our application, uses persistent repository, right ?
* Have an activemq.xml file with the following setting <broker persistent="false" ....
* Have a tomee.xml file which refers the activemq.xml.
The issue I have is that, for TomEE/ActiveMQ to read these files, we have to use some Spring libraries like activemq-spring.jar either in TomEE/lib (preferred way, right ?) or war WEB-INF/lib.
So, the question is: does it exist another way to disable persistence for JMS without having to use some Spring libraries ?
Best Regards.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.
Loading...