[JBoss Microcontainer Development] New message: "Undemand processing is wrong"
by Adrian Brock
JBoss development,
A new message was posted in the thread "Undemand processing is wrong":
http://community.jboss.org/message/530199#530199
Author : Adrian Brock
Profile : http://community.jboss.org/people/adrian@jboss.org
Message:
--------------------------------------------------------------
One of the tests in the JMX testsuite actually shows it was wrong, but it is asserting the wrong thing. :-)
Consider the following test:
<mbean name="A" mode="ON_DEMAND"/>
<mbean name="B">
<depends>A</depends>
</mbean>
As per the original JMX rules, that will set up two dependencies
B->A at CREATE
B->A at START
Now assume everything is at INSTALLED.
If I do B.stop() what is happening now is the uninstall of undemanded contexts will say that A is no longer required.
It correctly works out that A is still required for the CREATE dependency, and that it is no longer required for the START dependency.
So what would you expect it to do?
1) Move A back to DESCRIBE, even B needs it for the CREATE dependency
2) Move A back to CREATE which is what B demands
3) Don't do anything with A
The current answer is (1), which is obviously wrong. When A goes back to DESCRIBE, then B will also be destroyed
(because of the dependency at CREATE) which is not what I asked for.
I've got a fix that makes it do (3). i.e. while something still wants an ON_DEMAND service, it will stay in the fully INSTALLED state
(or its current state if somebody moved it).
This makes sense to me, since enabling an on demand service doesn't move it to an incompletely deployed state,
so why should undemanding do that?
I don't actually like this processing. Like I said when I originally did the ON_DEMAND processing,
you don't want to bounce your ON_DEMAND webserver just because you are redeploying your only web-app. ;-)
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/530199#530199
16 years, 1 month
[JBoss Microcontainer Development] New message: "Re: Security problems with org.jboss.test:jboss-test 1.1.5.GA"
by Ales Justin
JBoss development,
A new message was posted in the thread "Security problems with org.jboss.test:jboss-test 1.1.5.GA":
http://community.jboss.org/message/530190#530190
Author : Ales Justin
Profile : http://community.jboss.org/people/alesj
Message:
--------------------------------------------------------------
> Why not add a Privileged Block to the test class rather than do all the SM disable/enable circus?
This won't work -- as the test itself is already under security, hence privileged block would kick-in too late.
e.g. otherwise one could always get past it by simply declaring pb -- but who knows this better then you ;-)
> In addition to the Priv Block addition, you will have to figure out what is the security policy the security mgr is using. Because you will have to add policy permission there for your test class.
OK, unless you do this -- which is much more work than simple SM disable/enable.
It's not like we're breaching security here :-), it's just that we want to stick with it,
in order to see if the tested code actually has proper PBs, not the test itself. ;-)
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/530190#530190
16 years, 1 month