XADatasource config without jndi

78 views
Skip to first unread message

gerold...@gmail.com

unread,
May 12, 2015, 6:59:31 AM5/12/15
to p6spy...@googlegroups.com
Dear listeners,

I'm facing the problem to get the p6spy to get running with a xadatasource (oracleXAdatasource together with bitronix).

The configuration is provided by spring boot - I have no jndi configuration.

I have tried different options enabling/disabling realdatasource an so on...

Can I find a working example configuration somewhere?

Best regards,
Gerold





Quinton McCombs

unread,
May 13, 2015, 9:50:54 PM5/13/15
to p6spy users
We have some basic instructions at the URL below for using P6Spy with Spring.


P6DataSource implements the XADataSource interface.

Using XML, your datasource definition might look similar to the example below.  You a are probably not using JndiObjectFactoryBean to create the DataSource but the same idea applies to whatever you are using to create the DataSource.  Just wrap it with P6DataSource.  

<bean id="dataSource" class="com.p6spy.engine.spy.P6DataSource">
  <constructor-arg>
    <bean id="DataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
      <property name="jndiName" value="jdbc/​myDS"/>   
    </bean>
  </constructor-arg>
</bean>
If this does not work for you, please let me know and I will try to help you get it working.  


--
You received this message because you are subscribed to the Google Groups "p6spy users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to p6spy-users...@googlegroups.com.
To post to this group, send email to p6spy...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/p6spy-users/db7c31bd-9e25-444b-a25e-674d5ae366cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages