667481 members! Sign up to stay informed.

Sponsored Links


Resources

Enterprise Java
Research Library

Get Java white papers, product information, case studies and webcasts

News News News Messages: 14 Messages: 14 Messages: 14 Printer friendly Printer friendly Printer friendly Post reply Post reply Post reply XML XML XML

The SQL Server Team has released a new JDBC Driver for SQL Server

Posted by: Mugunthan Mugundan on October 15, 2007 DIGG
Microsoft SQL Server today announced the general availability of the SQL Server 2005 JDBC v1.2 driver has been released. This release continues Microsoft's commitment to the Java community and non-Microsoft centric programming platforms. The driver can be found at http://msdn.microsoft.com/data/jdbc.

In this release, we have re-architected the communication stack resulting in significant performance and scalability improvements, as well as minimizing the driver memory footprint usage. This is especially true with multiple active connections and result sets. The new driver also has improved streaming capabilities. These enhancements are most visible when the "responseBuffering=adaptive" connection property is used.

As part of Microsoft’s continual commitment to security, the new driver supports SQL Server SSL encryption. The driver also introduced a new global tightly coupled XA transaction ID support when used with the following hotfix for the Microsoft DTC component http://support.microsoft.com/kb/938653.

The SQL Server JDBC team continually monitors TheServerSide threads and would love to get your feedback on the driver for future releases as well as areas where we can help improve Java/JDBC connectivity to SQL Server, so do let us know what you think?

Threaded replies

·  The SQL Server Team has released a new JDBC Driver for SQL Server by Mugunthan Mugundan on Mon Oct 15 12:12:38 EDT 2007
  ·  Re: The SQL Server Team has released a new JDBC Driver for SQL Server by David McCoy on Mon Oct 15 13:00:09 EDT 2007
    ·  How does this new Driver stand up against JTDS by Kevin Schmidt on Mon Oct 15 13:11:08 EDT 2007
      ·  JTDS doesn't support XA by Michael Cervantes on Mon Oct 15 14:42:44 EDT 2007
        ·  Who trusts XA?? by R F on Tue Oct 16 16:35:02 EDT 2007
          ·  I trust XA much more than without it... by Scott McCrory on Wed Oct 17 12:58:50 EDT 2007
      ·  Re: How does this new Driver stand up against JTDS by Antonio Petrelli on Tue Oct 16 03:38:50 EDT 2007
        ·  Re: How does this new Driver stand up against JTDS by Scott McCrory on Tue Oct 16 07:27:28 EDT 2007
  ·  Re: The SQL Server Team has released a new JDBC Driver for SQL S by random fletch on Wed Oct 17 16:43:08 EDT 2007
  ·  Which IDE do MS developers use for java developement like this? by Alex Hornby on Wed Oct 17 17:16:11 EDT 2007
  ·  but XA still does not work when SQL SERVER runs on XP! by Gerald Loeffler on Thu Oct 18 06:18:42 EDT 2007
    ·  Re: but XA still does not work when SQL SERVER runs on XP! by Scott McCrory on Thu Oct 18 12:09:12 EDT 2007
    ·  XA support in XP by Mugunthan Mugundan on Fri Oct 19 13:46:03 EDT 2007
  ·  getGeneratedKeys() by Emmanuel Bourg on Sun Oct 21 06:00:06 EDT 2007
    ·  Re: getGeneratedKeys() by Mugunthan Mugundan on Tue Oct 23 11:56:35 EDT 2007
  Message #241228 Post reply Post reply Post reply Go to top Go to top Go to top

Re: The SQL Server Team has released a new JDBC Driver for SQL Server

Posted by: David McCoy on October 15, 2007 in response to Message #241140
I recently worked on a project that runs on SQL Server and Hibernate 3. I'm sure the teams looks forward to trying out your driver and thanks you for your effort.

  Message #241229 Post reply Post reply Post reply Go to top Go to top Go to top

How does this new Driver stand up against JTDS

Posted by: Kevin Schmidt on October 15, 2007 in response to Message #241228
Just wondering, how does your driver compare with the JTDS open source driver? Any benchmarks, or even feature comparisons?

  Message #241239 Post reply Post reply Post reply Go to top Go to top Go to top

JTDS doesn't support XA

Posted by: Michael Cervantes on October 15, 2007 in response to Message #241229
I can think of two major advantages of the MS driver over JTDS:

1) True XA support
2) Support for SQL2k5 mirroring (failover)

  Message #241249 Post reply Post reply Post reply Go to top Go to top Go to top

Re: How does this new Driver stand up against JTDS

Posted by: Antonio Petrelli on October 16, 2007 in response to Message #241229
Just wondering, how does your driver compare with the JTDS open source driver? Any benchmarks, or even feature comparisons?


I was using the Microsoft driver some years ago, then I switched IMMEDIATELY when I found jTDS, since the Microsoft one was doomed with lots of bugs.
I hope that those bugs have been fixed...
(I wonder how much will this post last, until it will be deleted :-) )

Antonio

  Message #241259 Post reply Post reply Post reply Go to top Go to top Go to top

Re: How does this new Driver stand up against JTDS

Posted by: Scott McCrory on October 16, 2007 in response to Message #241249
Most people I know who are connecting to MS SQL Server are using the jTDS driver for performance and reliability, but would be willing to consider Microsoft's driver again.

Let the testing begin....

  Message #241293 Post reply Post reply Post reply Go to top Go to top Go to top

Who trusts XA??

Posted by: R F on October 16, 2007 in response to Message #241239
Automatic failover would be great, but I'm not so sure about the true value of XA.

Tell me one transactional container that handles this well:
a) Phase-1 commit, to server A
b) Phase-1 commit, to server B
c) Phase-2 commit, to server A
d) Phase-2 commit to server B is about to happen, but server B goes down

c) and d) are supposed to happen atomically but there's always a slight lag between the two. After c) is sent, you can't roll it back anymore.

All XA is is a programming convenience, for which you pay a high performance cost.

  Message #241338 Post reply Post reply Post reply Go to top Go to top Go to top

I trust XA much more than without it...

Posted by: Scott McCrory on October 17, 2007 in response to Message #241293
The time between steps (c) and (d) is usually much, much shorter than that between (a) and (b). For example, suppose trivial operation (a) takes 1 second and complex operation (b) takes 15 seconds. WITHOUT XA, you have a 15 second window where something could go wrong. WITH XA, it's typically mere miliseconds. Yes, there is overhead and you need to watch out for locking problems, but for some applications (i.e. banking, physical security...) it's totally worth the tradeoff.

  Message #241349 Post reply Post reply Post reply Go to top Go to top Go to top

Re: The SQL Server Team has released a new JDBC Driver for SQL S

Posted by: random fletch on October 17, 2007 in response to Message #241140
Nice work guys. We've been using the 1.1 version of the SQL Server drivers and they're working a treat. Looking forward to upgrading.

  Message #241350 Post reply Post reply Post reply Go to top Go to top Go to top

Which IDE do MS developers use for java developement like this?

Posted by: Alex Hornby on October 17, 2007 in response to Message #241140
Given the announced retirement of J# from Visual Studio this should be a live question again :)

  Message #241368 Post reply Post reply Post reply Go to top Go to top Go to top

but XA still does not work when SQL SERVER runs on XP!

Posted by: Gerald Loeffler on October 18, 2007 in response to Message #241140
i recently wasted a significant part of my life wrestling "true" XA off SQL SERVER only to find out that XA does *not* work if SQL SERVER (2005 in our case) runs on Windows XP (the MS JDBC driver consistently throws an exception when asked to init an XA transaction (Error: xp_sqljdbc_xa_init failure, status:0 msg:*** SQLJDBC_XA DTC_ERROR Context: xa_init, state=1)).

Even with this brand-new JDBC driver, MS themselves state in their release notes
-----------------
6) XA TRANSACTION FAILURE ON WINDOWS XP

XA transactions will not work if SQL Server is running on Windows XP unless the following hotfix is applied:

"Performance Slows When You Use XA Transactions with SQL Server"
http://support.microsoft.com/kb/318818

Note this issue only applies when the SQL Server that is participating in the XA transaction is running on Windows XP.
-----------------
However, the hotfix referred to is not for XP (and anyways should have found it's way into a windows service-pack by now). In addition, the problem reported for this hotfix is not outright failure of XA. Still, they file this under "XA TRANSACTION FAILURE ON WINDOWS XP". It's all an unholy mess.

Other people have also reported similar problems:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=262525&SiteID=1

At the end of this page

http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/rtrb_dsaccess4.html

IBM describe a cracy but plausible fix which i've tried but which didn't solve the issue at all.

So: i conclude XA still doesn't work if SQL SERVER runs on Windows XP - even with this new JDBC driver.

From the verbosity of this posting you can deduce what an unexpected nerve-wracking experience this was. I mean: problems with XA on a RDBMS in 2007 - you must be joking...or so i thought.

regards,
gerald

http://www.gerald-loeffler.net

  Message #241389 Post reply Post reply Post reply Go to top Go to top Go to top

Re: but XA still does not work when SQL SERVER runs on XP!

Posted by: Scott McCrory on October 18, 2007 in response to Message #241368
Thanks for the post Gerald - good to know.

  Message #241439 Post reply Post reply Post reply Go to top Go to top Go to top

XA support in XP

Posted by: Mugunthan Mugundan on October 19, 2007 in response to Message #241368
Sorry about this Gerard, it looks like the readme needs to be updated. You should try this hotfix for XP
http://support.microsoft.com/kb/922668
If you are still getting problems, please reply to this mail. I will follow up.
Mugunthan

  Message #241464 Post reply Post reply Post reply Go to top Go to top Go to top

getGeneratedKeys()

Posted by: Emmanuel Bourg on October 21, 2007 in response to Message #241140
Is getGeneratedKeys() working with this new release or do we still have to issue a SELECT @@IDENTITY after an INSERT ?

  Message #241530 Post reply Post reply Post reply Go to top Go to top Go to top

Re: getGeneratedKeys()

Posted by: Mugunthan Mugundan on October 23, 2007 in response to Message #241464
This should work. What exact case is not working for you? Can you provide a snippet that does not work?

New content on TheServerSide.comNew content on TheServerSide.comNew content on TheServerSide.com

Dependency Injection in Java EE 6 - Part 1

Reza Rahman explores the features of the proposed JSR 299, Contexts and Dependency Injection for Java EE (CDI). When approved, it promises to be a key feature of Java EE 6. (November 2, Article)

SAML: It's Not just for Web services

SAML is an XML-based standard for exchanging authentication and authorization data between security domains. The single most important problem that SAML was created to solve is the Web browser Single Sign-On problem. Many organizations are debating whether to stay with version 1.1 or move to 2.0. This article makes observations about both options. (September 28, Article)

Programming is Also Teaching Your Team

Joe Ottinger takes a look at how people learn, and applies it to the practice of programming. He notes that understanding how people learn is an essential part of working in a programming team. (September 22, Article)

Can Java EE Deliver The Asynchronous Web?

Stephen Maryka gave us an article about the Asynchronous Web and posed a number of questions that get examined like an approach to delivering Asynchronous Web capabilities through extensions to existing Java EE technologies. (July 14, Article)

JSF Flex

JavaServer Faces Flex goal is to provide users capability in creating standard Flex components, part of flexSDK which is open sourced through MPL license, as normal JSF components. This article by Ji Hoon Kim will provide an overview of creating a simple multilingual JSF page consisting of JSF Flex tags. (June 29, Article)

The Rules of SOA - A Road to a Successful SOA Implementation

In this session Jeff explores the key characteristics of successful SOA projects. He covers some of the patterns, and anti-patterns, tool sets, and strategies that he himself learned the hard way. Last, he provides a strategy and blueprint for achieving a high likelihood of success in your SOA project. (June 23, Tech Talk)

Ari Zilka Talks About Terracotta 3.1

Ari Zilka, CTO of Terracotta, Inc., talks about the new features in Terracotta 3.1, announced during JavaOne and available now. (June 15, Tech Talk)

Enterprise Application Integration, and Spring

In this Tech Talk, Josh Long explores an integration challenge using Spring Integration and walks through the implementation, employing and expanding on the basic patterns of Enterprise Application Integration to tie together components into a function integration solution, and then demonstrates how Spring Integration helps address the integration requirements. (June 15, Tech Talk)

Google Web Toolkit: An Introduction

In this Tech Talk, David Geary teaches you: The basics of Google Web Toolkit; How to implement Ajax-enabled applications in Java; Internationalization; Hooking into the browser history mechanism; Remote procedure calls. (June 4, Tech Talk)

Just Enough Early Architecture to Guide Development

Jon Kern discusses the best architecture/technical solutions and ensure that they are repeated by all developers. By tackling the architecture up-front in a serial manner, subsequent parallel development will be much more manageable and predictable. (May 28, Tech Talk)

Productive Programmer: On the Lam from the Furniture Police

This keynote describes the frustrations of modern knowledge workers in their quest to actually get some work done, and solutions for how to guard yourself against all those distractions. Neal Ford talks about environments, coding, acceleration, automation, and avoiding repetition as ways to defeat the misguided attempts to sap your ability to produce good work. (May 26, Tech Talk)

Auto-Scaling Your Existing Web Application

Gil demonstrates how new, aggressive uses of already abundant compute capacity by common applications offer competitive value for application designers. (May 21, Tech Talk)

Automating Hibernate Mapping and Queries For Java Web Development

Chris Keene introduces WaveMaker as a new way to automate the ability to generate Hibernate classes in order to more quickly bring OR mapping into an application. (May 19, Article)

Auto-Scaling Your Existing Web Application

In this session Nati Shalom demonstrates how to take a standard Java EE web application and scale it out or down dynamically without changes to the application code. Seeing as most web applications are over-provisioned to meet infrequent peak loads, this is a dramatic change because it enables growing your application as needed, when needed, without paying for unutilized resources. (May 19, Tech Talk)

Free Book PDF Download: Mastering EJB Third Edition

Mastering EJB was one of the original and most influential EJB books in the industry. Mastering EJB III now returns with two new expert co-authors, updated for EJB 2.1 and 30% new chapters including security, integration, best practices, open source, and more.
(Book PDF Download)

Application Server Matrix

The Application Server Matrix is a detailed listing of J2EE vendors and their application server products, with information on latest version numbers, J2EE spec support and licensing, pricing, platform support, and links to product downloads and reviews.
(Application Server Comparison Matrix)

News | Blogs | Discussions | Tech talks | Patterns | Reviews | White Papers | Downloads | Articles | Media kit | About
Java Solutions
All Content Copyright ©2007 TheServerSide Privacy Policy
Site Map