领先一步
VMware 提供培训和认证,助您加速进步。
了解更多欢迎阅读又一期《Spring 本周动态》!本期内容通过整合网络上的大量精彩内容汇编而成。如果您有内容建议,或者只是想直接了解我们发布的部分内容,请在 Twitter 和 Google+ 上关注我们。和往常一样,有很多内容需要介绍,让我们开始吧。
The video from Spring Data Neo4J lead Michael Hunger's excellent webinar <a href = "http://www.springsource.org/node/3632">introducing Spring Data Neo4j</a> is also available.
VMWare 工程师 Jerry Kuch 的网络研讨会视频也已发布,该研讨会提供了关于 RabbitMQ 新功能的更新。最后,Ken Rimple、Srini Penchikala 和我一起进行的关于如何更充分地利用 Spring Roo 的交互式插件机制的网络研讨会视频也已发布。
<LI> Remember our pal Tobias Trelle? He's got another fantastic article that's been published on InfoQ called <a href = "http://www.infoq.com/articles/spring-data-intro"><EM>Spring Data - One API to Rule Them All?</EM></a></LI>
Note that this sort of code is ideal for delivery as a AOP Aspect.
</LI>
HibernateTemplate 来处理 Hibernate 的懒加载功能。这是一篇很棒的文章,但值得一提的是,HibernateTemplate 已不再是处理 Hibernate 的首选方式。取而代之的是,只需创建一个 HibernateTransactionManager 实例,并使用 LocalSessionFactoryBean (支持 Hibernate 3 和 Hibernate 4) 构建一个 SessionFactory,然后就可以完成了。一个很好的例子,请查看这个示例应用程序,它演示了 Hibernate 4。您可以使用 Hibernate 的线程本地会话 API (自 Hibernate 3.x 后期版本起就可用)。要特别处理懒加载,请查看 Hibernate.initialize(Object)。JmsTemplate 使得使用 JMS 进行消息的 send 和 receive 操作非常简单。如果您想异步接收消息,则应考虑 MessageListenerContainer 的实现。如果您将在 Java EE 应用服务器 (通常提供连接工厂池) 之外使用 JmsTemplate 接收消息,请考虑使用 CachingConnectionFactory 的实现来包装原始的 JMS 连接工厂。默认情况下,JmsTemplate 会处理与 JMS API 相关的所有繁琐的资源获取和销毁逻辑。这包括关闭连接工厂和会话,如果资源被实际关闭而不是简单地返回到稍后会重用的池中,这可能会很昂贵。 You know what I love the most about this post, though? Not only does the post articulate the correct strategies for working with Spring, but the blogger even went to the Apache Wiki's and corrected them where appropriate! Nice job, great post, and even greater initiative!