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

Allan Schrum commented on AMQNET-26:
------------------------------------

Attached is a patch that doesn't work, but is a good first start to adding 
failover capability. It is close, however. Currently, using a failover URL the 
system will correctly connect to the underlying transport, but that starting 
logic for the transport (in sending the wire information during SyncRequest() 
in Connection.cs) does not return a Response thus SyncRequest() treats this as 
a failure and closes the connection. The logic in the failover connector does 
not seem to recover from that.

The basic tcp URL still works (at least I didn't break that).

The idea is the failover URL: 
failover://(tcp://xxx:pp?option=value&option=value,tcp://yyy:qq?option=value&option=value)?failoveroptions=value

This is correctly parsed and placed within the failover transport. Each 
internal transport is independent and can actually be different protocols 
(although only tcp is currently supported). A new class TransportFactory 
replicates many of the Java-based functions for ITransport-independent factory 
creation and usage - a proper hiding of information.

There are a lot of files added to support state management, threads (simulating 
some Java stuff). After implementing some things I think I found better 
classes, so some things will probably need replacing. Another set of eyes 
viewing the code will definitely help.

I am using generics in some of the classes which means that the .NET 1.1 
version will not compile. I commented it out of the nant build file so that it 
was not a problem for me (I think that is in the patch file, so be careful if 
you do not want your build file affected). The generics could probably be 
removed with only a bit of object-level casting. That's for later.

I'll keep trying to fix the problem with the failover startup. However, 
assistance is desired.

That's it for now. Please reply so that we can coordinate efforts at this point.

Thanks,

-Allan



> Add failover:// to NMS client
> -----------------------------
>
>                 Key: AMQNET-26
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-26
>             Project: ActiveMQ .Net
>          Issue Type: New Feature
>          Components: ActiveMQ Client
>            Reporter: Denis Abramov
>            Assignee: Jim Gomes
>            Priority: Critical
>             Fix For: 1.1
>
>         Attachments: FailoverPatch.diff
>
>
> Please add failover:// to C# NMS Client. I would add it but I don't know how 
> to resume a stream once it is broken.

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

Reply via email to