Version 3

    Datasource and Hibernate Configuration

    JBoss EJB 3.0 is built on top of Hibernate 3.0.  To configure the datasource your entity beans will use requires creating a file.  There is a default file for every EJB 3.0 deployment in the package ejb3.deployer/META-INF/


    Please refer to the Hibernate 3.0 documentation in this distribution for how to configure the values in the file.  Here's a little explanation though:




    The above is the default that will be used for your EJB 3.0 applications ejb3.deployer/META-INF/


    hibernate.connection.datasource points to the JNDI name of the JBoss datasource.


    hibernate.dialect By default is Hypersonic SQL, but you can change it to other dialects like Oracle.  Consult the Hibernate 3.0 documentation.

  Creates the database schema on deploy, deletes it on undeploy.


    hibernate.transaction.manager_lookup_class defines Hibernates transaction management.  It should not change from the above value.


    hibernate.cache.provider_class Defines the caching architecture that Hibernate should use.  You may want to consider JBoss Cache if you're using this in a cluster.

  Per Deployment

    You will probably need to override the default file.  To do this, create your own file with all the above variables defined in minimum.  Place this file the META-INF/ directory of your .ejb3 jar or within your EAR file.