Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JBoss and MySQL

 
Saman Perera
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Saman Perera
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks you Paul Sturrock your instruction

any on can give me a web link or tutorial on this topic

Saman
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
 
norman richards
Author
Ranch Hand
Posts: 367
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Dave Salter
Ranch Hand
Posts: 293
Java Mac OS X Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Document for you ::

Eclipse IDE for J2EE 1.3 Development
(
Tomcat 4.x, JBoss 3.x, MySQL 3.x)
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
norman richards
Author
Ranch Hand
Posts: 367
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

This is a tutorial how to set CMP in MySQL and JBoss.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic