2 Replies Latest reply on Dec 16, 2007 4:40 PM by pmuir

    Question about SEAM booking example

    yinglcs1

      Hi,

      In the SEAM documentation, it said

      The booking application uses JSF, EJB 3.0 and Seam, together with Facelets for the view. There is also a port
      of this application to JSF, Facelets, Seam, JavaBeans and Hibernate3.


      Can you please tell me where can I find the port of the example which uses 'JavaBeans and hibernate3?

      I can only find 'booking' and 'groovy-booking'.

      More over, can you please tell me what do I need to configure the database (e.g. mysql) to run the example?

      Thank you.

        • 1. Re: Question about SEAM booking example
          jbalunas

          Take a look at the JPA example - that runs completely outside of a J2ee env and is a version of the booking example. There are also examples there for several different application containers.

          As for how to get Mysql data source setup the easiest way might be to run seam gen and tell it that you are using mysql. Set what ever values you want for the other questions but answer the ones below. Check the seam-gen instructions for more information if needed.

          .....
           [input] What kind of database are you using? [mysql] (hsql, [mysql], oracle, postgres, mssql, db2, sybase, enterprisedb, )
          
           [input] Enter the Hibernate dialect for your database [org.hibernate.dialect.MySQLDialect] [org.hibernate.dialect.MySQLDialect]
          
           [input] Enter the filesystem path to the JDBC driver jar [lib/mysql.jar] [lib/mysql.jar]
          
           [input] Enter JDBC driver class for your database [com.mysql.jdbc.Driver] [com.mysql.jdbc.Driver]
          
           [input] Enter the JDBC URL for your database [jdbc:mysql:///youdbname] [jdbc:mysql:///yourdbname]
          
           [input] Enter database username [user] [user]
          
           [input] Enter database password [password] [password]
          .......
          


          Then have seam-gen create a new project.
          ./seam new-project

          Your options are then to use that generated project as a starting point, or extract from it the important bits for the mysql config (elements of persistence.xml and components.xml).

          • 2. Re: Question about SEAM booking example
            pmuir

            Bizarrely the hibernate only example (no JPA) is called hibernate2 ;)

            http://jira.jboss.com/jira/browse/JBSEAM-2387