• Post Reply Bookmark Topic Watch Topic
  • New Topic

URGENT: How use resource-ref and resource-env-ref?  RSS feed

 
Robert Paris
Ranch Hand
Posts: 585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have found a few places where resource-env-ref (and resource-ref) are mentioned as a way of making a datasource available through JNDI in a web application. However, I cannot find any code on how to get this to actually work in Jetty. Does anyone have example code? I know that in web.xml I put:

But I obviously need to tell it the actual class (it's a mysql jdbc provider class) and the init parameters - username, pass, etc. Where do I do this? I assume there's some XML descriptr for it? Any help is VERY much appreciated!
 
Robert Paris
Ranch Hand
Posts: 585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To anyone who's interested, I got a reply from the Jetty creator and he said that he's in the process of implementing this with tyrex right now. He posted his current code in case anyone else wanted to give it a go:
http://groups.yahoo.com/group/jetty-discuss/message/5766
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!