Sure, you just have to take care that "java:/dsname" points to a DataSource to your Oracle.
Probably this does not help much, but your question was quite general ;-).
Thank you. yes, the question was very general as was your answer and that's just the way I wanted it. I haven't really done much work to figure out how to get sso going and just wanted to make sure it was possible