The example project and templates projects, all available for download, are pre-configured and tested on our reference platform which features:
Other environments on which our framework was tested for production is available through the portfolio page.
A SmartWeb based web application can be deployed both as Web Archive (.war) or Enterprise Application Archive (.ear). Whatever form you decide to deploy your application at least one Hibernate Configuration File (.hcf) must be available into the META-INF folder of the main archive, by default it should be named smartweb.hcf.
Our .hcf files are Hibernate configuration files, totally adhering to the hibernate.cfg.xml specs apart for the naming schema.
META-INF | | application.xml (standard J2EE application descriptor) | smartweb.hcf (hibernate configuration file) | application.war | | | + META-INF | | | | | | MANIFEST.MF (put your dependancies here) | | | + WEB-INF | | | | | | web.xml (standard J2EE web application descriptor) | | | {custom tag descriptors} | | | {struts configuration files} | | | | {web application contents} | | application.jar smartweb.jar | {other nedeed libraries}
META-INF | | MANIFEST.MF (put your dependancies here) | smartweb.hcf (hibernate configuration file) | WEB-INF (put here) | | web.xml (standard J2EE web application descriptor) | {custom tag descriptors} | {struts configuration files} | + lib | | | | application.jar | | smartweb.jar | | {other nedeed libraries} | {web application contents}
The example project requires a datasource defined into the running environment through the JNDI binding jdbc/smartweb. If you need to configure the binding you need to alter the META-INF/smartweb.hcf file contained into the smartweb-example.ear archive.
SmartWeb uses the Hibernate to map Java classes to database tables so to use another databse engine like Oracle or MySQL you need to alter the database dialect configured into the .hcf file.
If you wish to deploy the examples under other application servers you need to alter the transaction manager class configured into the .hcf file.
If you use Tomcat as servlet container (or any other container which doesn't allow runtime manipulation of the JNDI tree) you must disable the SessionFactory JNDI binding removing the name attribute from the session-factory tag into the .hcf file.
If you want to try the framework in a clustered environment we strongly suggest to verify the second level cache library you need and configure it into the .hcf file.
The example project could be used as a template to develop new applications based on the framework.
This project uses the JBoss IDE plugins set available through the JBoss website.