Hi my name is Julio Helden and i am a brazilian guy. I would like to configure the hibernate like a service in Weblogic.
In JBoss, i create a file named JBoss-service.xml and i put the following text in it:
<!-- SESSION FACTORY : Brasil -->
<mbean code="net.sf.hibernate.jmx.HibernateService"
name="net:service=HibernateFactory_BR,name=HibernateFact ory_BR">
<depends>jboss.jca:service=RARDeployer</depends>
<depends>jboss.jca:service=LocalTxCM,name=BCV_BRASIL_DS</depends>
<!-- JDNI -->
<attribute name="JndiName">java:/hibernate/HibernateFactory_BR</attribute>
<attribute name="MapResources">
br/com/netservicos/core/bean/rh/PessoaBean.hbm.xml
</attribute>
<attribute name="Datasource">java:/BCV_BRASIL_DS</attribute>
<attribute name="Dialect">net.sf.hibernate.dialect.OracleDialect</attribute>
<attribute name="TransactionStrategy">net.sf.hibernate.transaction.JTATransactionFactory</attribute>
<attribute name="TransactionManagerLookupStrategy">
net.sf.hibernate.transaction.JBossTransactionManagerLookup
</attribute>
<attribute name="CacheProvider">net.sf.hibernate.cache.HashtableCacheProvider</attribute>
<attribute name="UseOuterJoin">false</attribute>
<attribute name="ShowSql">false</attribute>
<attribute name="UserTransactionName">java:/UserTransaction</attribute>
</mbean>
This works fine in JBoss. When the server starts up it activates the Hibernate like a service.
Do you know how can i do it in Weblogic ?
My best regards and sorry for my english.
|