Thursday, December 27, 2007

Kooking Seam-gen with Glassfish

Seam is an application framework for Enterprise Java. It simplifies enterprise application development. However configuring seam to work with appservers other that Jboss is a complex process. Following are the summary of issues I faced when working with the code generated by Seam-Gen
  1. Seam-gen ejb version does not really generate EJB code
  2. JNDI naming conventions for GLASSFISH does not follow that of Jboss. Each ejb has to be mentioned at-lease twice in the web.xml
  3. Seam proposes that the injection of Entitymanger should be left to Seam. One of the argument is that seam has better transaction management which is compatible with Seam conversations.
    • This requires that we enable Seam Managed Transactions
    • Consequence is EjbSynchronizations provided by Seam has to be deployed
  4. Seam managed transactions require Manual Flush mode to be enabled. Incidentally Hibernate is the only JPA provider which supports manual flush
Conclusion :
Seam provides power full features for Enterprise development. There are few startup issues while working in non-jboss servers. Give the benefits of seam the limitations are negligible.
Note : For detailed discussion on how to address the above issues refer to my previous blog Kooking Seam with Glassfish

No comments: