[1]
<Resource id="Default JMS Resource Adapter"
type="ActiveMQResourceAdapter">
BrokerXmlConfig =
broker:(tcp://localhost:61616)?persistent=true&AllPrefetchValues=0
ServerUrl = tcp://localhost:61616
DataSource = MyJmsDataSource
</Resource>
gives
Caused by: java.lang.IllegalArgumentException: There are 1 Broker
options that couldn't be set on the BrokerService. Check the options
are spelled correctly. Unknown parameters=[{AllPrefetchValues=0}].
This BrokerService cannot be started.
[2]
<Resource id="Default JMS Resource Adapter"
type="ActiveMQResourceAdapter">
BrokerXmlConfig = broker:(tcp://localhost:61616)?persistent=true
ServerUrl = tcp://localhost:61616
DataSource = MyJmsDataSource
AllPrefetchValues = 0
</Resource>
ah, that's it
:-)
but now my MDB does not consume any message anymore.
this is frustrating
all I want is to use a single persistent queue with 2 consumers. One
is an MDB and another is a consumer with a selector to remove a
specific message by ID.
why they can't be friends?
:-)
[]
Leo
On Fri, Aug 2, 2013 at 8:45 AM, Romain Manni-Bucau
<[email protected]> wrote:
> Hmm, i don't find back how to use this one :s
>
>
> btw you can set AllPrefetchValues (see
> http://activemq.apache.org/resource-adapter-properties.html )
>
> *Romain Manni-Bucau*
> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
> *Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
> *Github: https://github.com/rmannibucau*
>
>
>
> 2013/8/2 Leonardo K. Shikida <[email protected]>
>
>> <Resource id="Default JMS Resource Adapter" type="ActiveMQResourceAdapter">
>> BrokerXmlConfig =
>> broker:(tcp://localhost:61616)?persistent=true&jms.prefetchPolicy.all=0
>> ServerUrl = tcp://localhost:61616
>> DataSource = MyJmsDataSource
>> maximumRedeliveries = -1
>> </Resource>
>>
>> gives me
>>
>> Caused by: java.lang.IllegalArgumentException: There are 1 Broker
>> options that couldn't be set on the BrokerService. Check the options
>> are spelled correctly. Unknown
>> parameters=[{jms.prefetchPolicy.all=0}]. This BrokerService cannot be
>> started.
>> at
>> org.apache.activemq.broker.DefaultBrokerFactory.createBroker(DefaultBrokerFactory.java:49)
>> at
>> org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:71)
>> at
>> org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.java:54)
>> at
>> org.apache.openejb.resource.activemq.ActiveMQ5Factory.createBroker(ActiveMQ5Factory.java:62)
>> ... 26 more
>>
>> []
>>
>> Leo
>>
>>
>> On Fri, Aug 2, 2013 at 7:54 AM, Leonardo K. Shikida <[email protected]>
>> wrote:
>> > Just like tha example i've sent in the previous email?
>> >
>> > Em 02/08/2013 07:25, "Romain Manni-Bucau" <[email protected]>
>> escreveu:
>> >
>> >> Hi,
>> >>
>> >> directly in broker url i think, application.properties doesn't handle
>> this
>> >> one
>> >>
>> >> *Romain Manni-Bucau*
>> >> *Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
>> >> *Blog:
>> >> **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
>> >> *LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
>> >> *Github: https://github.com/rmannibucau*
>> >>
>> >>
>> >>
>> >> 2013/8/2 Leonardo K. Shikida <[email protected]>
>> >>
>> >> > Hi Romain
>> >> >
>> >> > sorry for may ignorance, but the jms.prefetchPolicy.all=0 goes like
>> >> > this?
>> >> >
>> >> > <Resource id="Default JMS Resource Adapter"
>> >> > type="ActiveMQResourceAdapter">
>> >> > BrokerXmlConfig =
>> >> >
>> broker:(tcp://localhost:61616)?persistent=true&jms.prefetchPolicy.all=0
>> >> > ServerUrl = tcp://localhost:61616
>> >> > DataSource = MyJmsDataSource
>> >> > maximumRedeliveries = -1
>> >> > </Resource>
>> >> >
>> >> > or is it defined at application.properties like
>> >> >
>> >> > jms.prefetchPolicy.all=0
>> >> >
>> >> > ?
>> >> >
>> >> > []
>> >> >
>> >> > Leo
>> >> >
>> >> >
>> >> > On Fri, Aug 2, 2013 at 2:05 AM, Romain Manni-Bucau
>> >> > <[email protected]> wrote:
>> >> > > Hi
>> >> > >
>> >> > > Did you try
>> >> > http://activemq.apache.org/what-is-the-prefetch-limit-for.html ?
>> >> > > Le 2 août 2013 06:32, "Leonardo K. Shikida" <[email protected]> a
>> >> > > écrit
>> >> > :
>> >> > >
>> >> > >> Hi
>> >> > >>
>> >> > >> page http://tomee.apache.org/jms-resources-and-mdb-container.html
>> >> > >>
>> >> > >> seems to be inaccurate
>> >> > >>
>> >> > >> it says
>> >> > >>
>> >> > >> "Adding the DataSource property to your ActiveMQResourceAdapter
>> >> > >> config
>> >> > >> will automatically setup JDBC Persistence using the
>> >> > >> org.apache.activemq.store.jdbc.JDBCPersistenceAdapter"
>> >> > >>
>> >> > >> but the example does not use the "?persistent=true"
>> >> > >>
>> >> > >> in my app, if I omit this parameter, tomee simply behaves as the
>> >> > >> messages are in memory.
>> >> > >>
>> >> > >> if I add the parameter
>> >> > >>
>> >> > >> <Resource id="Default JMS Resource Adapter"
>> >> > >> type="ActiveMQResourceAdapter">
>> >> > >> BrokerXmlConfig =
>> >> > >> broker:(tcp://localhost:61616)?persistent=true
>> >> > >> ServerUrl = tcp://localhost:61616
>> >> > >> DataSource = MyJmsDataSource
>> >> > >> </Resource>
>> >> > >>
>> >> > >> then it retrieves all the messages that are persisted
>> >> > >>
>> >> > >> BTW, how exactly should I set tomee to disable activemq prefetch?
>> >> > >> (all
>> >> > of
>> >> > >> them)
>> >> > >>
>> >> > >> Please provide an example in a file (tomee.xml,
>> >> > >> application.properties, whatever), not in the java code.
>> >> > >>
>> >> > >> TIA
>> >> > >>
>> >> > >> Leo
>> >> > >>
>> >> >
>>