• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

stateless session beans and access db is it possible

 
sunil mirani
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys ...
i have a strange doubt ...is it possible to have a stateless session beans whic fetches records from ms access db is it possible .. the code compiles fine .. but on the j2ee server i get an error .. no suitable error ..
how do i go about this ..
thank you .. i advance
Sunil
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you can definitely connect to Access from a stateless session bean. What JDBC driver are you using? If you are just testing, you might want to try the JDBC/ODBC bridge. You start by setting up a DSN for the Access datasource on the App Server. But if you need something more "industrial strength" there are more scalable JDBC-ODBC drivers out there.
------------------
Sun Certified Programmer for the Java� 2 Platform
 
sunil mirani
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI ..
how do i do that on the jsdkee1.3 ??
also .. i have set the driver and i think it is fine .. but plz guide me .
now how do i write the map the JNDI name to the driver ,...
i am a new to ejb help ..!!!
Thanks ..
Sunil
 
Mahesh Kulkarni
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sunil,
If you are using the weblogic(5.1) server then set the properties as follows.This will create the pool for you.
Before that you have to create the DSN on your machine.
This is (jdbc dbc:javaODBC) DSN I've created on my machine.
weblogic.jdbc.connectionPool.ODBCPool=\
url=jdbc dbc:javaODBC,\
driver=sun.jdbc.odbc.JdbcOdbcDriver,\
loginDelaySecs=1,\
initialCapacity=4,\
maxCapacity=50,\
capacityIncrement=2,\
allowShrinking=true,\
shrinkPeriodMins=15,\
refreshMinutes=10,\
testTable=dual,\
props=user=scott;password=tiger;server=DEMO
# Add a TXDataSource for the connection pool:
weblogic.jdbc.TXDataSource.weblogic.jdbc.jts.ODBCPool=ODBCPool
#
# Add an ACL for the connection pool:
weblogic.allow.reserve.weblogic.jdbc.connectionPool.ODBCPool=everyone
This will give you pool named ODBCPool.You can use JNDI for lookup and get the connection through datasource.
I think this will help you a bit.
Bye,
Mahesh
 
sunil mirani
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Mahesh .. I'll try it today ..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic