Hi everyone,
Here's my problem : I have web services running within Axis2 in JOnAS and I need to configure 3 MySQL datasources for them, but I don't really know all I need to do.
- in context.xml, they are already declared with their credentials
- in jonas.properties (dbm.datasources property), I requested that MySQL driver be loaded
- in MySQL.properties, I declared my three datasources with their JNDI names as below
Code:
#declaration of datasources in jonas.properties
datasource.name jdbc/auth
datasource.url jdbc:mysql://127.0.0.1:3306/auth?autoReconnect=true
datasource.classname org.gjt.mm.mysql.Driver
datasource.username authuser
datasource.password authpwd
datasource.mapper rdb.mysql
datasource.name jdbc/maindb
datasource.url jdbc:mysql://10.193.14.3:3306/maindb?autoReconnect=true
datasource.classname org.gjt.mm.mysql.Driver
datasource.username mainuser
datasource.password mainpwd
datasource.mapper rdb.mysql
datasource.name jdbc/bkpdb
datasource.url jdbc:mysql://10.193.14.5:3306/bkpdb?autoReconnect=true
datasource.classname org.gjt.mm.mysql.Driver
datasource.username auxuser
datasource.password auxpwd
datasource.mapper rdb.mysql
First of all, I'm not even sure that this syntax is right. Don't each datasource declaration override the previous one?
Do I need to do something else in order to get the DB connections to work?
The application I need to deploy has bugs and doesn't display the "official" exception messages but I could still determine that the java:comp/env/jdbc/auth resource couldn't be found.
Can someone please tell me whether I've configured all I needed to, and help me with this new problem?
Thanks a lot! Cheers!
Kurt