File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Setting client ID to anonymous connection for auditing

 
Brian Mulholland
Ranch Hand
Posts: 65
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, I've been on projects where this was done in the past so i know it's possible, but it was always somebody else who did it. I am setting up a type 4 connection to our DB2 back end and we establish connection anonymously through the pooler. We use WAS 6. How does one set the 'client ID' that database triggers can then capture to know what user to set to the audit tables?

I have a code sample that worked in a test somebody left behind:



But that produces:

java.lang.ClassCastException: com/ibm/db2/jcc/a/nc incompatible with com/ibm/websphere/rsadapter/WSConnection

I *think* I am connecting with a type 4 driver (see my other thread where I ask how to know for sure) and this activity is supposed to be implemented on a type 4, but obviously something is wrong somewhere.
 
Sagar Rohankar
Ranch Hand
Posts: 2904
1
Java Spring Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Brian Mulholland wrote:
java.lang.ClassCastException: com/ibm/db2/jcc/a/nc incompatible with com/ibm/websphere/rsadapter/WSConnection

Where you get this exception, on which line?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic