Perhaps you are holding onto the connection between transactions? This currently does not work in jboss, and is usually a bad idea as it attempts to defeat connection pooling.
You can hold onto the datasource. Assuming you have, try this:
Connection conn = ds.getConnection();
PreparedStatement ps = ...
This _is_ proper use of pooled connections. The connection you get is a handle to a real db connection, and calling close on it merely signals to jboss that you are done doing work on it and the transaction can end, and the connection can be reused.
I'm getting the same error, using CMP (meaning you haven't done anything wrong in your code as far as handling the connection).
Looking at SQL Profiler I see that every transaction is being rolled back with this statement
if (@@trancount > 0) rollback tran
I've tried three different JDBC drivers -- jnet direct, weblogic, merant.
It seems to me this is an issue with jBoss and SQL Server. Are you using SQL Server 2000? Anybody got any ideas?