Switching from Cocoon managed datasource to JBoss JNDI datasource.

Up til now, I've used the datasource defined in cocoon which managed pooling, etc. The advantage of having jboss manage the connections is they can be shared across different applications running under jboss. Here is a list of things tha need to be done to make this work.

   <j2ee name="stevie">
       <dbname>mbrdb</dbname>
   </j2ee>
    <?xml version="1.0"?>
    <jboss-web>
        <resource-ref>
            <res-ref-name>jdbc/mbrdb</res-ref-name>
            <jndi-name>java:/mbrdb</jndi-name>
        </resource-ref>
    </jboss-web>
   <resource-ref>
       <res-ref-name>jdbc/mbrdb</res-ref-name>
       <res-type>javax.sql.DataSource</res-type>
       <res-auth>Container</res-auth>
   </resource-ref>

It goes just before the </web-app> line at the bottom. You'll need to change the "mbrdb" reference here also.

That is it! It took me many hours and the help of some co-workers to get this set up right. Now, in your cocoon pipeline, you can just use the datasource name like you did before the change!