class ElevatedConnectionFactoryWrapper implements ConnectionFactory {

    @Override
    public Connection getConnection() throws ResourceException {
        Connection connection = connectionFactory.getConnection();
        SSOToken ssoToken = ssoTokenPrivilegedAction.run();
        return new ElevatedConnection(connection, ssoToken);
    }

    @Inject public  ElevatedConnectionFactoryWrapper(ConnectionFactory connectionFactory,
            PrivilegedAction<SSOToken> ssoTokenPrivilegedAction, SSOTokenContext.Factory ssoTokenContextFactory);

}