I just downloaded and installed JBoss 3.2.1
I configured my datasource as...
<local-tx-datasource>
<jndi-name>jdbc/InfectedDB</jndi-name>
<connection-url>jdbc:mysql://localhost:3306/infected</connection-url>
<driver-class>org.gjt.mm.mysql.Driver</driver-class>
<user-name>xxx</user-name>
xxx
<min-pool-size>5</min-pool-size>
<max-pool-size>15</min-pool-size>
</local-tx-datasource>
My web-xml file is....
<resource-ref>
DB Connection
<res-ref-name>jdbc/InfectedDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
My jboss-web is...
<jboss-web>
<context-root>/</context-root>
<resource-ref>
<res-ref-name>jdbc/InfectedDB</res-ref-name>
<jndi-name>java:/jdbc/InfectedDB</jndi-name>
</resource-ref>
</jboss-web>
In my jsp I acces the db using...
ds = (DataSource)ctx.lookup("java:comp/env/jdbc/InfectedDB");
And I get...
23:35:55,031 ERROR [STDERR] javax.naming.NamingException: Could not dereference
object. Root exception is
23:35:55,031 ERROR [STDERR] javax.naming.NameNotFoundException: jdbc not bound
23:35:55,031 ERROR [STDERR] at org.jnp.server.NamingServer.getBinding(Naming
Server.java:495)
23:35:55,031 ERROR [STDERR] at org.jnp.server.NamingServer.getBinding(Naming
Server.java:503)
I know my war works on the jboss 3.0.4 thanks