• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Can you store a MySql DataSource into a Context?

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to learn how to use datasources to get connections,
and I am successful in doing this for the MysqlDataSource in this way:



However, I want to try to retrieve the connection via a Context,
and am unsuccessful in creating the initial association, like this:



It renders the following error:



I do not think this is a path issue (since it works w/o using the context bind).
I do not know what I need to make it "bind" properly.
Can anyone help with this? Thank You.

[ May 29, 2007: Message edited by: M George ]

[ May 29, 2007: Message edited by: M George ]
[ May 29, 2007: Message edited by: M George ]
 
M George
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The properties of the Context do not show an appropriate provider url for the hosting of the datasource. If you are avoiding an App server (for a blackbox demo, for example) create an RMI registry server, create the datasource (with its own URL), and bind the datasource to the context with the provider url of the RMI server:
 
reply
    Bookmark Topic Watch Topic
  • New Topic