Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

DSN Creation in WSAD 5.1.2  RSS feed

 
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 java.net.connection 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.
 
author & internet detective
Marshal
Posts: 38250
623
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gaurav,
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.
 
It's just a flesh wound! Or a tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!