Comments (4)
Indeed, a way to solve your issue could be to create a "XADataSourceSpy", and
also a "XAConnectionSpy", but the problem is: should we provide support only
for the method "PooledConnection#getConnection()" (that could be wrapped easily
by a ConnectionSpy)? I don't really see the point for a XA resource.
Providing a full support for XADataSources would be a completely new branch of
log4jdbc, we would need to create "ConnectionEventListenerSpy",
"StatementEventListenerSpy", "XAResourceSpy", etc.
If you wanted to provide such a patch, I could consider it.
Original comment by [email protected]
on 21 Mar 2014 at 12:34
- Added labels: Type-Enhancement
- Removed labels: Type-Defect
from log4jdbc-log4j2.
[deleted comment]
from log4jdbc-log4j2.
As a workaround, I've also found that my JTA transaction manager (Atomikos) has
a datasource bean that can be used to wrap the XA datasources and thus provide
the regular datasource interface that can be further wrapped by DataSourceSpy.
e.g.:
<!-- Atomikos's XA capable pooling data source. -->
<bean id="myJTADataSource" class="com.atomikos.jdbc.AtomikosDataSourceBean">
<property name="xaDataSource" ref="myh2XaDataSource" />
<property name="uniqueResourceName" value="myDatabase" />
...
</bean>
<!-- Special logging wrapper for our data source that spys on JDBC calls -->
<bean id="myJTADataSourceSpied" class="net.sf.log4jdbc.sql.jdbcapi.DataSourceSpy">
<constructor-arg ref="myJTADataSource" />
</bean>
I have to believe this approach is readily available for almost any JTA
transaction manager that uses XA data sources. IMO you can close this issue as
won't fix because, as you said, its a lot of work to support XA natively and
I'm not convinced now that there would be any benefit.
Original comment by [email protected]
on 24 Mar 2014 at 2:37
from log4jdbc-log4j2.
Thanks for the update. Won't fix :)
Original comment by [email protected]
on 25 Mar 2014 at 1:47
- Changed state: WontFix
from log4jdbc-log4j2.
Related Issues (20)
- Improve spring configuration for DataSourceSpy HOT 2
- Improve documentation for log4jdbc.debug.stack.prefix HOT 1
- Unnecessary returnValue.toString() invocation in ResultSetSpy.reportAllReturns() HOT 3
- Exception "could not look up name" when retrieving a column data by the "table.column" name HOT 1
- Enable configuration via dependency injection frameworks HOT 10
- exception with ojdbc14-10.2.0.2.0.jar HOT 1
- StatementSpy.addBatch() does not respect Properties.isStatementUsageWarn() HOT 2
- Batch statements are not logged when dumpSqlFilteringOn HOT 2
- Suggested Enhancement: Expose DumpFullDebugStackTrace to be set dynamically/statically. HOT 4
- Support logging of commit/rollback invocations on connections. HOT 1
- Log the output from SQL print statements HOT 4
- Db2RdbmsSpecifics implementation is not thread-safe HOT 5
- jboss 7 configuration HOT 1
- Disable bind replacement HOT 1
- Dump sql parameters don't work on batch statements HOT 1
- java.lang.ClassNotFoundException HOT 2
- OutOfMemoryError when large tables are logged HOT 5
- Please add all the improvements and bugfixes from clones of original 'log4jdbc' HOT 1
- Typo in DriverSpy
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from log4jdbc-log4j2.