qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rupert Smith (JIRA)" <qpid-...@incubator.apache.org>
Subject [jira] Commented: (QPID-239) Use of assembly name vs. assembly path in AMQConnection.LoadTransportFromAssembly()
Date Fri, 05 Jan 2007 16:17:27 GMT

    [ https://issues.apache.org/jira/browse/QPID-239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462520

Rupert Smith commented on QPID-239:

Patch added.

Was easier just to move everything from the Qpid.Client.Transport.Socket.Blocking directory
into the Qpid.Client directory because of its dependencies on client stuff.

Qpid.Client.Transport.Socket.Blocking directory should be dropped.

BlockingSocketTransport is now instantiated directly instead of dynamically. The old code
has just been commented out for the moment, in case it should need to be put back in again.

> Use of assembly name vs. assembly path in AMQConnection.LoadTransportFromAssembly()
> -----------------------------------------------------------------------------------
>                 Key: QPID-239
>                 URL: https://issues.apache.org/jira/browse/QPID-239
>             Project: Qpid
>          Issue Type: Bug
>          Components: Dot Net Client
>         Environment: .NET 1.1 and 2.0
>            Reporter: Tomas Restrepo
>            Priority: Minor
>         Attachments: Qpid-239.diff, Qpid-239.diff
> The third argument to AMQConnection.LoadTransportFromAssembly() is called "assemblyName",
suggesting that it should contain a partially or fully qualified assembly name. 
> However, the argument value is actually used as an argument to Assembly.LoadFrom(), which
doesn't take an assembly name but an assembly path instead. The two are at odds with each
> So, either the argument name is wrong (and it should be assemblyFilename instead) or
the call to Assembly.LoadFrom() should be replaced with a call to Assembly.Load() instead.
Which one is the correct fix will depend on what the original intentions of the code are and
the expected usage.
> However, in general terms I'd recommend avoiding Assembly.LoadFrom() and use Assembly.Load()
instead to allow the runtime to do proper assembly loading resolution (including loading from
the GAC if necessary) and avoiding conflicts because of load contexts (Load() and LoadFrom()
load assemblies in different binding contexts which affects how dependencies are resolved
and loaded at runtime. Check out http://blogs.msdn.com/suzcook/archive/2003/05/29/57143.aspx
and http://www.gotdotnet.com/team/clr/LoadFromIsolation.aspx for the details of this).

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message