[jboss-dev-forums] [Design of POJO Server] - Re: profile service overview?

emuckenhuber do-not-reply at jboss.com
Mon Aug 17 08:10:09 EDT 2009


"jhalliday" wrote : > The persisted changes will get applied to the BeanMetaData directly before the bean is handed over to MC and installed - so before the bean is instantiated.
  | 
  | huh? The MC is the only thing that knows how to instantiate some beans - the wiring for the factory method is part of the -beans.xml  You are saying the profile service inserts itself after the process that parses the -beans.xml but before the bit that uses the resulting data, then takes upon itself to use the factory to instantiate the bean in place of MC doing that?

We are updating the meta data only, we don't instantiate/touch the bean itself.

Given you have a bean:


  | public class MyBean {
  |    int timeout;
  |    @ManagementProperty
  |    public int getTimeout() { ... };
  |    public void setTimeout(int timeout) { ... };
  | 
  | }
  | 

With it's -beans.xml:

  | <bean name="TimoutBean" class="MyBean">
  |   <property name="timeout">12</property>
  | </bean>
  | 

If there are persisted changes e.g. the timout value was changed to 15 then ProfileService would update the meta data like:
BeanMetaData.setProperty("timeout", 15):

So MC would create the bean still based on the on the -beans.xml descriptor from above, but would inject a value of 15 instead of 12.

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4249906#4249906

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4249906



More information about the jboss-dev-forums mailing list