Lee, in my hibernate.har folder the structure is: hibernate.har -hibernate.cfg.xml -META-INF/hibernate-service.xml -test/ (*.hbm.xml,*.class) -WEB-INF/lib/here I have my database driver and ehcache.(jar/xml)
hibernate.cfg.xml | <hibernate-configuration> | | <session-factory> | <!-- Use a Tomcat JNDI datasource --> | <!--<mapping resource="test/User.hbm.xml"/> | <mapping resource="test/Artist.hbm.xml"/> | <mapping resource="test/ArtistImages.hbm.xml"/> | <mapping resource="test/Stock.hbm.xml"/> | <mapping resource="test/StockImages.hbm.xml"/> | <mapping resource="test/Order.hbm.xml"/> | <mapping resource="test/OrderItem.hbm.xml"/>--> | | <class-cache class="test.Order" usage="transactional"/> | <collection-cache collection="test.Order.OrderItems" usage="transactional"/> | <class-cache class="test.Artist" usage="transactional"/> | <collection-cache collection="test.Artist.ArtistImages" usage="transactional"/> | <class-cache class="test.User" usage="transactional"/> | <collection-cache collection="test.User.ArtistChoice" usage="transactional"/> | <class-cache class="test.Stock" usage="transactional"/> | <collection-cache collection="test.Stock.StockImages" usage="transactional"/> | </session-factory> | | </hibernate-configuration> | I have quoted out the mapping resource lines because the *.hbm.xml files are automatically picked up. But it will not harm if you do decide to list them. hibernate-service.xml | <server> | <mbean code="org.jboss.hibernate.jmx.Hibernate" name="jboss.har:service=Hibernate"> | <depends>jboss.jca:service=RARDeployer</depends> | <depends>jboss.jca:service=LocalTxCM,name=PostgresDS</depends> | <attribute name="SessionFactoryName">java:/hibernate/SessionFactory</attribute> | <attribute name="DatasourceName">java:/PostgresDS</attribute> | <attribute name="Dialect">net.sf.hibernate.dialect.PostgreSQLDialect</attribute> | <attribute name="CacheProviderClass">net.sf.ehcache.hibernate.Provider</attribute> | <!-- Turn this on and set the value to update if you want all the tables to be updated by hibernate --> | <!-- or create-drop if you want the tables to be re-generated --> | <attribute name="Hbm2ddlAuto"></attribute> | <attribute name="ShowSqlEnabled">true</attribute> | <attribute name="JdbcBatchSize">25</attribute> | </mbean> | </server> | I hope this helps beya! View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3862102#3862102 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3862102 ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ JBoss-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jboss-user
