On 15-11-2007 07:21:35 -0800, jsolderitsch wrote:
OK, now a new problem.
Glassfish wants to establish a connection pool on behalf of my deployed web application.
I want to access a remote database, not one deployed to localhost.
But it looks like code in the MonetDataSource is not equipped to allow non-localhost connections.
I see in the class:
public class MonetDataSource implements DataSource {
public MonetDataSource() { loginTimeout = 0; databaseName = "demo"; hostName = "localhost"; portNumber = 50000; description = "MonetDB database"; driver = new MonetDriver(); }
But like portNumber, hostName is not available for substitution. Ideally, shouldn't it be possible for the data source to refer to any host and database name. I can see that the port number may be a problem, but what about the host?
This is indeed stupid. I will see if I can find how a DataSource is supposed to have these values overridden. Ideally databaseName, hostName and portNumber are specified by the user, as the defaults don't really make sense, apart from the port number maybe.
Or maybe I don't understand the process here but I started up my remote DB, shutdown the local one, changed the URL for the connection to reference the remote DB, but the deployed application fails because it can't connect to localhost.
Any ideas?
The DataSource is just not complete. But if you have any direct pointers on how to improve it, I'm willing to look into it.
It's looking like I may need to switch to a DB with more complete javax.sgl.DataSource support.
Whatever floats your boat.