I need these parameters in order to create new Connection’s ‘independently of Servoy’ for use within a Servoy plugin.
Any assistance greatly appreciated.
ps:I don’t think accessing properties files is the way to do this given that client applications may not have access to such resources…just thinking aloud here
I know you can now add new database connections via the admin pages of Servoy server 2.2.
But you also need to reboot the server to make it active (just like you have to when you do it in Developer).
Not sure if you want your clients make your Servoy server restart when they please.
Restarting Servoy server affects all connected clients as you probably know.
No…what I am after is a simple lookup mechanism within the Servoy runtime environment with something like:
db = env.getDatabaseManager().getDatabase()
then…
db.getUsername()
db.getPassword()
…
db.getDriverName()
etc…
Then, I can use that info to create a new java.sql.Connection myself.
The connection needs to be instantiated within my plugin, so creating a new connection is probably not what I need.
Servoy is a three tier solution and you can never go directly to a database without going through the server. It’s not likely we will change that as it has quite some implications on security, caching, broadcasting and performance. You could consider writing a serverside plugin that reads the property file. What exactly would you like to build that needs this functionality?
I just posted to the Plugins forum “Servoy Data Stream Plugin”.
That post contains a description of the functionality I have implemented which utilizes a connection for the purposes of streamed reads and writes.
This requirement simply allows me to configure the connection on the user’s behalf. Btw, the connections created this way are well-managed. Under no circumstances would a connection remain open.