Hi do you have a maven project with a unit test reproducing it?
*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/16 Christian Schlichtherle <[email protected]> > Hi everyone, > > this is basically a repost of this article on stackoverflow.com: > http://stackoverflow.com/questions/18272597/openejb-ignores-configuration-properties-for-topic-resource > > I'm trying to use a Topic with a message driven bean on OpenEJB. So I've > edited conf/openejb.xml to: > > <?xml version="1.0" encoding="UTF-8"?> > <openejb> > <Resource id="TrueUpdate" type="javax.jms.Topic"> > destination = TrueUpdate > clientId = nevermind > </Resource> > </openejb> > > Using `bin/openejb properties` I get: > > > # Resource(id=TrueUpdate) > # className: org.apache.activemq.command.ActiveMQTopic > # > TrueUpdate = new://Resource?type=javax.jms.Topic > TrueUpdate.destination = TrueUpdate > TrueUpdate.clientId = nevermind > > This looks fine. However, when deploying my EAR file I get: > > > 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. clientId 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. clientId must be set since > durable subscription was requested. > at > org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:836) > at > org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:546) > at > org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:542) > at > org.apache.openejb.assembler.DeployerEjb.deploy(DeployerEjb.java:195) > at > org.apache.openejb.assembler.DeployerEjb.deploy(DeployerEjb.java:104) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:606) > at > org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181) > at > org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163) > at > org.apache.openejb.security.internal.InternalSecurityInterceptor.invoke(InternalSecurityInterceptor.java:34) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:606) > at > org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181) > at > org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163) > at > org.apache.openejb.cdi.CdiInterceptor.invoke(CdiInterceptor.java:126) > at > org.apache.openejb.cdi.CdiInterceptor.access$000(CdiInterceptor.java:42) > at > org.apache.openejb.cdi.CdiInterceptor$1.call(CdiInterceptor.java:63) > at > org.apache.openejb.cdi.CdiInterceptor.aroundInvoke(CdiInterceptor.java:69) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:606) > at > org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181) > at > org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163) > at > org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:176) > at > org.apache.openejb.monitoring.StatsInterceptor.invoke(StatsInterceptor.java:95) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:606) > at > org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181) > at > org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163) > at > org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:138) > at > org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:239) > at > org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:191) > at > org.apache.openejb.server.ejbd.EjbRequestHandler.doEjbObject_BUSINESS_METHOD(EjbRequestHandler.java:290) > at > org.apache.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java:140) > at > org.apache.openejb.server.ejbd.EjbDaemon.processEjbRequest(EjbDaemon.java:267) > at > org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:191) > at > org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java:81) > at > org.apache.openejb.server.ejbd.KeepAliveServer$Session.service(KeepAliveServer.java:273) > at > org.apache.openejb.server.ejbd.KeepAliveServer$Session.access$1000(KeepAliveServer.java:192) > at > org.apache.openejb.server.ejbd.KeepAliveServer.service(KeepAliveServer.java:326) > at > org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java:72) > at > org.apache.openejb.server.ServerServiceFilter.service(ServerServiceFilter.java:64) > at > org.apache.openejb.server.ServerServiceFilter.service(ServerServiceFilter.java:64) > at > org.apache.openejb.server.ServiceStats.service(ServiceStats.java:54) > at > org.apache.openejb.server.ServerServiceFilter.service(ServerServiceFilter.java:64) > at > org.apache.openejb.server.ServiceLogger.service(ServiceLogger.java:92) > at > org.apache.openejb.server.ServerServiceFilter.service(ServerServiceFilter.java:64) > at > org.apache.openejb.server.ServicePool.access$201(ServicePool.java:35) > at > org.apache.openejb.server.ServicePool$3.run(ServicePool.java:174) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > at java.lang.Thread.run(Thread.java:724) > Caused by: org.apache.openejb.OpenEJBException: Error deploying > 'MessageListenerBean'. 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. clientId 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. clientId must be set since > durable subscription was requested. > at > org.apache.openejb.assembler.classic.Assembler.startEjbs(Assembler.java:974) > at > org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:730) > ... 58 more > Caused by: 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. clientId must be set since > durable subscription was requested. > at > org.apache.openejb.core.mdb.MdbContainer.createActivationSpec(MdbContainer.java:251) > at > org.apache.openejb.core.mdb.MdbContainer.deploy(MdbContainer.java:136) > at > org.apache.openejb.assembler.classic.Assembler.startEjbs(Assembler.java:961) > ... 59 more > Caused by: javax.resource.spi.InvalidPropertyException: 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. clientId must be set since > durable subscription was requested. > at > org.apache.activemq.ra.ActiveMQActivationSpec.validate(ActiveMQActivationSpec.java:136) > at > org.apache.openejb.core.mdb.MdbContainer.createActivationSpec(MdbContainer.java:229) > ... 61 more > > And here's my bean: > > @MessageDriven(mappedName = "TrueUpdate", > activationConfig = { > @ActivationConfigProperty(propertyName = "messageSelector", > propertyValue = "manager = > true"), > @ActivationConfigProperty(propertyName = "destinationType", > propertyValue = > "javax.jms.Topic"), > @ActivationConfigProperty(propertyName = "destination", > propertyValue = "TrueUpdate"), > @ActivationConfigProperty(propertyName = > "subscriptionDurability", > propertyValue = "Durable"), > @ActivationConfigProperty(propertyName = > "subscriptionName", > propertyValue = "TrueUpdate > Manager"), > }) > public class MessageListenerBean implements MessageListener { > ... > } > > What am I doing wrong here? > > Regards, > Christian Schlichtherle > >
