Hi,
I have an application that uses simple
JDBC to work with the database.
The application executes simple INSERT\SELECT
statements, using prepared statements.
I'm using a MS-Sql local-tx datasource to get
the connection.
For some reason the table I'm working with gets
locked right after I perform an insert, and it is not
freed, when I do a select after insert, the select
"hangs".
My mssql-ds.xml file has the following:
<local-tx-datasource>
<jndi-name>MyDs</jndi-name>
<connection-url>jdbc:microsoft:sqlserver://mypc:1433</connection-url>
<connection-property name="DatabaseName">
mydb
</connection-property>
<driver-class>com.microsoft.jdbc.sqlserver.SQLServerDriver</driver-class>
<user-name>xx</user-name>
yy
<min-pool-size>2</min-pool-size>
<max-pool-size>10</max-pool-size>
<idle-timeout-minutes>0</idle-timeout-minutes>
<blocking-timeout-millis>5000</blocking-timeout-millis>
<track-statements>true</track-statements>
</local-tx-datasource>
My code uses the following:
InitialContext ctx = InitialContextUtil.getContext();
DataSource ds = (DataSource) ctx.lookup("MyDs");
Connection con = ds.getConnection();
I get no errors during execution, however, after the insert,
every select on the same table either from within jboss or from
MS query analayzer hangs (queries on other objects work ok).
thanks,
Auzi
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3857052#3857052
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3857052
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user