Proxy Authentication error - "This is already a proxy session"
504980May 30 2006 — edited Jan 11 2007I'm trying to use proxy authentication to connect to the DB and when toplink attempts to establish the connection i get the following error:
oracle.toplink.exceptions.DatabaseException Internal Exception: java.sql.SQLException: This is already a proxy sessionError Code: 17149
I have the preLogin event like this:
DatabaseLogin login = (DatabaseLogin)event.getSession().getDatasourceLogin();
login.setUsesExternalConnectionPooling(true);
login.setConnector(
new OracleJDBC10_1_0_2ProxyConnector(
((JNDIConnector)login.getConnector()).getName()
)
);
login.getConnector()).getName());
login.setProperty(
"proxytype", Integer.toString(OracleConnection.PROXYTYPE_USER_NAME)
);
login.setProperty(
OracleConnection.PROXY_USER_NAME, "mydbuser"
);
login.setProperty(
OracleConnection.PROXY_USER_PASSWORD, "mydbuserpass"
);
I must say the connection pool an datasource are well configured in the application server.
Any comments are more than welcome.
Thanks in advance.