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 Fri, 16 Jul 2010 08:31:53 GMT

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

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

I first tried Assembly.Load but that failed because it will not load a file from the GAC unless
the full assembly name is specified (name, version, key).  LoadWithPartialName did load the
assembly from the GAC.  However, I failed to notice it was deprecated.  A quick look finds
this blog entry which explains their reasoning: http://blogs.msdn.com/b/suzcook/archive/2003/05/30/57159.aspx

So either way, currently there is not a suitable solution for this, because ultimately if
using the GAC, we must specify the exact version that is required, in order to handle different
apps putting different versions of NMS in the GAC.

I can think of two solutions:-

1. Specify the full assembly name in the NMS config file.
2. Specify the full assembly name in the built in list of known assemblies.

And I think I would prefer option 2, because it is actually specifying which versions of NMS
connectors are compatible with the core NMS interface.

E.g.  Apache.NMS 1.3.0.0 would be compatible with Apache.NMS.ActiveMQ 1.3.0.0 only.

This would mean that minor fixes should not change the "AssemblyVersion", but it would be
fine to update the "AssemblyFileVersion".

> 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