Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with configuring EJB with MySQL  RSS feed

 
S.R.K.Vivek Raju
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
I am new to EJB and i followed the tutorial to set up entity beans from EJBtut.com, i faily understood the configurations and EJB structure.
But i have a problem in registering mysql driver as the dasebase driver.

I am using Jboss-4.0.0 as my app server and mysql as a database.

Could anybody help with the procedure as i feel i am not doing it right.

With Regards
S.R.K.Vivek Raju.
 
Damanjit Kaur
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Have you put mysql driver file in JBoss server's lib folder.

2. From C:\jboss-4.0.0\docs\examples\jca directory you can get mysql-ds.xml file and place it in JBoss server's deploy folder.

3. Edit this file for <jndi-name>,<connection-url>,<driver-class>,<user-name>, <password>

4. In login-config.xml file if you have
<application-policy name = "someDbRealm"> specified. If yes then check for
<module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=This should be same as <jndi-name> in step 3.</module-option>

5. <security-domain> in mysql-ds.xml file at step 2. should be same as application-policy name at step4.
 
Bruno Collet
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A few months ago I posted a small document about MySQL/JBoss config, based on the problems I encountered.
Maybe this can help you.
See http://www.practicalsoftwarearchitect.com/tips/jbossmysql/jbossmysql.html
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!