1 Reply Latest reply on Oct 29, 2002 6:14 PM by infectedrhythms

    CMP descriptor and datasource name.


      Am pretty new to J2EE, JBoss etc...

      My question is how does a CMP know what datasource to use?

      ejb-jar.xml holds the standard J2EE required fields for any EJB and the shema etc...

      jboss.xml holds specific values required by the JBoss EJB container.

      jbosscmp-jdbc.xml Contains the field mappings table info etc...

      But no where do I see a mention of the jndi name for the datasource, within any of the descriptors. I used JBuilder and the Open Tools to have the descriptors automatically created. Unless there is a bug with the Open Tools for JBuilder and the datasource wasn't added.


        • 1. Re: CMP descriptor and datasource name.

          Well I found the problem.... The below is found within the descriptor, now if only I can figure out how to add the datasource :P Doing it manualy doesn't cut it cause the file is regenrated all the time. You have to specify a datasource using JBuilder and the OpenTool will pick it up... But i havent been able to do so.. Any ideas?

          - The 'defaults' node in jbosscmp-jdbc.xml will have a 'datasource' specified if within
          your EJB desginer node at least one entity bean specifies a 'datasource' and no two entity
          beans specify conflicting 'datasource' values. If conflicting values are specified or if no
          value is specified for any entity bean, the 'datasource' element will not be added to the
          'defaults' node in jbosscmp-jdbc.xml.