This post originated from an RSS feed registered with Java Buzz
by dion.
Original Post: TOPLink Spring Integration
Feed Title: techno.blog(Dion)
Feed URL: http://feeds.feedburner.com/dion
Feed Description: blogging about life the universe and everything tech
The Spring and Oracle teams have put together Spring TOPLink integration.
This integration is similar to what you have with JDO, iBATIS, Hibernate, etc.
E.g.
public class MyDAOImpl extends TopLinkDaoSupport implements DAOInterface
{
public Object doTopLinkOperation()
{
return getTopLinkTemplate().execute(
new TopLinkCallback() {
public Object doInTopLink(Session session) throws TopLinkException
{
// this Session is managed externally.
// It is "injected" by the currently referenced SessionFactory
}
});
}
}
And:
public class MyDAOImpl extends TopLinkDaoSupport implements DAOInterface {
public Object doTopLinkOperation() {
return getTopLinkTemplate().findByNamedQuery("findMyself",Person.class,args);
}
}
Read more: What is the Spring TopLink Integration?