3 Replies Latest reply: Jun 19, 2007 4:15 AM by Radek A RSS

    DataSource to MySQL with Axis2 and JBoss

    Radek A Newbie

      Using: JBoss v4.0, Axis2 v1.2, OS: FreeBSD, MySQL 5.0.27

      I have problem with setting DataSource using JBoss.

      I have created mysql-ds.xml and put it into deploy dir:

      <?xml version="1.0" encoding="UTF-8"?>


      During starting up JBoss there is info:

      2007-06-14 14:10:41,649 INFO [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=jdbc/dw' to JNDI name 'java:jdbc/dw'

      so it looks ok.

      Previously I was working with Tomcat and there was no prefix "java:" before datasource name and I'm little suprise that it appears here. It looks like DS name is java:jdbc/dw instead of just jdbc/dw

      in Axis2 context.xml file I have put:

      <ResourceLink name="jdbc/dw global="java:jdbc/dw" type="javax.sql.DataSource" />

      but I get error:
      Couldn't find data source:java:jdbc/dw

      I am confused, because I have found several tutorials how to set datasources in JBoss and there are placed different infos (only creating *-ds.xml file is common)

      What am I doing wrong or missing something?