[jboss-user] [JBoss Seam] - Re: cant figure out why my transaction is null
wiggy
do-not-reply at jboss.com
Sat Feb 9 05:59:23 EST 2008
first off - the data source - was struggling earlier with where names were getting posted into the JNDI so i forced the name into the global space -
havent been back to play with this again - so its still there - so heres the datasource defn as exported to the deploy dir
| <datasources>
|
| <xa-datasource>
| <jndi-name>WillsSeamProjectDatasource</jndi-name>
| <use-java-context>false</use-java-context> <track-connection-by-tx/>
| <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class >
| <xa-datasource-property name="URL">jdbc:mysql://localhost:3306/embed</xa-datasource-property>
| <user-name>embed</user-name>
| <password>embed</password>
| <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
| <max-pool-size>5</max-pool-size>
| <min-pool-size>1</min-pool-size>
| <blocking-timeout-millis>2000</blocking-timeout-millis>
| <idle-timeout-minutes>2</idle-timeout-minutes>
| <no-tx-separate-pools/>
| <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
| <metadata>
| <type-mapping>mySQL</type-mapping>
| </metadata>
| </xa-datasource>
|
| </datasources>
|
that i think answers why the lookup isnt as you might have expected - duplicate of this on my home pc is working fine as stated.
as to your first question about hibernate.transaction_manager_lookup_class... I dont know! where is this xml configuration set?
I found hibernate-console.properties file in top level ejb project generated by JBOSS tools wizard which doesnt set this (work or home). Its blank in both PCs
| #File used by hibernate tools to override <datasource> and other container specific settings in persistence.xml
| hibernate.connection.password=embed
| hibernate.connection.username=embed
| hibernate.connection.driver_class=com.mysql.jdbc.Driver
| hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
| hibernate.connection.url=jdbc:mysql://localhost:3306/embed
|
| hibernate.connection.provider_class=org.hibernate.connection.DriverManagerConnectionProvider
| hibernate.datasource=WillsSeamProjectDatasource
| hibernate.transaction.manager_lookup_class=
i'll try setting that aparm in the hib-console.prop file on the works machine and see what happens.
otherwise in my components.xml file in the war project
|
| xmlns:persistence="http://jboss.com/products/seam/persistence"
| xmlns:security="http://jboss.com/products/seam/security"
| xmlns:transaction="http://jboss.com/products/seam/transaction"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.0.xsd http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.0.xsd http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.0.xsd http://jboss.com/products/seam/bpm http://jboss.com/products/seam/bpm-2.0.xsd http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.0.xsd http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.0.xsd http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd http://jboss.com/products/seam/transaction http://jboss.com/products/seam/transaction-2.0.xsd">
| <core:init debug="true" jndi-pattern="@jndiPattern@"/>
| <core:manager concurrent-request-timeout="500"
| conversation-id-parameter="cid" conversation-timeout="120000"/>
| <persistence:managed-persistence-context auto-create="true"
| name="entityManager" persistence-unit-jndi-name="java:/WillsSeamProjectEntityManagerFactory"/>
| <drools:rule-base name="securityRules">
| <drools:rule-files>
| <value>/security.drl</value>
| </drools:rule-files>
| </drools:rule-base>
| <security:identity remember-me="true" security-rules="#{securityRules}"/>
| <event type="org.jboss.seam.security.notLoggedIn">
| <action execute="#{redirect.captureCurrentView}"/>
| </event>
| <event type="org.jboss.seam.security.loginSuccessful">
| <action execute="#{redirect.returnToCapturedView}"/>
| </event>
| <mail:mail-session host="localhost" password="test" port="2525" username="test"/>
| <transaction:ejb-transaction/> <!-- For use with jBPM pageflow or process management
|
| <bpm:jbpm>
| <bpm:process-definitions></bpm:process-definitions>
| <bpm:pageflow-definitions></bpm:pageflow-definitions>
| </bpm:jbpm>
| -->
| </components>
|
again this is the same on both machines
does that help?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4128065#4128065
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4128065
More information about the jboss-user
mailing list