[jboss-user] [JBoss Seam] - Re: Problems setting up Seam-managed persistence context

sgollery do-not-reply at jboss.com
Fri Jun 15 14:14:47 EDT 2007


Fernando,

In persistence.xml, I have 

      <jta-data-source>java:/myDatasource</jta-data-source>

In jboss-beans.xml, I have 


  |    <bean name="myDatasourceBootstrap" class="org.jboss.resource.adapter.jdbc.local.LocalTxDataSource">
  |       <property name="driverClass">com.mysql.jdbc.Driver</property>
  |      ....other properties....
  |        <property name="transactionManager"><inject bean="TransactionManager"/></property>
  |       <property name="cachedConnectionManager"><inject bean="CachedConnectionManager"/></property>
  |       <property name="initialContextProperties"><inject bean="InitialContextProperties"/></property>
  |    </bean>
  | 
  |    <bean name="myDatasource" class="java.lang.Object">
  |       <constructor factoryMethod="getDatasource">
  |          <factory bean="myDatasourceBootstrap"/>
  |       </constructor>
  |    </bean>
  | 
 
Is that what you mean? Does it look right? The whole thing works if I use @PersistenceContext, so it seems like the setup must be reasonably correct. 

Steve


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4054862#4054862

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4054862



More information about the jboss-user mailing list