Hello, I inherited a HornetQ , Spring framework standalone project which I am now trying to upgrade. It is a large beast and eventually will need to upgrade Java, Tomcat, Hibernate, etc.. Because we don't have a lot of resources I basically want to replace HornetQ with Artemis and then validate the unit tests and integration tests.
I am having some issues with some beans I have some code like this. //private final HornetQConnectionFactory jmsConnectionFactory; @Inject JmsPoolableConnectionFactory(HornetQConnectionFactory jmsConnectionFactory) { this.jmsConnectionFactory = jmsConnectionFactory; jmsConnectionFactory.setUseGlobalPools(false); jmsConnectionFactory.setScheduledThreadPoolMaxSize(10); jmsConnectionFactory.setThreadPoolMaxSize(-1); } which I replaced with this. private final ActiveMQConnectionFactory jmsConnectionFactory; @Inject JmsPoolableConnectionFactory(ActiveMQConnectionFactory jmsConnectionFactory) { this.jmsConnectionFactory = jmsConnectionFactory; jmsConnectionFactory.setUseGlobalPools(false); jmsConnectionFactory.setScheduledThreadPoolMaxSize(10); jmsConnectionFactory.setThreadPoolMaxSize(-1); } The applicationContext.xml has some beans defined like this. <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate" scope="singleton" autowire-candidate="true" lazy-init="true"> <property name="environment"> <props> <prop key="java.naming.factory.initial">org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory</prop> <prop key="java.naming.provider.url">tcp://localhost:61616</prop> <prop key="java.naming.factory.url.pkgs">org.jboss.naming:org.jnp.interfaces</prop> </props> </property> </bean> <bean id="jmsConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean" lazy-init="true"> <property name="jndiTemplate"> <ref bean="jndiTemplate"/> </property> <property name="jndiName"> <value>ConnectionFactory</value> </property> </bean> I am not exactly sure what I should be putting under jndiName/value I am getting some NameNotFound exceptions. org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'jmsPoolableConnectionFactory' defined in file [/home/opt/apache.org/apache-tomcat-6.0.41/webapps/congobus/WEB-INF/classes/com/convio/sb/jms/JmsPoolableConnectionFactory.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory]: : No qualifying bean of type [org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {} Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jmsConnectionFactory' defined in class path resource [META-INF/applicationContext.xml]: Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: ConnectionFactory Anything obvious you guys can tell. -Art -- Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-Dev-f2368404.html