[JBoss-dev] [JMX on JBoss (JBoss/JMX)] - Re: ModelMBeanAttributeInterceptor flaw

2004-02-12 Thread [EMAIL PROTECTED]
View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3821346#3821346

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3821346

setter chain is the mbean.setAttribute() chain, this however can be mapped to an 
operation in an MBean -- so you have for instance



setAttribute(Foo)



mapped to operation readFoo rather than the JavaBean setFoo() convention.



I redirected the invocation back to the top of the readFoo chain in case a) there's 
a security check that needs to be performed on operation readFoo and don't want the 
setAttribute chain to accidentally bypass this b) there's some semantic in readFoo 
interceptors that should be executed as part of the setAttribute() call.






---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [JMX on JBoss (JBoss/JMX)] - Re: ModelMBeanAttributeInterceptor flaw

2004-02-12 Thread [EMAIL PROTECTED]
View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3821348#3821348

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3821348

The comment on TODO in the code points out that an invocation itself should be a 
Dispather interface implementation, and therefore invocations could be chained (where 
in this case the setAttribute()'s dispatcher would in reality be another Invocation 
with any additional logic needed to execute the operation that performs the set), 
rather than going back up to the invoker.




---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [JMX on JBoss (JBoss/JMX)] - Re: ModelMBeanAttributeInterceptor flaw

2004-02-12 Thread starksm
View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3821351#3821351

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3821351

I get the need to have the dispatch of the logical setAttribute(Foo) to some method 
other than setFoo on the resource, but the Invocation type is not staying consistent 
with the invocation coming from the server. The use case I'm working with is to set an 
authentication interceptor globally that only handles operations originating from the 
MBeanServer invoke call. The invocation of the 'notSetFoo' operation to actually set 
the 'Foo' attribute still should have type InvocationContext.OP_SETATTRIBUTE.



However, since an Invocation is already a dispatcher, what I would like to see in the 
ModelMBeanAttributeInterceptor invoke implementation is:





 if (setMethod != null)

 {

// if setter was found, invoke the corresponding setter operation

try

{

   invocation.dispatch();

}

catch (Throwable t)

{

   throw new InvocationException(t);

}

 }





With the attribute InvocationContexts setup correctly to have the method

dispatcher. Do you see a problem in making this change?




---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [JMX on JBoss (JBoss/JMX)] - Re: ModelMBeanAttributeInterceptor flaw

2004-02-12 Thread [EMAIL PROTECTED]
View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3821352#3821352

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3821352

starksm wrote :  The invocation of the 'notSetFoo' operation to actually set the 
'Foo' attribute still should have type InvocationContext.OP_SETATTRIBUTE.





Agreed.



starksm wrote : 

However, since an Invocation is already a dispatcher, what I would like to see in the 
ModelMBeanAttributeInterceptor invoke implementation is:





 if (setMethod != null)

 {

// if setter was found, invoke the corresponding setter operation

try

{

   invocation.dispatch();

}

catch (Throwable t)

{

   throw new InvocationException(t);

}

 }





With the attribute InvocationContexts setup correctly to have the method

dispatcher. Do you see a problem in making this change?





Don't see a problem. That was the original intention with Invocation acting as a 
dispatcher.






---
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps  Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click
___
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development