ops4j / org.ops4j.pax.jms

Pax JMS provides a lightweight bridge between Java Message Service (JMS) and OSGi using Declarative Services and the whiteboard pattern
Apache License 2.0
5 stars 8 forks source link

PAX JMS forces JMS 2.0 and doesn't work property with ActiveMQ [PAXJMS-17] #45

Closed grgrzybek closed 6 years ago

grgrzybek commented 6 years ago

Jean-Baptiste Onofre created PAXJMS-17

Using a connection factory created by Pax JMS, we systematically have:

java.lang.UnsupportedOperationException: JMS 2.0 is not supported by ActiveMQ
        at org.ops4j.pax.jms.activemq.ActiveMQConnectionFactoryFactory$1.createContext(ActiveMQConnectionFactoryFactory.java:77) ~[?:?]
        at org.apache.karaf.jms.internal.JmsServiceImpl.createContext(JmsServiceImpl.java:155) ~[?:?]
        at org.apache.karaf.jms.internal.JmsServiceImpl.createContext(JmsServiceImpl.java:148) ~[?:?]
        at org.apache.karaf.jms.internal.JmsServiceImpl.send(JmsServiceImpl.java:228) ~[?:?]
        at org.apache.karaf.jms.command.SendCommand.execute(SendCommand.java:40) ~[?:?]
        at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:84) ~[?:?]
        at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68) ~[?:?]
        at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86) ~[?:?]
        at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:599) ~[?:?]
        at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:526) ~[?:?]
        at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:415) ~[?:?]
        at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:416) ~[?:?]
        at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229) ~[?:?]
        at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:?]
        at java.lang.Thread.run(Thread.java:748) [?:?]

I'm fixing to cleanly support ActiveMQ in pax-jms-activemq.


Affects: 1.0.1 Votes: 0, Watches: 1

grgrzybek commented 6 years ago

Jean-Baptiste Onofre commented

The workaround is to use transx for pooling. It's possible to define this using:

pool=transx

in the org.ops4j.connectionfactory.UUID.

I've updated Karaf JMS service accordingly.

grgrzybek commented 6 years ago

Jean-Baptiste Onofre commented

By the way, it needs additional features to be installed: pax-jms-transx-pool, pax-jms-activemq.