Usage of P6Spy with datasource in Spring applicationContext.xml

后端 未结 2 1310
庸人自扰
庸人自扰 2021-01-03 05:06

I am using Hibernate 4, Spring 3, JSF 2.0 and Weblogic 10.3.6 as server.

I have created datasource on Weblogic server and in applicationContext.xml I have defined d

2条回答
  •  一生所求
    2021-01-03 05:28

    The easiest way to integrate p6spy using spring is to use the P6DataSource class. The P6DataSource class is just a proxy for the real data source. This lets you obtain the real data source using any of the spring data source factory implementations.

    
      
        
             
        
      
    
    

    If you are using an XADatasource, just change the classname to P6ConnectionPoolDataSource as shown below. Note: P6ConnectionPoolDataSource implements the ConnectionPoolDataSource and XADataSource interfaces.

    
      
        
             
        
      
    
    

提交回复
热议问题