[jboss-dev-forums] [Design of POJO Server] - Re: bean/mbean integration issue
adrian@jboss.org
do-not-reply at jboss.com
Fri Jan 12 08:29:52 EST 2007
"alesj" wrote : I added DispatchContext interface.
|
This interface is not correct.
PropertyMetaData and ParameterMetaData are POJO specific.
This interface belongs in the dependency module that knows nothing about
POJOs/services.
You need something like the DynamicMBean interface
| Object get(String name) throws Throwable;
| void set(String name, Object value) throws Throwable;
| Object invoke(String name, String[] signature, Object[] parameters) throws Throwable;
|
The kernel/pojo context will turn this into joinpoint invocations on the context's target.
| public Object get(String name) throws Throwable
| {
| KernelController controller = (KernelController) getController();
| Kernel kernel = controller.getKernel();
| KernelConfigurator configurator = kernel.getConfigurator();
|
| Object object = getTarget();
| BeanInfo info = getBeanInfo();
|
| TargetttedJoinpoint joinpoint = configurator.getPropertyGetterJoinpoint(info, name);
| joinpoint.setTarget(object);
| return joinpoint.dispatch();
| }
|
The service context will turn them into mbean invocations, e.g.
| public Object get(String name) throws Throwable
| {
| return serviceController.getMBeanServer().getAttribute(objectName, name);
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4000931#4000931
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4000931
More information about the jboss-dev-forums
mailing list