Re: [Firebird-net-provider] [FB-Tracker] Created: (DNET-638) Add exception when FbConnectionPoolManager.ClearPools used inapropriately

2015-10-14 Thread Геннадий Забула
PR on github was updated

On 7 October 2015 at 10:36, Hennadii Zabula (JIRA)
 wrote:
> Add exception when FbConnectionPoolManager.ClearPools used inapropriately
> -
>
>  Key: DNET-638
>  URL: http://tracker.firebirdsql.org/browse/DNET-638
>  Project: .NET Data provider
>   Issue Type: Improvement
>   Components: ADO.NET Provider
> Affects Versions: vNext
> Reporter: Hennadii Zabula
> Assignee: Jiri Cincura
>
>
> We had run in a problem where currently running queries were failing because 
> another thread wrongly cleared all pools. It was quite unexpected.
>
> We fixed the issue in our code with the thread, but I think it should throw 
> InvalidOperationException if _busy dictionary is not empty, because it means 
> that there may be currently running queries.
>
> The exception could add information about the problems caused by an 
> inappropriate call to ClearPool.
>
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators: 
> http://tracker.firebirdsql.org/secure/Administrators.jspa
> -
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>
> --
> Full-scale, agent-less Infrastructure Monitoring from a single dashboard
> Integrate with 40+ ManageEngine ITSM Solutions for complete visibility
> Physical-Virtual-Cloud Infrastructure monitoring from one console
> Real user monitoring with APM Insights and performance trend reports
> Learn More http://pubads.g.doubleclick.net/gampad/clk?id=247754911=/4140
> ___
> Firebird-net-provider mailing list
> Firebird-net-provider@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

--
___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


[Firebird-net-provider] Question about IFbClient purpose

2015-10-14 Thread Геннадий Забула
Jiri, could you clarify what is a purpose of separate IFbClient
interface and about using native calls through instance instead of
organizing P/Invokes as static NativeMethods class?

--
___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


Re: [Firebird-net-provider] Question about IFbClient purpose

2015-10-14 Thread Jiří Činčura
On Wed, Oct 14, 2015, at 19:12, Геннадий Забула wrote:
> Jiri, could you clarify what is a purpose of separate IFbClient
> interface and about using native calls through instance instead of
> organizing P/Invokes as static NativeMethods class?

It's used because for P/Invoke calls to fbembed are emitted on the fly.
And that's because you can't have DllImport attribute with non-constant
string which is needed to ClientLibrary support in connection string.

-- 
Mgr. Jiří Činčura
Independent IT Specialist

--
___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


Re: [Firebird-net-provider] Connection pool

2015-10-14 Thread Michał Ziemski
Hi!

I've made a pull request on github with my proposal.

Cheers!
Michał

2015-10-14 7:52 GMT+02:00 Jiří Činčura :

> On Tue, Oct 13, 2015, at 22:53, Michał Ziemski wrote:
> > I would rather also test connectionString.MaxPoolSize with the
> > "_available"
> > stack
> > and not the "_busy" list. This would make connectionString.MaxPoolSize
>
> You mean:
> if (_available.Count() + 1 > connectionString.MaxPoolSize)
> throw new
>
> InvalidOperationException("Connection
> pool is full.");
> ?
>
> --
> Mgr. Jiří Činčura
> Independent IT Specialist
>
>
> --
> ___
> Firebird-net-provider mailing list
> Firebird-net-provider@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
>
--
___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


Re: [Firebird-net-provider] Question about IFbClient purpose

2015-10-14 Thread Геннадий Забула
I got it. It is support of dynamic client library name specified in connection 
string. Do you mind if I submit PR with comments about it?

-Original Message-
From: "Jiří Činčura" 
Sent: ‎10/‎14/‎2015 8:18 PM
To: "firebird-net-provider@lists.sourceforge.net" 

Subject: Re: [Firebird-net-provider] Question about IFbClient purpose

On Wed, Oct 14, 2015, at 19:12, Геннадий Забула wrote:
> Jiri, could you clarify what is a purpose of separate IFbClient
> interface and about using native calls through instance instead of
> organizing P/Invokes as static NativeMethods class?

It's used because for P/Invoke calls to fbembed are emitted on the fly.
And that's because you can't have DllImport attribute with non-constant
string which is needed to ClientLibrary support in connection string.

-- 
Mgr. Jiří Činčura
Independent IT Specialist

--
___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
--
___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


Re: [Firebird-net-provider] Question about IFbClient purpose

2015-10-14 Thread Jiří Činčura
Knock youself out.

-- 
Mgr. Jiří Činčura
Independent IT Specialist

On Thu, Oct 15, 2015, at 06:02, Геннадий Забула wrote:
> I got it. It is support of dynamic client library name specified in
> connection string. Do you mind if I submit PR with comments about it?
> 
> -Original Message-
> From: "Jiří Činčura" 
> Sent: ‎10/‎14/‎2015 8:18 PM
> To: "firebird-net-provider@lists.sourceforge.net"
> 
> Subject: Re: [Firebird-net-provider] Question about IFbClient purpose
> 
> On Wed, Oct 14, 2015, at 19:12, Геннадий Забула wrote:
> > Jiri, could you clarify what is a purpose of separate IFbClient
> > interface and about using native calls through instance instead of
> > organizing P/Invokes as static NativeMethods class?
> 
> It's used because for P/Invoke calls to fbembed are emitted on the fly.
> And that's because you can't have DllImport attribute with non-constant
> string which is needed to ClientLibrary support in connection string.
> 
> -- 
> Mgr. Jiří Činčura
> Independent IT Specialist
> 
> --
> ___
> Firebird-net-provider mailing list
> Firebird-net-provider@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
> --
> ___
> Firebird-net-provider mailing list
> Firebird-net-provider@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

--
___
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider