| Code: |
|
<?xml version="1.0" encoding="UTF-8"?> <service> <mbean code="net.sf.hibernate.jmx.HibernateService" name="jboss.jca:service=Hibernate"> <depends>jboss.jca:service=RARDeployer</depends> <depends>jboss.jca:service=LocalTxCM,name=myapp/DataSource</depends> <attribute name="JndiName">java:/myapp/HibernateFactory</attribute> (1) <attribute name="Datasource">java:/myapp/DataSource</attribute> (2) <attribute name="Dialect">net.sf.hibernate.dialect.PostgreSQLDialect</attribute> (3) <attribute name="MapResources"> (4) com/mycompany/myapp/classes/User.hbm.xml, com/mycompany/myapp/classes/Role.hbm.xml, com/mycompany/myapp/classes/Permission.hbm.xml </attribute> <attribute name="CacheProvider">net.sf.ehcache.hibernate.Provider</attribute> <attribute name="TransactionStrategy">net.sf.hibernate.transaction.JTATransactionFactory</attribute> <attribute name="TransactionManagerLookupStrategy">net.sf.hibernate.transaction.JBossTransactionManagerLookup</attribute> <attribute name="UserTransactionName">java:/UserTransaction</attribute> <attribute name="ShowSql">false</attribute> </mbean> </service> |
| Code: |
|
<?xml version="1.0" encoding="UTF-8"?> <!-- ===================================================================== --> <!-- --> <!-- JBoss Server Configuration --> <!-- --> <!-- ===================================================================== --> <!-- $Id: postgres-ds.xml,v 1.1 2004/06/23 20:42:04 mica Exp $ --> <!-- ==================================================================== --> <!-- Datasource config for Postgres --> <!-- ==================================================================== --> <datasources> <local-tx-datasource> <jndi-name>myapp/DataSource</jndi-name> <connection-url>jdbc:postgresql:myapp</connection-url> <driver-class>org.postgresql.Driver</driver-class> <user-name>scott</user-name> <password>tiger</password> </local-tx-datasource> </datasources> |
| Code: |
|
<?xml version="1.0" encoding="UTF-8"?> <application xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd"> <display-name>MyApp</display-name> <module id="myeclipse.1099526815609"> <web> <web-uri>myapp.war</web-uri> <context-root>/myapp</context-root> </web> </module> <module id="myeclipse.1099275857859"> <ejb>myapp.jar</ejb> </module> <module id="myeclipse.1099524538796"> <java>myapp.sar</java> </module> </application> |
| Code: |
| myapp.ear/
META-INF/ application.xml myclasses.jar /com/mycompany/classes foo.class bar.class myapp.sar/ (Hibernate module) /com/mycompany/classes foo.hbm.xml bar.hbm.xml /META-INF jboss-service.xml postgres-ds.xml myapp.jar/ (EJB module) ... myapp.war/ (Web module) ... |
| Code: |
| <application xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
<display-name>MyApp</display-name> <module id="myeclipse.1099526815609"> <web> <web-uri>myapp.war</web-uri> <context-root>/myapp</context-root> </web> </module> <module id="myeclipse.1099275857859"> <ejb>myapp.jar</ejb> </module> <module id="myeclipse.1099524538796"> <java>myapp.sar</java> </module> <module id="myeclipse.1099334553452"> <java>myclasses.jar</java> </module> </application> |
| cybermac912 wrote: |
|
BTW, in JBoss 4 (and the last release of JBoss 3.2), a HAR (Hibernate ARchive) is a new special kind of SAR for Hibernate services. These projects should probably be treated a little differently from generic SAR projects - sort of a merging between a SAR project and a Hibernate project. |
| cybermac912 wrote: |
| BTW, JBoss 4.0 no longer supports resources like -ds.xml in the META-INF directory. They must be in the top-level of the SAR or another subdirectory (See thread on JBoss.org). JBoss 3.2 also allows the XML files to be in the top-level or other subdirectories. |