QCon SF Keynote: Techie VC's Talk About Trends & Opportunities
Kevin Efrusy and Salil Deshpande talk about what makes a business successful or not, presenting three actual cases they have been involved with: Hyperic, G2One, SpringSource.
Tracking change and innovation in the enterprise software development community
Posted by Srini Penchikala on Aug 25, 2008
JPA extension features like FetchGroups offered by Apache OpenJPA framework can give enterprise Java developers more flexibility in retrieving the data mapped to a graph of Java objects. Pratik Patel discussed the JPA design techniques for developing real-world Java applications using JPA API and Spring 2.5 framework. He did a presentation at the recent No Fluff Just Stuff (NFJS) Central Ohio Software Symposium on Enterprise JPA and Spring support for the persistence API.
Pratik also talked about organizing multiple persistence units (PU) and performance tuning techniques in Java applications that are using JPA API for persistence requirements. Pratik mentioned that EJB 3.0 Entities (formerly known as Entity Beans) use JPA which is based on the design concept of "POJO persistence". He said it's necessary in Java applications to use vendor specific extensions like "Fetch Groups" to do real JPA work.
Spring framework 2.5 version has good JPA integration with support for managing multiple persistence units and it makes JPA configuration more flexible by off-loading some of the JPA configuration details (like data source) from persistence.xml to Spring configuration files. The developers can use the extension points when using Spring to configure JPA for organizing a large code base into smaller modules. Also, Spring Test module has great support for unit and integration testing of JPA classes (for example AbstractJpaTests). AbstractJpaTests class uses a shadowing classloader to enhance classes on the fly. It wraps each test method around a transaction and also provides a helper for declaring base Application Contexts. Spring JPA module provides (LocalContainerEntityManagerFactoryBean) for unit testing JPA logic outside the container.
Speaking of Locking, Pratik said that JPA specification defaults to optimistic locking. Developers can use pessimistic locking but they will need to define the lock manager using EntityManager's lock() or find() methods. JPA also uses a "version" based approach to track any updates to the data in memory. This requires that there is a @Version attribute defined in the persistent classes and a Version column created in the database table. Avoid Pessimistic Locking since the pessimistic locks affect the throughput and it's difficult to recover from bad locks.
Pratik demonstrated JPA API usage and performance tuning using @FetchGroup and @FetchPlan annotations provided by Apache OpenJPA framework. He also talked about unit and integration testing of fetching logic and recommended to test the fetch groups code to prevent any last minute surprises when the application code is promoted to production environment.
Regarding the JPA best practices, he asked the developers to consider the techniques like using an in-memory database (like HSQL DB) to eliminate mock DAO implementations. The trade-off is that connecting to an in-memory database will take little more unit test time, but there will be less code and development effort. Other best practices include evaluating generated SQL which gives a good insight into the SQL queries generated by the ORM tool. Another thing to consider is the DDL generation since all JPA implementations allow generation of DDL which can be used for rapid development. Other items to consider when using JPA API for persistence are:
In another JPA related presentation, Pratik discussed the JPA Query Language (JPAQL) which has features like natural Object Oriented (OO) querying and bulk updates and deletes. JPAQL is similar to other query languages like JDOQL and HQL, but it's limited compared to HQL. For lazy relationships, FETCH JOIN expression comes handy to fetch the associated details along with the master table data. He also talked about the new features in JPA 2.0 specification like:
JBoss versus IBM WebSphere: Cost, Performance, Efficiency, Innovation (IBM wins)
Comparing WebLogic, WebSphere, Oracle, and Open Source Application Servers
Consolidation and Virtualization Are NOT Enough: The Case for Non-x86
Redbook: WebSphere Application Server V7.0: Planning, Concepts, and Design
Lean development governance whitepaper by Scott Ambler and Per Kroll
Kevin Efrusy and Salil Deshpande talk about what makes a business successful or not, presenting three actual cases they have been involved with: Hyperic, G2One, SpringSource.
InfoQ talks to Mark Fisher, project lead for the Spring Integration project, about the framework.
Peter Lubbers explains in this article how HTML5 Web Sockets interact with proxy servers, and what proxy configuration or updates are needed for the Web Sockets traffic to go through.
Neal Ford shows what ThoughtWorks learned from scaling Rails development: infrastructure, testing, messaging, optimization, performance.
Stuart Halloway discusses Clojure and functional programing on the JVM in depth, and touches on the uses of a number of other modern JVM languages including JRuby, Groovy, Scala and Haskell.
Oren Teich and Blake Mizerany talk about the technology behind Heroku and the benefits of the new add-on system.
Chris Riley presents security issues threatening service based systems, examining security threats, presenting measures to reduce the risks, and mentioning available security frameworks.
This talk investigates technical issues encountered when moving to an Agile process.
No comments
Watch Thread Reply