5.3. Hibernate MBean Service DescriptorNow that we have the HBM file in place, we must create an MBean service configuration file for Hibernate. Hibernate is a service, no different than Hypersonic or any of the others. Each MBean needs a service configuration file like Example 5-4 so that JBoss will recognize it and run it on startup. Example 5-4. hibernate-service.xml<server> <mbean code="org.jboss.hibernate.jmx.Hibernate" name="jboss.har:service=Hibernate"> <attribute name="DatasourceName">java:/JBossAtWorkDS</attribute> <attribute name="Dialect"> org.hibernate.dialect.HSQLDialect</attribute> <attribute name="SessionFactoryName"> java:/hibernate/SessionFactory</attribute> <attribute name="CacheProviderClass"> org.hibernate.cache.HashtableCacheProvider </attribute> </mbean> </server> Let's step through it line by line.
|