aspose file tools
The moose likes JDBC and the fly likes Can you store a MySql DataSource into a Context? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Can you store a MySql DataSource into a Context?" Watch "Can you store a MySql DataSource into a Context?" New topic
Author

Can you store a MySql DataSource into a Context?

M George
Greenhorn

Joined: May 29, 2007
Posts: 6
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

Joined: May 29, 2007
Posts: 6
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:
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Can you store a MySql DataSource into a Context?
 
Similar Threads
MySQL JDBC ConnectionPool Configuration in GrassFish v2.1
MySQL Driver not found in Tomcat Question.
"Unable to Load Driver" - MySQL
How to set up DataSource in plain Java application?
MySQL driver not getting registered