1 2 Previous Next 15 Replies Latest reply on Jan 19, 2011 8:23 AM by jaikiran Go to original post
      • 15. JBossAS 6: Strange JNDI name for datasource
        jaikiran

        henk de boer wrote:

         

        I see. That's something really... I guess this is more or less the XML equivalent of using the @DataSourceDefinition annotation on an EJB bean (or other managed class).

        Exactly! data-source element is the deployment descriptor equivalent of @DataSourceDefinition.

         

         

         

        henk de boer wrote:


        There is on other odd thing here.

         

        From the logs it seems that the EJB module is always initialized before the Web module, but the data source I defined in web.xml is available for the persistence unit in the EJB module (using the internal name). How can this be? Are the modules initialized in two phases or so?

        The deployment processing isn't really that simple. Each deployment goes through various phases/stages of the MC based VDF (Virtual Deployment Framework). The deployers and the other dependencies on the deployment control the ordering. Creating and initializing the containers for the components (like servlets, EJBs etc...) in these deployments is another separate thing altogether and that has its own ordering.

        1 2 Previous Next