You have to deploy a *-ds.xml file which is holding the datasource configuration. There are example files in the docs/examples/jca directory of jboss.
You can use one *-ds.xml for all your datasources or several files.
The datasources are accessible via JNDI then (java: namespace).
Well i am not able to find *-ds.xml files but i do have
*-service.xml files for almost all dbms. Since i am using DB2 i have directly used db2-service.xml and put it in deploy directory along with the jars etc. Every thing is working fine for a single datasource but how do i configure multiple jndi bindings that point to different datasources which have different database schemas. Do i have to define a different MBEAN (i tried doing that i gave error while booting). or do i have to put the definition in a seperate xml file itself.
Well, the *-service.xml is for older versions, but for you it is just the same. You can use several *-service.xml files or you can have several configurations in one file, since every configuration has its own JNDI name.
Can you just tell me how to define multiple datasource in a single *-service.xml. Creating multiple files looks cubersome as i have many connectionpool to maintain.
The following is the code segment from *-service.xml where i define the connection pool
<config-property name="ConnectionURL" type="java.lang.String">jdbc:db2://192.168.1.3/sample</config-property>
<config-property name="DriverClass" type="java.lang.String">COM.ibm.db2.jdbc.app.DB2Driver</config-property>
<!--set these only if you want only default logins, not through JAAS -->
<config-property name="UserName" type="java.lang.String">testadm</config-property>
<config-property name="Password" type="java.lang.String">psyche32</config-property>
<!--Below here are advanced properties -->
<depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=JBoss LocalTransaction JDBC Wrapper
A datasource is described as mbean. This description includes things like class name, jndi name, dependencies and so on. You can configure several mbeans with one service xml. Read the dtd for further information.