You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by mcpata2002 <mc...@gmail.com> on 2016/07/10 04:52:29 UTC

Topic MDB annotation results Queue

I have defined a Topic queue in tomee.xml

    <Resource id="MqttTopic" type="javax.jms.Topic"/>

and also annotate my MDB as below:

    @MessageDriven(activationConfig = { 
		@ActivationConfigProperty(propertyName = "destinationType", propertyValue
= "javax.jms.Topic"),
		@ActivationConfigProperty(propertyName = "destination", propertyValue =
"MqttTopic"), 
		@ActivationConfigProperty(propertyName = "subscriptionDurability",
propertyValue = "Durable"),
		@ActivationConfigProperty(propertyName = "clientId", propertyValue =
"TopicMDB")
    }, mappedName = "MqttTopic")

However when I start tomee-plus exception throw which told me that
subscriptionDurability is cannot be set with destinationType javax.jms.Queue
as below:

/Error deploying 'TopicMDB'.  Exception: class
org.apache.openejb.OpenEJBException: Unable to create activation spec:
Invalid settings: subscriptionDurability cannot be set to: Durable when
destinationType is set to javax.jms.Queue as it is only valid when
destinationType is set to javax.jms.Topic. subscriptionName must be set
since durable subscription was requested.: Unable to create activation spec:
Invalid settings: subscriptionDurability cannot be set to: Durable when
destinationType is set to javax.jms.Queue as it is only valid when
destinationType is set to javax.jms.Topic. subscriptionName must be set
since durable subscription was requested./

If I didn't set the subscriptionDurability and clientId I found that a Queue
named "MqttTopic" is also created on the ActiveMQ (I use external one, s.t.
I can see the queue and topic lists from the admin).

Any direction to further troubleshoot are appreciated! Thanks!!




--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Topic-MDB-annotation-results-Queue-tp4679268.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: Topic MDB annotation results Queue

Posted by mcpata2002 <mc...@gmail.com>.
Yes! It works! Many Thanks!!!!!



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Topic-MDB-annotation-results-Queue-tp4679268p4679272.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: Topic MDB annotation results Queue

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Can you try removing the mappedname?
Le 10 juil. 2016 16:07, "mcpata2002" <mc...@gmail.com> a écrit :

> I have defined a Topic queue in tomee.xml
>
>     <Resource id="MqttTopic" type="javax.jms.Topic"/>
>
> and also annotate my MDB as below:
>
>     @MessageDriven(activationConfig = {
>                 @ActivationConfigProperty(propertyName =
> "destinationType", propertyValue
> = "javax.jms.Topic"),
>                 @ActivationConfigProperty(propertyName = "destination",
> propertyValue =
> "MqttTopic"),
>                 @ActivationConfigProperty(propertyName =
> "subscriptionDurability",
> propertyValue = "Durable"),
>                 @ActivationConfigProperty(propertyName = "clientId",
> propertyValue =
> "TopicMDB")
>     }, mappedName = "MqttTopic")
>
> However when I start tomee-plus exception throw which told me that
> subscriptionDurability is cannot be set with destinationType
> javax.jms.Queue
> as below:
>
> /Error deploying 'TopicMDB'.  Exception: class
> org.apache.openejb.OpenEJBException: Unable to create activation spec:
> Invalid settings: subscriptionDurability cannot be set to: Durable when
> destinationType is set to javax.jms.Queue as it is only valid when
> destinationType is set to javax.jms.Topic. subscriptionName must be set
> since durable subscription was requested.: Unable to create activation
> spec:
> Invalid settings: subscriptionDurability cannot be set to: Durable when
> destinationType is set to javax.jms.Queue as it is only valid when
> destinationType is set to javax.jms.Topic. subscriptionName must be set
> since durable subscription was requested./
>
> If I didn't set the subscriptionDurability and clientId I found that a
> Queue
> named "MqttTopic" is also created on the ActiveMQ (I use external one, s.t.
> I can see the queue and topic lists from the admin).
>
> Any direction to further troubleshoot are appreciated! Thanks!!
>
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/Topic-MDB-annotation-results-Queue-tp4679268.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>