[jboss-user] [JBoss Seam] - MySQL Database with Seam Setup.. IS it correct?
tony.herstell@gmail.com
do-not-reply at jboss.com
Tue Jan 1 21:26:39 EST 2008
I have tried to copy/edit files to create what I needed and it appears to work. The question is simply is it correct?
sec_ds.xml
| <?xml version="1.0" encoding="UTF-8"?>
|
| <datasources>
| <local-tx-datasource>
| <jndi-name>secDatasource</jndi-name>
| <connection-url>
| jdbc:mysql://localhost:3306/selwyn
| </connection-url>
| <driver-class>com.mysql.jdbc.Driver</driver-class>
| <user-name>root</user-name>
| <password>******</password>
| </local-tx-datasource>
| </datasources>
|
persistance.xml
| <?xml version="1.0" encoding="UTF-8"?>
| <persistence xmlns="http://java.sun.com/xml/ns/persistence"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
| version="1.0">
| <persistence-unit name="secDatabase">
| <provider>org.hibernate.ejb.HibernatePersistence</provider>
| <jta-data-source>java:/secDatasource</jta-data-source>
| <properties>
| <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
| <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
| <property name="hibernate.show_sql" value="true"/>
| <!-- These are the default for JBoss EJB3, but not for HEM: -->
| <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
| <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
| </properties>
| </persistence-unit>
| </persistence>
|
The project is pure Seam/EJB3.
I know its "obvious" to you guys, but it was not obvious from the doco how to set this up for us mortals...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116291#4116291
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116291
More information about the jboss-user
mailing list