On 2002.08.21 16:49:21 -0400 Matt Munz wrote:
> 
> David,
> 
>   Thanks again for your insight.
> 
> > I think that the metadata actually includes the current values for all
> the
> > attributes, in the "value" descriptor for each attribute.  So
> serializing
> 
>   I think I get this, but just to be sure -- I found
> ModelMBeanAttributeInfo.getDescriptor().  To get to this, I need to cast
> MBeanAttributeInfo (down) to ModelMBeanAttributeInfo.  I gather that this
> is
> a safe operation based on the assumption that  MBeanAttributeInfo's on a
> Model MBean are always ModelMBeanAttributeInfo's.  Let me know if you
> know
> if this is an incorrect assumption.

I believe that is a correct assumption.
> 
> > What I don't understand from the book's example is how, on load, the
> > descriptor value gets fed into the managed resource.  There's some way
> to
> > do this, I did it for creating xmbeans directly from *-service.xml ;-)
> but
> > I'm not seeing how this will happen from the persistence load operation
> > yet.
> 
>   This is a good question.  I think that this will require some extra
> information being passed to the PersistenceManager.  The path to the
> model
> object is MBean -> interceptor stack -> (intervening interceptors) ->
> ObjectReferenceInterceptor -> (other classes) -> model object.  Its just
> a
> matter of getting a reference to one of these classes passed to the
> PersistenceManager, I think, ...  Alternatively, I can try making the
> matching calls to setAttribute() for each loaded attribute.  This may be
> a
> messy solution, however...

mmm, I think that's what I did for the initial load from *service.xml.  I
wonder if there is some way to combine the persistence mechanism with the
jboss configuration mechanism, i.e. eliminate most of ServiceConfigurator??
Anyway this is for down the road and not your immediate concern etc etc.

Thanks!

david jencks


> 
>   - Matt
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of David Jencks
> Sent: Tuesday, August 20, 2002 4:01 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [JBoss-user] Re: XMBean Persistence
> 
> 
> I think that the metadata actually includes the current values for all
> the
> attributes, in the "value" descriptor for each attribute.  So serializing
> the metadata will bring the current values with it... at least if there
> have been no internally generated value changes to get the descriptor
> value
> out of synch with the internal value. ( I don't understand all the issues
> with this).
> 
> What I don't understand from the book's example is how, on load, the
> descriptor value gets fed into the managed resource.  There's some way to
> do this, I did it for creating xmbeans directly from *-service.xml ;-)
> but
> I'm not seeing how this will happen from the persistence load operation
> yet.
> 
> david jencks
> 
> 
> On 2002.08.20 14:03:19 -0400 Matt Munz wrote:
> > (copied from the forums)
> >
> > Hi all,
> >
> > Is XMBean persistence supposed to persist the metadata, data (model
> > object
> > state), or both?
> >
> > I've been able to get this working to a point, based on the suggestions
> > made
> > by David. I now have a service whose Persistence Manager class is
> > instantiated when the model MBean is created and is invoked according
> to
> > the
> > persistence policy.
> >
> > Now it's time to fully implement the persistence manager class. It
> seems
> > that, to do what I want it to do, the PersistenceManager interface
> should
> > be
> > modified. Since this is the first major diversion I'm making from the
> > existing architecture, I thought I'd ask all of you to verify that I am
> > on
> > the right track.
> >
> > What is the Persistence Manager supposed to do, exactly? It occurs to
> me
> > that what I want it to do is to persist the state of the object that is
> > being managed by the MBean. For example, say I have an XMBean that has
> a
> > User object as its model. If I use the JMX Agent to change the Name
> > attribute of the User object to "Fred", then the persistence manager is
> > called, and I would expect the persistence manager to store the string
> > "Fred" in the persistence store.
> >
> > When I look at the persistence code on p. 222 of "JMX: Managing
> J2EE...",
> > however, I see that only the metadata is persisted/loaded. The fact
> that
> > the
> > Name attribute is read/write, for example, is stored, but the actual
> > content
> > ("Fred") is not, as far as I can tell.
> >
> > What should I be persisting here -- data, metadata, or both?
> >
> > Thanks again for all the help so far.
> >
> > - Matt
> >
> >
> >
> > -------------------------------------------------------
> > This sf.net email is sponsored by: OSDN - Tired of that same old
> > cell phone?  Get a new here for FREE!
> > https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
> > _______________________________________________
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/jboss-user
> >
> >
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by: OSDN - Tired of that same old
> cell phone?  Get a new here for FREE!
> https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by: OSDN - Tired of that same old
> cell phone?  Get a new here for FREE!
> https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> 


-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to