Bugs item #20472, was opened at 2008-06-01 22:41
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=7857&aid=20472&group_id=2014
Category: AR-JDBC
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 3
Submitted By: Leigh Kennedy (lkennedy)
Assigned to: Nobody (None)
Summary: jdbc_mssql.rb owns all JTDS connections
Initial Comment:
I was trying to get Sybase support up and running via the JTDS driver. This
driver supports both Sybase and MS-SQL server.
It seems to me that the way the driver has been implemented any connection
using the JTDS driver will automatically pass to the ms driver. I may be
wrong, but I'm guessing it processes them in the order listed in the
jdbc_adapter_spec.rb file.
Any ideas on how to have one jdbc driver support 2 databases ?
Change this around would just move the problem as far as I can see.
Eg:
(from jdbc_mssql.rb)
[/sqlserver|tds/i, lambda {|cfg,adapt| adapt.extend(::JdbcSpec::MsSQL)}]
(from jdbc_sybase.rb - what I'm working on, which is based on the above)
[/sybase|tds/i, lambda {|cfg,adapt| adapt.extend(::JdbcSpec::Sybase)}]
----------------------------------------------------------------------
Comment By: Ryan Bell (kofno)
Date: 2008-06-09 23:48
Message:
I committed the change and I'm closing the issue.
Leigh,
Please re-open if this doesn't work for you.
----------------------------------------------------------------------
Comment By: Ryan Bell (kofno)
Date: 2008-06-09 23:37
Message:
OK, I think I'm just going to add an optional parameter to the config hash.
I'll call it :dialect and it can be used to override the default adapter
selection in jdbc_adapter file. This has two other good cases: Support for
re-branded drivers and it makes more sense to :dialect, rather then :driver
when using the JNDI adapter.
----------------------------------------------------------------------
Comment By: Leigh Kennedy (lkennedy)
Date: 2008-06-04 19:57
Message:
Can Do !
----------------------------------------------------------------------
Comment By: Ryan Bell (kofno)
Date: 2008-06-04 19:52
Message:
If this still needs to be done, I can look into it. I would need someone
(Leigh, perhaps) to verify the fix though.
----------------------------------------------------------------------
Comment By: Leigh Kennedy (lkennedy)
Date: 2008-06-04 19:44
Message:
I should add, I've no reason to think this issue would arise with the Sybase
provided driver(although I haven't tested it yet) or the MS provided one, just
the
free jtds driver.
----------------------------------------------------------------------
Comment By: Nick Sieger (nicksieger)
Date: 2008-06-02 13:48
Message:
Seems like we need to make a way to differentiate. Perhaps we can create
activerecord-jdbcsybase-adapter or something like that to allow you to put
"adapter: jdbcsybase" in your database.yml (vs. "adapter: jdbcmssql" or
something else). The jdbcsybase code would be written in such a way as to
ensure that the sybase-specific stuff would get loaded in. Anyone interested in
taking a crack at this?
----------------------------------------------------------------------
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=7857&aid=20472&group_id=2014
_______________________________________________
Jruby-extras-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/jruby-extras-devel