thanks Larry. it works.

implemented it with help of Spring.
 <bean id="dataSource" class="MyDatasource" destroy-method="close">
   <constructor-arg><ref bean="realDataSource"/></constructor-arg>
 </bean>
The real data source is my normal data source.
Then in the MyDatasource i had this :
   Connection ori = getTargetDataSource().getConnection();
   C3P0NativeJdbcExtractor extractor = new C3P0NativeJdbcExtractor ();
   Connection original = extractor.getNativeConnection(ori);
   if (original instanceof ExtEmbeddedConnection) {
     ExtEmbeddedConnection embedConn = (ExtEmbeddedConnection) original;
     if (!embedConn.unlock(DDTEK_DRIVER_PASSWORD)) {
       throw new SQLException("unable to unlock branded driver");
     }
   }
   return original;

then it worked.

thanks a lot Larry for all the help.

regards
Ashok
On 4/30/07, Larry Meadors <[EMAIL PROTECTED]> wrote:

Yeah, it'll work. You may need to do a little plumbing, but it
shouldn't be too difficult.

My guess is that you'll need to create a data source / data source
factory, and make your required function call there. I think I'd use a
proxy on an existing data source implementation.

Larry


On 4/30/07, Ashok Madhavan <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I am using iBatis. it works great and i love it.
>
> in my project i need to use a embedded ( branded ) driver from data
direct.
> Does iBatis support these embedded JDBC connections.
>
> this link provides more information
> http://www.datadirect.com/support/oem_embedding/index.ssp
>
> Quoting from that link :
> In order to use your DataDirect OEM drivers, your application must first
> invoke the drivers by sending a special function call with the required
> password to the OEM product license file. You will need to make this
> function call immediately after each call to connect to the database. If
> your customers attempt to use your OEM products with any other
third-party
> applications, an error message will be returned.
>
>
> Has anybody used datadirect embedded jdbc drivers ? any pointers would
be
> welcome.
>
> regards
> Ashok
>

Reply via email to