• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB with MSAcsess

 
priya shankar
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
Huv to connect Ebj with MsAccess ..Do we need any special driver...
Pls Let me the Details
priya
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know which driver you should use (you can use the JDBC-ODBC bridge but I think that's not of too good quality, though) but I think you should check that you have configured your ODBC correct. Here's a helpful-looking discussion thread on the subject.
 
priya shankar
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Lasse
Priya here...I went through the link ,u said..But it explains huv to connect with ordinary java programs..but not with Ejb..
could u suggest some other options
priya
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But it explains huv to connect with ordinary java programs

Oh, I missed that.
Well, getting a database connection from an EJB is a FAQ so I'd do a search using keywords "EJB", "DataSource", "connection", and so on.
Basically, the steps needed are:
1. Configure a DataSource for your application server to point to the Access database. This procedure will contain defining a JNDI name for the DataSource
2. Configure a resource reference in your EJB's deployment descriptors (ejb-jar.xml and vendor-specific, e.g. weblogic-ejb-jar.xml)
3. Locate the DataSource object with a JNDI lookup and ask for a connection
4. Use the connection as you did in a standalone Java application
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Only JDBC ODBC bridge can be used to connect to MS access.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Priya, sorry about my somewhat irrelevant first reply. I was responding to another question in the JDBC forum and apparently didn't make the appropriate context switch...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!