Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 321354

Summary: [jms] connect sequence timing problem
Product: [RT] ECF Reporter: Scott Lewis <slewis>
Component: ecf.providersAssignee: Scott Lewis <slewis>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: bugs.eclipse.org, gathmann
Version: 3.3.0   
Target Milestone: 3.4.0   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Scott Lewis CLA 2010-07-30 10:50:44 EDT
There is a connect sequence timing problem in the JMS provider that is causing the remote services load balancing examples to fail to work properly.

The bug is that on the service host, the add registration message (sent upon new client connection request) is sent out of order to the new client, meaning that the client does not get it, meaning that subsequent remote service lookups on the client (for that registration) fail.

The fix is to manage the timing of the connect sequence appropriately.
Comment 1 Scott Lewis CLA 2010-07-30 13:46:52 EDT
Working on a fix.  It will take a few days to finish fix and test.
Comment 2 Scott Lewis CLA 2010-07-30 13:50:16 EDT
assigning
Comment 3 Scott Lewis CLA 2010-07-31 14:29:44 EDT
Fix pushed to master branch on github repo http://github.com/ECF/JMS

Also made some small changes to the example loadbalancing consumer and to the service host for clarity/simplicity.  This simplicity has the unfortunate side effect, however, of making the declarative service-based consumer (org.eclipse.ecf.examples.loadbalancing.ds.consumer) inoperative, so I've removed it from the list of plugins on the wiki page:  http://wiki.eclipse.org/Load_Balancing_Remote_Services

Resolving as fixed.  Since this was a timing problem I want to do some more testing in other environments, so if others are doing testing and find other results
Comment 4 Markus Kuppe CLA 2010-07-31 14:42:37 EDT
What about turning the example into unit tests?
Comment 5 Scott Lewis CLA 2010-07-31 15:53:50 EDT
(In reply to comment #4)
> What about turning the example into unit tests?


Seems like a good idea.  I don't have enough personal resources currently to do so.
Comment 6 Scott Lewis CLA 2010-07-31 16:47:11 EDT
(In reply to comment #4)
> What about turning the example into unit tests?

One other comment about doing the load balancing example apps as unit tests...this use case requires

a) launching/controlling an activemq broker process
b) launching/controlling 1+ servers for the given service (whatever it is)
c) launching/controlling 1 service host for the service
d) launching/controlling 1+ service consumers

Ideally, any unit test would be able to test the behavior of any of the 3+ servers, service host, consumers, and launch multiple servers and/or service consumers (e.g. to test for performance, reliability with multiple consumers and multiple servers).

So this would, I believe, require some of the remote services test environment work that is being worked on and contemplated.
Comment 7 Markus Kuppe CLA 2010-08-01 04:55:48 EDT
(In reply to comment #5)
> Seems like a good idea.  I don't have enough personal resources currently to do
> so.

Maybe we can start small by running the tests that are part of the JMS github repo. Do they have any specific requirements or just regular junit plugin tests without external dependencies?
Comment 8 F. Oliver Gathmann CLA 2010-08-09 04:15:57 EDT
The loadbalancing example now works like a charm on my OS-X Snow Leopard/Helios/JVM 1.6 system. Thanks, Scott, for fixing this so quickly!
Comment 9 Scott Lewis CLA 2010-08-09 11:40:42 EDT
(In reply to comment #8)
> The loadbalancing example now works like a charm on my OS-X Snow
> Leopard/Helios/JVM 1.6 system. Thanks, Scott, for fixing this so quickly!


You are welcome.  If you find ECF valuable, please consider:

a) contributing to the project (code, documentation, etc)
b) hiring an ECF committer as consultant to support your own use
c) publicly describing your work with ECF (i.e. blogs, etc)...to help promote the project and make it more visible to people that remain unaware (since Eclipse Foundation marketing is worse than useless for non-corporate-owned projects like ECF).