Two Laptop Bag*
The moose likes EJB and other Java EE Technologies and the fly likes stateless session beans and access db is it possible Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "stateless session beans and access db is it possible" Watch "stateless session beans and access db is it possible" New topic
Author

stateless session beans and access db is it possible

sunil mirani
Ranch Hand

Joined: Jan 24, 2001
Posts: 36
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

Joined: Nov 22, 2008
Posts: 18944
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

Joined: Jan 24, 2001
Posts: 36
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

Joined: Jul 05, 2001
Posts: 62
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

Joined: Jan 24, 2001
Posts: 36
Thanks Mahesh .. I'll try it today ..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: stateless session beans and access db is it possible