11.01.2016 20:32, Adriano dos Santos Fernandes пишет: > On 11/01/2016 15:13, alex wrote: >> 11.01.2016 19:00, Adriano dos Santos Fernandes пишет: >>> On 11/01/2016 13:31, alex wrote: >>>> 11.01.2016 17:49, Adriano dos Santos Fernandes пишет: >>>>> Hi! >>>>> >>>>> In this function, seems one could not known what database needs the >>>>> plugin. That's bad. >>>>> >>>>> In current engine implementation, multiple attachments has multiple >>>>> metadata caches and plugins instances. >>>>> >>>>> But Java External Engine plugin loads classes stored in the database, >>>>> and they should be loaded in a classloader per database, not per >>>>> attachment, which would be heavy. >>>>> >>>>> The most direct way to do that would be to return a single >>>>> IExternalEngine for these attachments sharing the same database (in the >>>>> same process). >>>>> >>>>> How to do that? >>>> What do you think about adding to PluginConfig method, returning >>>> database information pointer? >>>> (Do not say here 'DbName' - what else info is needed to be discussed) >>>> >>>> >>> Yes, getDatabaseName in IPluginConfig may work. >> Even better to use database ID from lock manager - it's guaranteed to be >> free of any file naming issues when deciding is it same db or not. >> > But then there must be a way to create attachments from that ID. > > Also, an ID should better not reused if a database is closed and another > is opened. > > I think the file (db) name is more usable and without such artificiality. > > Or maybe an interface. The more we can unify the external engine > interfaces (say IExternalContext) with the others, the better.
Yes, something like this - interface should work here best of all other choices. ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel
