witam. Może Koledzy widzą jak podłaczyć do JBoss-Web hibernate? Do postgreSQL znalazłem instrukcje, ale do hibernate coś nie moge.
--
Miłosz
witam. Może Koledzy widzą jak podłaczyć do JBoss-Web hibernate? Do postgreSQL znalazłem instrukcje, ale do hibernate coś nie moge.
--
Miłosz
Witam,
ja do katalogu projektu WEB-INF wrzucam plik hibernate-service.xml
a biblioteki do /lib?? i działa wtedy? :) nic więcej nie trzeba robić?
dodam ze chce korzystać z annotation.
Jeszcze plik progress-ds.xml ktory zawiera :
<datasources>
<local-tx-datasource>
<jndi-name>ProgressDS</jndi-name>
<connection-url>jdbc:JdbcProgress:T:dbserver:3305:liveappl</connection-url>
<driver-class>com.progress.sql.jdbc.JdbcProgressDriver</driver-class>
<user-name>user</user-name>
<password>password</password>
<!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml -->
<metadata>
<type-mapping>PostgreSQL 7.2</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>
Podsumowujac plik progress-ds.xml zawiera fizyczna konfiguracje do bazy, a hibernate-service.xml powiazanie plus pierodły
przykład hibernate-service.xml :
<server>
<mbean code="org.jboss.hibernate.jmx.Hibernate"
name="jboss.har:service=Hibernate">
<attribute name="DatasourceName">java:/FatalErrorDS</attribute>
<attribute name="Dialect">org.hibernate.dialect.FirebirdDialect</attribute>
<attribute name="SessionFactoryName">java:/hibernate/SessionFactory</attribute>
<attribute name="ShowSqlEnabled">true</attribute>
<!-- <attribute name="Hbm2ddlAuto">create-drop</attribute> -->
<attribute name="ScanForMappingsEnabled">true</attribute>
</mbean>
</server>