I am trying to run a container managed EJB using MS Access (2000)as Database. Once I run the clinet application, I get the following exception. [Microsoft][ODBC Microsoft Access Driver]Optional feature not implemented at sun.jdbc.odbc.JdbcOdbc.createSQLException. I wanted to know whether MSAccess supports Container Managed Persistence or not? If it supports, please let me know what feature I should include?
smitha_rai The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements. Thanks.
Joined: Jul 28, 2000
Hi, I hope you are using the J2EE reference implementation. In this case I think that you will not be able to use the CMP for either Session or Entity beans. The default.properties file also has no reference to how i can connect to MSAccess. But if you are planning for BMP, I think it just is possible to do it and only with Entity Beans. This is because BMP is possible only for entity beans. You can do it by set it by having the Jdbc:ODBC driver in your classpath in the default.properties file. But I haven't ever tried it so I cannot say for sure.
Hi Smitha, In properties file of Weblogic,create one more connection pool like this. weblogic.jdbc.connectionPool.ODBCPool=\ url=jdbc dbc:dsnname,\ driver=sun.jdbc.odbc.JdbcOdbcDriver,\ loginDelaySecs=1,\ initialCapacity=4,\ maxCapacity=50,\ capacityIncrement=2,\ allowShrinking=true,\ shrinkPeriodMins=15,\ refreshMinutes=10,\ testTable=dual,\ props=user=;password=;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 dsnname=any dsn name you have created on your pc.If not created create one and put that name here. In EJB jar file give the reference of the ODBCPool as follows. This will work for session beans. Even I've tried with Excel Driver loaded on my m/c. <resource-ref> <res-ref-name>jdbc/ODBCPool</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref> Accesing the data as well as inserting in any table through the dsn is possible. I've not tried with Entity Bean.But I feel as per your query some exception is thrown and there should be some solution for the same.If I get it I'll come back to you.
Originally posted by Rahul Mahindrakar: smitha_rai The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements. Thanks.
Unfortunately "smitha" still doesn't cut it. You need both a first name (or initials) and a last name.