• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I just need verfying please

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey all.
My application uses mysql as a database, and I want to configure JBoss to use the database as a datasource.
I have did the following :
1. I have copied mysql-ds.xml and renamed it to todd-ds.xml
2. the contents of this file are :

3. I wrote the following in jboss-jdbc.xml :

4. dropped this file to ${JBOSS_HOME}/server/default/deploy
5. to use this datasource, I wrote :
Datasource ds = (Datasource)ic.lookup("java:/MySqlDS");
my question is , is there any thing wrong in my previous lines ?
thanks..
 
neva elsaeed
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
U have the datasource-mapping wrong..It should be:

<defaults>
<datasource>java:/MySqlDS</datasource>
<datasource-mapping>mySQL</datasource-mapping>
</defaults>

you can find these mappings written for different data source in a file called standardjbosscmp-jdbc.xml in jboss/server/default/conf directory.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic