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 15:22:27 GMT

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

Rupert Smith commented on QPID-239:
-----------------------------------

Please ignore that patch for now. The reason this dynamic loading was done may have been because
of a temporary implementation of the transport earlier on in development. In the future someone
may want to dynimically load different transports. A problem not worth solving at the moment.


Will shift the transport interface into the common assembly, make client reference the transport,
then directly create the BlockingSocketTransport without dynamically loading it.

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

        

Mime
View raw message