"Bug free" is a stretch, but thanks anyway. ;)
As I recall, AbstractIsolationLayer started out as a normal class and was
changed to be static because of problems we had setting the class loading
scope on various SOAP engines. Long ago, when we just ran on Axis 1.x, we
used its service scope (request|application|...) to make it so the service
stayed loaded for as long as the server was up; for whatever reason,
expanding to Axis2, the mini SOAP engine, WebSphere, etc., led to some
inconsistency and making things static was the only way to ensure we got
the proper behavior. Otherwise, the Muse engine would reload for each
request, which is obviously a bad thing.
It's odd that you're seeing the static class behavior even after shutting
down the app and restarting - I thought that this would cause the app
server to unload the app's local classloader. Are all of your Muse JARs in
the web app's /WEB-INF/lib, or have you added them to one of the server's
common library directories?
Dan
<[EMAIL PROTECTED]> wrote on 07/25/2007 11:14:54 AM:
> 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]