You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-cs@ibatis.apache.org by Henrik Uffe Jensen <He...@ementor.dk> on 2005/09/13 13:48:04 UTC

Using iBATIS.NET with user-specific connectionstrings

        Hi 

We would like to use iBATIS (as we have done for the last two-three of
our projects) on a project where we are porting an existing solution,
but are facing a little problem regarding the connections to the
database.

On this existing solution every user of the system is created as a
oracle-user and the connection to the database is done using the
username/password of that user.So we are not using Integrated Security
here, but are actually using a dynamic connectionstring created with the
username/password of the specific user. Let's not start discussing if
this is the right solution or not :-), but this is the way it works
today and the customer expect the new solution to work in the same way.

Can we just use the DaoManager.DataSource.ConnectionString with our
dynamic connectionstring ? Any drawbacks - thread-safety etc. ? Or are
there any better solution for this problem ?

Henrik Uffe Jensen
Ementor Denmark A/S

 
 

Re: Using iBATIS.NET with user-specific connectionstrings

Posted by Gilles Bayon <ib...@gmail.com>.
You can't.
The best solution will be to add method as
*public OpenConnection(
*string<ms-help://MS.MSDNQTR.2003FEB.1033/cpref/html/frlrfsystemstringclasstopic.htm>
* **connectionString*
*);*
I have open a Jira ticket
*IBATISNET-112*<http://issues.apache.org/jira/browse/IBATISNET-112>and
closed it, you can find implementation in SVN.
 Cheers,
-Gilles
 

 On 9/13/05, Henrik Uffe Jensen <He...@ementor.dk> wrote: 
> 
>  Hi 
> 
> We would like to use iBATIS (as we have done for the last two-three of our 
> projects) on a project where we are porting an existing solution, but are 
> facing a little problem regarding the connections to the database.
> 
> On this existing solution every user of the system is created as a 
> oracle-user and the connection to the database is done using the 
> username/password of that user.So we are not using Integrated Security 
> here, but are actually using a dynamic connectionstring created with the 
> username/password of the specific user. Let's not start discussing if this 
> is the right solution or not :-), but this is the way it works today and the 
> customer expect the new solution to work in the same way.
> 
> Can we just use the DaoManager.DataSource.ConnectionString with our 
> dynamic connectionstring ? Any drawbacks - thread-safety etc. ? Or are 
> there any better solution for this problem ?
> 
>  Henrik Uffe Jensen
> Ementor Denmark A/S
>