0 Replies Latest reply on Oct 7, 2013 2:26 AM by andrew.s

    JNDI Lookup of EJB3 Singleton in spring XML

    andrew.s Newbie

      I don't know if this is related to the way the modules setup the classpath or not.  I don't believe it is.


      I have a Singleton bean defined in my application.  It is configured to load on startup.  I see the singleton getting bound into JNDI.  However, when I attempt to have Spring look it up, I get a name not found exception.  If I do the lookup inside of one of my other EJBs (for instance an MDB), it works fine.


      I see this on startup:


      08:53,889 INFO  [org.jboss.as.ejb3.deployment.processors.EjbJndiBindingsDeploymentUnitProcessor] (MSC service thread 1-3) JNDI bindings for session bean named ConfigSingleton in

      ployment unit subdeployment "eft_ejb.jar" of deployment "eft_ear-1.0.ear" are as follows:











      The line in my Spring XML file is:


      <jee:jndi-lookup id="configSingleton" jndi-name="java:module/ConfigSingleton" />


      The server.log then has as the final cause of deployment failure:


      Caused by: javax.naming.NameNotFoundException: java:module/ConfigSingleton


      I'm using Snowdrop 3.0.1 and the Spring 3.2 modules.  Everything else works fine, including a JNDI lookup of the connection factory via Spring.  I have also tried all six permutations of the JNDI bindings.