This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes IDEs, Version Control and other tools and the fly likes DSN Creation in WSAD 5.1.2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "DSN Creation in WSAD 5.1.2" Watch "DSN Creation in WSAD 5.1.2" New topic

DSN Creation in WSAD 5.1.2

Gaurav Jain
Ranch Hand

Joined: Mar 11, 2004
Posts: 108
I am using WSAD5.1.2. I have to create a DSN yo connect to MySQL.I am able to connect using a direct JDBC connection by supplying the userid and password in the url.However when i try accessing it through a DSN i get a refused error.I have mentioned the userid and password in the security tab under JAAS and have selected both container and componenet managed authentication.
I am connecting to the database from my DAO.My ejb calls the service class which is a POJO and my POJO calls the DAO.I am creating the connection in the DAO.Where should i specify my resource reference (in the ejbjar.xml?) in order to create a logical mapping for my database since my ejb is not interacting with the database directly instead my DAO is doing it.
Any help and pointers will be highly appreciated.
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33132

You are accessing through a datasource, right? In the ejb.xml, you create a resource reference to the JNDI name. You can do this on the references tab of the EJB editor.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: DSN Creation in WSAD 5.1.2
It's not a secret anymore!