3

I've got a java server (not web based, more like a big, many-threaded standalone application) that needs to talk to a MS SQL Server database.

I just worked on a different project that ported a home-grown O/R layer from oracle to SQL Server, and it ran into significant problems because of too many oracle assumptions (locking, mostly). So What O/R layer should I use?

Edit: I have heard of Hibernate, but everything else is useful! Specifically though, do any of these APIs/frameworks help with the peculiar shortcomings of SQL Servers locking strategy in a multi-threaded environment?

5 Answers 5

6

Hibernate is the usual choice. Besides that you can take a look at Oracle TopLink, iBatis, whatever suites you best.

Sign up to request clarification or add additional context in comments.

1 Comment

Are any of them particularly suited to the stated conditions? Multi-threaded (with contention) and SQL Server?
2

I've used Hibernate and iBATIS. Choosing one over the other depends upon the situation.

Hibernate:

  • is much pickier about database schema
  • generates most of the sql for you
  • more features
  • more complex

iBATIS:

  • works better when you want to work with existing schema
  • requires you to write your own sql
  • easier to learn

They both work well with SQL Server and handle multi threading.

1 Comment

Although the original problem is no longer relevant, this answer most directly attempts to answer the question.
2

I suggest Cayenne.It supports a lots of databases. It is open source,too. But there is no so much documents. You can use cayenne with struts.

1 Comment

Obviously, this is necromancy to comment now. But Cayenne has come a long way now. Good documentation is there and very quick community support on their mailing list.
1

I have also used BEA Kodo with Microsoft SQL Server (back when it was Solarmetric Kodo). At the time, it was far more feature rich than Hibernate and any JDO implementation. That's no longer the case, though it still has a number of unique performance/scalability features.

Hibernate is the most popular one available today. My personal favorite is TopLink.

The key standards you want to look for are EJB3, Java Persistance API (JPA), and Java Data Objects (JDO). JPA is probably the most important of the bunch as its easier to use and is meant as a common API for using Hibernate, JDO, Toplink, EJB3, etc.

Comments

0

Hibernate is good. But there are different flavors of Hibernate implementation. I suggest Hibernate 3.x (3.2?) with JPA. I also usually use Spring 2.5 as the framework for the business logic. Hibernate and Spring work especially well together, because they can share name resolving scopes to a degree, which lesses the confusion on how to accesses O/R objects.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.