[jboss-user] [JBoss.NET] - DataSource to MySQL with Axis2 and JBoss

zolv do-not-reply at jboss.com
Thu Jun 14 08:47:36 EDT 2007


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"?>
 
    <local-tx-datasource> 
        <jndi-name>jdbc/dw</jndi-name>
        <connection-url>jdbc:mysql://myserver:3306/db</connection-url> 
        <driver-class>com.mysql.jdbc.Driver</driver-class> 
        <user-name>user</user-name> 
        password 
    </local-tx-datasource> 
 

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?

Greetings
zolv

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4054331#4054331

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4054331



More information about the jboss-user mailing list