I'm trying to embed hornetq in my application (I'm now trying to start a jms server).
To do so I used the following code:
EmbeddedJMS jmsServer = new EmbeddedJMS(); jmsServer.setConfigResourcePath(hornetqConfig); jmsServer.setJmsConfigResourcePath(jmsConfig); jmsServer.start();
My configuration is quite basic for the moment:
hornetq-configuration.xml
<configuration xmlns="urn:hornetq" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd"> <connectors> <connector name="netty-connector"> <factory-class>org.hornetq.integration.transports.netty.NettyConnectorFactory</factory-class> </connector> </connectors> <acceptors> <acceptor name="netty-acceptor"> <!-- <factory-class>org.hornetq.integration.transports.netty.NettyAcceptorFactory</factory-class>--> <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class> </acceptor> </acceptors> <security-enabled>false</security-enabled> </configuration>
I used this org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory because when trying to use org.hornetq.integration.transports.netty.NettyAcceptorFactory I get the following exception:
java.lang.AbstractMethodError: org.hornetq.integration.transports.netty.NettyAcceptorFactory.createAcceptor(Lorg/hornetq/core/server/cluster/ClusterConnection;Ljava/util/Map;Lorg/hornetq/spi/core/remoting/BufferHandler;Lorg/hornetq/spi/core/remoting/BufferDecoder;Lorg/hornetq/spi/core/remoting/ConnectionLifeCycleListener;Ljava/util/concurrent/Executor;Ljava/util/concurrent/ScheduledExecutorService;)Lorg/hornetq/spi/core/remoting/Acceptor;
I don't understand in the deep what is the difference between those two implementation and what is the correct one in my case.
Thanks in advance
Regards