activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Ellis (JIRA)" <jira+amq...@apache.org>
Subject [jira] Commented: (AMQNET-262) NMS cannot be used if installed in the GAC
Date Thu, 22 Jul 2010 20:57:53 GMT

    [ https://issues.apache.org/activemq/browse/AMQNET-262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=60853#action_60853
] 

Daniel Ellis commented on AMQNET-262:
-------------------------------------

Installing NMS in the GAC is not a necessity, as I can always install the DLLs in the application
folder.  In this case it would have just been more logical to store the common components
in the GAC which are shared by multiple applications (in this case 6 applications on the same
machine).

However, although we don't require NMS to be installed in the GAC, I do think it has highlighted
a general issue with how the assemblies are loaded, and it might be better to load assemblies
using the assembly name rather than the file names.

If assembly loading is left to the CLR, then assemblies are located dynamically by looking
in the GAC followed by the application folder.  Details about assembly probing are here http://msdn.microsoft.com/en-us/library/yx7xezcf%28v=VS.71%29.aspx
 It even has the ability to perform install-on-demand (MSI feature).  Therefore it makes sense
to leave this job to the CLR, as it is much more flexible.

So in summary, I would suggest:-
  1. Store a list of known connectors, and reference the assemblies strong-name.
  2. If a connector is not a known type, then lookup the assembly name (strong or not), from
the connectors config file
  3. Leave assembly loading to the CLR

One downside would be that existing connector config files may break, but this could be avoided
by removing ".dll" from the end of the assembly string before loading.

> NMS cannot be used if installed in the GAC
> ------------------------------------------
>
>                 Key: AMQNET-262
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-262
>             Project: ActiveMQ .Net
>          Issue Type: Improvement
>          Components: NMS
>    Affects Versions: 1.3.0
>         Environment: Windows .NET 2.0
>            Reporter: Daniel Ellis
>            Assignee: Jim Gomes
>            Priority: Minor
>             Fix For: 1.4.0
>
>         Attachments: NMS GAC.patch
>
>          Time Spent: 45 minutes
>  Remaining Estimate: 0 minutes
>
> If you install {{Apache.NMS.dll}} and {{Apache.NMS.ActiveMQ.dll}} in the GAC then NMS
is not able to load {{Apache.NMS.ActiveMQ.dll}}.
> {{NMSConnectionFactory.cs}} is storing the pre-defined connection factories in _schemaProviderFactoryMap_,
but is storing the DLL file names to locate the assemblies.
> One solution would be to store the _AssemblyQualifiedName_ instead and leave the assembly
loading to the system.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message