Hi All,

First off I find Muse to be incredibly well designed software and mostly
bug free, got to say I'm extremely impressed (especially when coupled
with TPTP).

However both I; and Marjan Sterjev; note that you need the first
subscription to get a reference from the producer.  This then receives
all of the messages sent on that wsresource.  I agree that this is the
incorrect approach according to the specs (and expectations).

Whilst this isn't meant as a patch to the muse code, the following
implementations will only collect the messages subscribed to (at least
in my tests).  If they help Marjan and others that's cool, sample code
use below.

First question: in the PullPoint accept method I just return true, based
on the assumption that the router will only send Notify to this resource
instance if it was the target of a subscription (from the WSA header to
and resource param).  Is this assumption correct?

Second question: was there a design decision behind the use of statics
in AbstractIsolationLayer?  As is the default won't retrieve a new
environment if it is shutdown then restarted again (in my case this
requires a new environment to be created).  I have simply implemented
IsolationLayer with copy+paste and got rid of the statics, will this
likely cause any issues (hence the question of design decision, maybe
there is something I'm not seeing)?

TIA and cheers,
Chris

PS (The reason why these do not derive is because the simplepullpoint
shutdown code won't work when there isn't a subscription)
PPS (many thanks for this great software)

Code used as (where adapterStatus implements pullpoints and
immediateresourcetermination):

                EndpointReference source = new EndpointReference(new
URI("source://tests"));
                EndpointReference target = new EndpointReference(new
URI("target://some/uri"));

                adapterStatusProxy resource = new adapterStatusProxy(
target, source, new SimpleSoapClient());
                
                Element el = resource.createPullPoint();
                EndpointReference pullpoint = new EndpointReference(el);
                
                // register a consumer.
                SubscriptionClient client =
resource.subscribe(pullpoint, new
TopicFilter(LogLevelCapability.LEVELCHANGED_TOPIC_NAME), null);
                
                // should only get once per each change (seperate
notify)
                resource.updatelogLevel("info");
                resource.updatelogLevel("debug");
                resource.updatelogLevel("info");                
                
                // run in another thread so we'll have to wait a while..
                try {
                        Thread.sleep(1000);
//                      System.in.read();
                } catch (Exception e) {
                }
                
                // get the messages?
                Element max =
XmlUtils.createElement(el.getOwnerDocument(), new
QName("http://docs.oasis-open.org/wsn/b-2";, "MaximumNumber", "pfx0"),
new Integer(10));

                adapterStatusProxy pullit = new adapterStatusProxy(
pullpoint, source, new EsbSoapClient(new ProxyHelper(adapter)
                , DispatchContext.ESB_TESTS));

                Element[] res = pullit.getMessages(max);
                client.destroy();
                
                pullit.destroy();
                assertEquals(3, res.length); // property change
notification as well would be 6

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to