aspose file tools*
The moose likes JDBC and the fly likes How to a database in MySQL using JNDI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to a database in MySQL using JNDI" Watch "How to a database in MySQL using JNDI" New topic
Author

How to a database in MySQL using JNDI

Srinivasa Iyengar
Greenhorn

Joined: Mar 11, 2006
Posts: 4
Hi,
I want to connect a database file in MySQL using JNDI. Though i can connect in through JDBC now i need to establish a connection to the Data Mining Engine (DME) of JDM.
Plz reply to me regarding this as early as possible.

Thanks
Srinivasa Babu
Joel McNary
Bartender

Joined: Aug 20, 2001
Posts: 1824

sandilyan xyz:

Welcome to the JavaRanch! Please adjust your displayed name to match the JavaRanch Naming Policy.
You can change it here.

(We are looking for a first and last name that are not obviously fictitous -- unfortunatley, "xyz" does not qualify)

Now, as far as your question goes, I'm afraid that you will have to be a little more specific. Typically, you (or, more likely, your application server) would create a connection and store it in the JNDI tree and then you simply look up the object for that name and retrieve the connection. Or, the credentials could probably be stored and new connections created every time (less likely).

Googling for JNDI will probably give you at least hints in the direction that you are looking for.


Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
Srinivasa Iyengar
Greenhorn

Joined: Mar 11, 2006
Posts: 4
First of all i thank u to reply. My problem: I've to use Java DataMining API for my project.So establishing a connection to the Data Mining Engine (DME) via JNDI call is not known to me.

Plz mail me the detailed code to connect to the DME through JNDI. Also the DB is MySQL where data is stored.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to a database in MySQL using JNDI