DZone Forums
Go Back   DZone Forums > Community > Enterprise Development > Web Services, SOA & ESB
Reload this Page datasources configuration for web services
Notices
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  (#1 (permalink)) Old
Member
 
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jun 2010
Default datasources configuration for web services - 07-02-2010, 09:07 AM

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
Reply With Quote
Reply

Tags
axis2, database, datasource, jonas, properties

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
log4j xml configuration kaswanharish Java 1 04-14-2010 12:30 PM
How do I configure default run configuration variables? belliveau Eclipse 0 11-03-2009 04:25 PM
Need 'Run-Configuration' Type Functionality dfrenette Eclipse 1 05-20-2009 01:39 PM
Tomcat configuration in Eclipse ados Eclipse 1 05-06-2009 11:38 AM
Java Configuration problem ??? bigYetti Java 3 02-24-2009 12:06 PM


Copyright 1997-2009, DZone, Inc.
vBulletin Skin developed by: vBStyles.com