Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Warning when doing JNDI lookup without "resource-ref"

Status
Not open for further replies.

solmyr72

Programmer
Aug 8, 2004
20
IL
I need to do a JNDI lookup *without* using "resource-ref" :

Code:
Object dataSrouce= new InitialContext().lookup("jndi/myDataSource");
// I do *not* want to register a "resource-ref" and 
// use  lookup("java:comp:/env/myDataSource")

Websphere, of course, issues the following well-known message :

Code:
[12/19/05 13:31:14:775 GMT+02:00] 1a258697 ConnectionFac I J2CA0122I: Resource reference myDataSource could not be located, so default values of the following are used: [Resource-ref settings]

	res-auth:                 1 (APPLICATION)
	res-isolation-level:      0 (TRANSACTION_NONE)
	res-sharing-scope:        false (UNSHAREABLE)
	res-resolution-control:   999 (undefined)
[Other attributes]

I know the message can be avoided if you use "resource-ref", but unfortunately I have a good reason for avoiding "resource-ref" (it's a long story, involving a JNDI structure that's dynamic and not known in advance... Anyway, please take my word for it - I have a reason to avoid "resource-ref"....)

Could anyone please offer another solution, that would still prevent WAS from issuing this message ? It is logged over and over again, completely cluttering my logs...

Thanx
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top