Type: Feature Request
Status: Closed (View Workflow)
Affects Version/s: 2.0.0.BETA1
Fix Version/s: 2.1.2.CR1
Affects:Documentation (Ref Guide, User Guide, etc.), Compatibility/Configuration
Similar Issues:Show 10 results
JBSEAM-881 seam-gen suppport for Tomcat JBSEAM-904 Ajax4JSF support and validation in seam-gen JBSEAM-4319 seam-gen to support wicket JBSEAM-802 Support for code coverage (emma) in Seam-gen projects JBSEAM-1136 Support multiple projects in Seam Gen JBSEAM-1518 support for H2 in seam-gen JBSEAM-4974 Seam-gen uses not supported s:convertDateTime tags JBSEAM-3600 Support for Enums in layout/sort.xhtml in seam-gen. JBSEAM-4609 Add support for ManyToMany relations in seam-gen JBSEAM-4242 EAR projects for GlassFish generated by seam-gen not working
I believe that adding support for Glassfish will help promote the adoption of Seam. In my mind, Tomcat is not nearly as important because it is not a Java EE-compliant environment and seam-gen is all about creating compliant projects.
Supporting Glassfish is actually quite straightforward. There are a couple of assumptions that are made by seam-gen that render it incompatible with a generic Java EE-compliant application server. Here is what needs to change:
1. The java:/ prefix on the data source causes problems with other servers. This can be easily brought into compliance by adding <use-java-context>false</use-java-context> to the
ds.xml files and removing the java:/ prefix from the persistence.xml files in the seam-gen/resources/META-INF directory
2. Glassfish does not use Hibernate EntityManager as the default JPA provider, and therefore does not have any of its jar files. Of course, we could just make everyone copy necessary hibernate jar files into the glassfish installation directory, but that just isn't going to go over well. I think a better approach is to modify the build.xml file to copy the following three libraries if the property hibernate.needed=true is set:
jboss-archive-browsing.jar (not currently in the seam distribution, but stuck inside the jboss-embedded-all.jar file)
3. Make the hibernate.transaction.manager_lookup_class parameterized, perhaps asking during setup
4. Removing the .war suffix on the exploded archive directory (so that Glassfish can deploy the directory using asadmin deploydir)
That's it! Then you can have Glassfish working.