This content has been marked as final.
Show 4 replies
-
1. Re: RollBack not working need help
jhalliday Nov 2, 2007 6:47 AM (in response to saulat78)What is your data source configuration?
-
2. Re: RollBack not working need help
saulat78 Nov 2, 2007 7:09 AM (in response to saulat78)<datasources> <local-tx-datasource> <jndi-name>VAM</jndi-name> <use-java-context>false</use-java-context> <connection-url>jdbc:sqlserver://YCASHMTDEV:1433;databaseName=VAM</connection-url> <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class> <user-name>sa</user-name> <password>sa1234</password> <max-pool-size>100</max-pool-size> <min-pool-size>10</min-pool-size> <blocking-timeout-millis>5000</blocking-timeout-millis> <idle-timeout-minutes>15</idle-timeout-minutes> <!-- correspondinasdg type-mapping in the standardjbosscmp-jdbc.xml (optional) --> <metadata> <type-mapping>mySQL</type-mapping> </metadata> <metadata> <type-mapping>MS SQLSERVER2005</type-mapping> </metadata> </local-tx-datasource> </datasources>
Here it is, I am also using two more data sources in the same file but i only included that I am using. -
3. Re: RollBack not working need help
saulat78 Nov 2, 2007 7:49 AM (in response to saulat78)I am getting a null pointer after setting
<use-java-context>false</use-java-context> to true in my datasource-ds.xmljava.lang.NullPointerException at DTCTestBean.performTransaction(DTCTestBean.java:94) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
-
4. Re: RollBack not working need help
vickyk Nov 6, 2007 1:45 AM (in response to saulat78)"saulat78" wrote:
I am getting a null pointer after setting
<use-java-context>false</use-java-context> to true in my datasource-ds.xml
Here is what you get once you set use-java-context to false
"use-java-context: If this is set to false the the datasource will be bound in the global JNDI context rather than the java: context."
So the lookup should be now like thisInitialContext context = new InitialContext(); DataSource ds = (DataSource)context.lookup("VAM");
I think you would have been using this line
DataSource ds = (DataSource)context.lookup("java:/VAM");