0 Replies Latest reply on Feb 26, 2013 4:38 AM by jaigates vg

    how to make persistant unit wait until reffered datasource is completely deployed in jboss 5.1 or jboss soa 5.3.1

    jaigates vg Newbie


      Server used is jboss 5.1 (actually jboss soa 5.3.1)


      i have configured teiid as datasouce in my persistance.xml, teeid datasource is configured to a vdb file. When i try to deploy the project ear, teiid ds (vdb file) takes long time to load and become active. But while it is progressing my ear project containing persistance.xml is try to get deployed and i get teiid exception saying vdb is not in active state. pls let me know how to arrange the order or dependency for this datasouce to persisant unit configured in persistance.xml.  i am looking for solution to be put in as part of my ear and not anywhere else. pls let me know how to do this.






      <persistence-unit name="ibo-ejb" >  <provider>org.hibernate.ejb.HibernatePersistence</provider>  <jta-data-source>java:/teiidDS</jta-data-source>    <<classes>>  <properties> <property name="jboss.entity.manager.factory.jndi.name" value="ibo-ejb"/> <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>  <property name="hibernate.dialect" value="org.teiid.dialect.TeiidDialect" /> <property name="hibernate.connection.driver_class" value="org.teiid.jdbc.TeiidDriver" /> <property name="connection.autocommit" value="false" /> <property name="hibernate.show_sql" value="true" /> </properties>  </persistence-unit>



      datasource file



      <datasources> <local-tx-datasource> <jndi-name>teiidDS</jndi-name>  <connection-url>jdbc:teiid:ibis_poc_vdb;disableLocalTxn=true</connection-url>   <driver-class>org.teiid.jdbc.TeiidDriver</driver-class> <user-name>user</user-name> <password>user</password>  <metadata> <type-mapping>jdbc</type-mapping> </metadata> </local-tx-datasource>  </datasources>