On 12/01/2016 06:31, Vlad Khorsun wrote:
> 11.01.2016 16:49, Adriano dos Santos Fernandes wrote:
>> 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,
>    I'd say, classes not stored in the database. Class name (or another
> reference) - yes, but not class itself.

Not agree, but doesn't matter, each database should have its own
specific set of classes isolated from others.

Java libraries, FB/Java and Jaybird are shared. User can also configure
shared libraries.


>> and they should be loaded in a classloader per database, not per
>> attachment, which would be heavy.
>    As for me, most efficient way is to load classes on per-process bases,
> not per-database. Are you going to load sepatate JVM instance for every
> attached database too ?

One JVM per Firebird process.


>> 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).
>    IExternalEngine implementation not required to store all that loaded
> classes by itself, it could share loaded classes between instances of
> IExternalEngine implementation.
>
>
Each database should have a classloader specific for it in the JVM
(shared for all databases in the process).

Similar to a Java Web Server where each Web Application has it classloader.


Adriano


------------------------------------------------------------------------------
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

Reply via email to