This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
In JBoss directory you can look for examples folder wherein you will find example database configuration files(xml files) for different databases. You need to copy the configuration file for mysql(provided in example directory) in deploy directory. Modify the url,username, password for your database in that file.
Joined: Jan 21, 2005
Hi Damanjit Kaur
Many thanx for your response. Well I am learning EJB's using JBoss mySQL. right now i m quite successfull in getting connection using Datasource, but I m facing issue with entity bean deployment. I did a quit lot of updation 1) mysql-ds.xml 2) jbosscmp-jdbc.xml 3) standardjaws.xml 4) standardjbosscmp-jdbc.xml but still i m not successfull :-( I keep gettin the following exception..
Depends On Me: org.jboss.deployment.DeploymentException: Failed to obtain type-mapping metadata from the metadata library MBean: jboss.jdbc atasource=MySqlDS,service=metadata is not registered.; - nested throwable: (javax.management.InstanceNotFoundException: jboss.jdbc atasource=MySqlDS,service=metadata is not registered.)
Joined: Oct 18, 2004
I did a quit lot of updation 1) mysql-ds.xml 2) jbosscmp-jdbc.xml 3) standardjaws.xml 4) standardjbosscmp-jdbc.xml but still i m not successfull :-( I keep gettin the following exception..
You don't need to do so many updation, only updation in mysql-ds file. and then on client application need to specify mapping for mysql i.e. the name for this mapping which is given in standardjbosscmp-jdbc.xml file and also in jbosscmp-jdbc.xml file in case you are not using xdoclet otherwise then you just need to specify this mapping and datasource in xdoclet.
and if you want to specify principal,passwords for security domain then you can simply copy the application module tag in conf/login-config.xml file change it for mysql and then specify this name in mysql-ds.xml file. How you have to specify this- yoou can see in hsqldb-ds.xml file in deploy directory and its corresponding reference in application-policy tag in login-config.xml file.
The error that you are getting may be because of some name mistake for mapping name that is specified for mysql in your standardjbosscmp-jdbc.xml and mysql-ds.xml and possibly in jbosscmp-jdbc.xml file too.
check this tag in all these files in mysql-ds.xml <metadata> <type-mapping> </type-mapping> </metadata>
in standardjboss...xml file <type-mapping> <name>mySQL</name>