B
Bryan
Hi,
I have some code that looks like this:
InitialContext ic = new InitialContext();
Reference ref = new Reference("javax.sql.DataSource",
"org.apache.commons.dbcp.BasicDataSourceFactory", null);
ref.add(new StringRefAddr("driverClassName", DRIVER_CLASS_NAME));
if (CONNECTION_STRING.length() == 0)
CONNECTION_STRING = "jdbc
racle:thin
" + svrName + ":1521:" + dbName;
ref.add(new StringRefAddr("url", CONNECTION_STRING));
ref.add(new StringRefAddr("username", CONNECTION_USERNAME));
ref.add(new StringRefAddr("password", CONNECTION_PASSWORD));
ic.rebind(dbName, ref);
This at some point appears to create a file on disk (on a windows xp)
called C:\.bindings that contains a bunch of database (in my case
oracle) connect info.
The problem I have is that if this file is created by someone running
the app as an administrator, and then someone who is not admin tries to
run this application later, it fails because it cannot update this file-
no permissions, and throws an error at the ic.rebind line.
So, having inherited this from someone only a day or two ago, Im not
sure what to do.
Can I put this info someplace else that is more suitable? Can I change
the permissions on what JNDI is writing to allow everyone access?
Suggestions?
Thanks,
Bryan
I have some code that looks like this:
InitialContext ic = new InitialContext();
Reference ref = new Reference("javax.sql.DataSource",
"org.apache.commons.dbcp.BasicDataSourceFactory", null);
ref.add(new StringRefAddr("driverClassName", DRIVER_CLASS_NAME));
if (CONNECTION_STRING.length() == 0)
CONNECTION_STRING = "jdbc
ref.add(new StringRefAddr("url", CONNECTION_STRING));
ref.add(new StringRefAddr("username", CONNECTION_USERNAME));
ref.add(new StringRefAddr("password", CONNECTION_PASSWORD));
ic.rebind(dbName, ref);
This at some point appears to create a file on disk (on a windows xp)
called C:\.bindings that contains a bunch of database (in my case
oracle) connect info.
The problem I have is that if this file is created by someone running
the app as an administrator, and then someone who is not admin tries to
run this application later, it fails because it cannot update this file-
no permissions, and throws an error at the ic.rebind line.
So, having inherited this from someone only a day or two ago, Im not
sure what to do.
Can I put this info someplace else that is more suitable? Can I change
the permissions on what JNDI is writing to allow everyone access?
Suggestions?
Thanks,
Bryan