| Author |
JBoss and MySQL
|
Saman Perera
Ranch Hand
Joined: Jul 15, 2003
Posts: 61
|
|
Hi All Please expain to me how to configure MySql and JBoss to start an J2ee project my prefered IDE is Eclipse ,please help me Thanking you Saman SCJP 1.4
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
|
You need to create a DataSource for your MysQL database. Look in the examples folder of JBoss (docs/examples/jca) there are a whole bunch of sample DataSource files. Just copy mysql-ds.xml (changing the relevant bits obviously), put it in your deploy directory, check you have the required Driver in your JBoss classpath and start the server.
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
Saman Perera
Ranch Hand
Joined: Jul 15, 2003
Posts: 61
|
|
thanks you Paul Sturrock your instruction any on can give me a web link or tutorial on this topic Saman
|
 |
Pradeep bhatt
Ranch Hand
Joined: Feb 27, 2002
Posts: 8876
|
|
|
http://www.coderanch.com/t/89165/JBoss/JCA-JBOSS-Change-default-Hypersonic
|
Groovy
|
 |
norman richards
Author
Ranch Hand
Joined: Jul 21, 2003
Posts: 364
|
|
I can recommend a book that shows how to do it... There's really not much more to it than that. Put the driver in server/default/lib. Copy mysql-ds.xml into your deploy directory. Edit the hostname/databasename/username/password values. That's it.
|
[<a href="http://members.capmac.org/~orb/blog.cgi" target="_blank" rel="nofollow">blog</a>] [<a href="http://www.amazon.com/exec/obidos/ASIN/0596100078/orb-20" target="_blank" rel="nofollow">JBoss: A Developer's Notebook</a>] [<a href="http://www.amazon.com/exec/obidos/ASIN/1932394052/orb-20" target="_blank" rel="nofollow">XDoclet in Action</a>]
|
 |
Dave Salter
Ranch Hand
Joined: Jul 20, 2005
Posts: 292
|
|
The one thing that caught me out when I first started to use JBoss was that to deploy a datasource, the name of the XML file that deploys the datasource must end in -ds.xml I didn't find anywhere that made this clear when I was starting out.
|
 |
somkiat puisungnoen
Ranch Hand
Joined: Jul 04, 2003
Posts: 1312
|
|
Document for you :: Eclipse IDE for J2EE 1.3 Development (Tomcat 4.x, JBoss 3.x, MySQL 3.x)
|
SCJA,SCJP,SCWCD,SCBCD,SCEA I
Java Developer, Thailand
|
 |
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11962
|
|
Originally posted by norman richards: Put the driver in server/default/lib. Copy mysql-ds.xml into your deploy directory. Edit the hostname/databasename/username/password values. That's it.
Umm. I've done this exact sequence once for a J2EE training where we used JBoss and MyEclipseIDE. However, I would feel better if there would be a way to include the datasource definition as part of the application itself. Is there such a way? Again, the ideal in my opinion would be that whatever needs to be done to a plain vanilla installation of the application server could be done inside the .ear file -- a bit like the Context XML for Tomcat web applications.
|
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
|
 |
norman richards
Author
Ranch Hand
Joined: Jul 21, 2003
Posts: 364
|
|
Sure, this is possible. Put your-ds.xml inside your ear, and create a jboss-app.xml that looks like this:
|
 |
Siripa Siangklom
Ranch Hand
Joined: Jan 26, 2004
Posts: 79
|
|
Hi, This is a tutorial how to set CMP in MySQL and JBoss.
|
 |
 |
|
|
subject: JBoss and MySQL
|
|
|