activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From boday <>
Subject Spring JNDI datasource not recognized after upgrade to ActiveMQ 5.6.0
Date Mon, 01 Oct 2012 17:08:55 GMT
I tested my ActiveMQ 5.5.0 (fuse version) app in AMQ 5.6.0 and noticed that
our Spring JNDI configured Oracle datasources aren't being found.

The only thing I changed in my applications was the pom.xml versions of
AMQ/Spring (to match the 5.6 versions). Otherwise, I'm using the identical
application code and configuration (activemq.xml, jndi.xml, etc), but my
Spring JDBC DAOs (v3.0.5) are failing to find them.

No errors in the logs otherwise, just this Spring Application Context
initialization error...

javax.naming.NameNotFoundException; remaining name 'jdbc/myDataSource'

here is the relevant Spring jndi config (conf/jndi.xml, included in

<bean id="jndi"
    factory-method="makeInitialContext" scope="singleton">
    <property name="entries" ref="jndiEntries" />
<util:map id="jndiEntries">
    <entry key="jdbc/myDataSource">
    <bean id="myDBCPDataSource"
class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
        <property name="driverClassName" value="oracle.jdbc.OracleDriver" />

then my application references it like this...

<bean id="myDataSource"
    <property name="jndiName">

<bean id="messageDAO" class="com.mycompany.MessageDAOImpl">
    <property name="dataSource" ref="myDataSource" />

That said, I tested without using JNDI (instead just hardcoded the
datasource in my app) and everything works as expected. So that should rule
out everything except the Spring JNDI registration/lookup of the datasource,

So, what am I missing?

note: also on

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message