New Datasource in Embedded JBoss for SeamTest
lightguard Mar 16, 2009 9:07 PMI've been struggling with this for a while now, and I'm really no where further than where I started. I have JBoss Embedded Beta3 running, but I cannot get another datasource (other than DefaultDS) to deploy. I have it in the deploy directory of the embedded bootstrap, and it looks like it's finding it and parsing it, but the datasources are simply not there when Hibernate starts looking for them.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE datasources PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN" "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd"> <datasources> <local-tx-datsource> <jndi-name>LanguageControlTestDS</jndi-name> <driver-class>org.h2.Driver</driver-class> <connection-url>jdbc:h2:/Users/jason/projects/p42/trunk/seam-apps/common/target/testdb</connection-url> <user-name>language</user-name> <password>language</password> </local-tx-datsource> <local-tx-datsource> <jndi-name>EnterpriseDS</jndi-name> <driver-class>org.h2.Driver</driver-class> <connection-url>jdbc:h2:/Users/jason/projects/p42/trunk/seam-apps/common/target/ChangeLogDB</connection-url> <user-name>sa</user-name> <password></password> </local-tx-datsource> </datasources>
Here's a snippet from my persistence.xml (which is in the META-INF directory at the root level of a path entry):
<?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="LanguageControlTest"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <jta-data-source>java:/LanguageControlTestDS</jta-data-source> <!--<jta-data-source>java:/DefaultDS</jta-data-source>--> <class>com.octanner.common.entity.LanguageStringsEntity</class> <properties> <property name="hibernate.hbm2ddl.auto" value="create-drop" /> <property name="hibernate.show_sql" value="true" /> <property name="hibernate.connection.url" value="jdbc:h2:@@target.dir@@/testdb" /> <property name="hibernate.connection.driver_class" value="org.h2.Driver" /> <property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect" /> <property name="hibernate.connection.username" value="language" /> <property name="hibernate.connection.password" value="language" /> </properties> </persistence-unit> ...
Is there some incantation I missed or are the stars not in alignment?