10 Replies Latest reply on Aug 17, 2012 5:15 AM by Piotr Nowicki

    JCA cannot bind JNDI resource within javax.resource.spi.ResourceAdapter#start() method

    Piotr Nowicki Newbie



      I know that in JBoss AS 7 there are restrictions about programmatic binding of objects to the JNDI, but I am curious about this:


      you CAN bind something to the JNDI within the Singleton EJB (@Startup, @Singleton) in the @PostConstruct method because it's still before the "usage stage".


      I wonder why can't you bind anything from within the JCA Resource Adapter's start method (javax.resource.spi.ResourceAdapter#start) ?

      Isn't it still safe to access the JNDI and create some resources based on the configuration values passed to the JCA adapter configuration?

      What is the workaround for such use case?


      Thanks in advance,



      I'm using JBoss AS 7.1.1.Final with 64 bit JDK 6.