Title: Re: [JBoss-dev] MBean persistence?

Like Matt, I have concerns about modifying the files in the deployment as well. I think his concerns about division of roles are valid - I'd go further and say this needs to be able to handle a split between 'deployer' and 'operator/sys admin' as well (where e.g. deployer defines which database to use, the sys admin defines the connection pool size).
 
There are also circumstances where the SAR will be unmodifyable - e.g. if it is set read-only on the OS or if it is loaded from an http: URL.
 
One possibility might be to store the local changes as a transform applied against the original file e.g. an XSLT.
 
This also has the advantage that local changes don't get lost when a new version is received from development. Also the same file can be rolled dev->test->stage->prod without needing to modify the deployment descriptor each time (one of the biggest compaints I've had from sys admins).
-----Original Message-----
From: Matt Munz [mailto:[EMAIL PROTECTED]]On Behalf Of Matt Munz
Sent: Monday, January 13, 2003 8:47 AM
To: [EMAIL PROTECTED]
Subject: RE: [JBoss-dev] MBean persistence?

(copied from a message I sent direct to Bill)
 
Bill,
 
  I couldn't figure out how to add a comment to the task, so I'm just emailing you.
 
  > I think we want seemless integration here
 
  I think you're integrating apples and oranges ;)
 
  What you've described does not match the current behavior of the ObjectStreamPersistenceManager.  Are you saying that the jboss-service.xml files should be dynamically modified?  I think that this adds unneeded complexity.
 
  Here is how I currently use MBean Persistence in my applications.
 
  ---
 
  jboss-service.xml - describes the initial (deploy-time) configuration of the bean, and the location of the corresponding XMBean descriptor xml.
 
  *-xmbean.xml - describes the signature of the metadata for the MBean.  Includes the persistence configuration.  Specifies the persistence type (ObjectOutputStream) and the persistence store name.
 
  /$Persistence_Dir/$Persistence_Store_Name.oos - the file where the MBean Server stores the record of the dynamically changing state of the MBean.
 
  ---
 
  Exchange XML for ObjectOutputStream and .xml for .oos in the above, and I believe we have a production-ready MBean Persistence mechanism.
 
  MBean persistence and MBean deployment are two separate mechanisms/concepts.  This separation of concerns is *very* important, IMO, to preserve flexibility and ease-of-use/development.
 
  There are all sorts of things that need to go into a deployment descriptor that have little to do with the persistent state of the MBean, and vice versa.  Although I see the motivation for a "Grand Unified Descriptor", I don't see a rationale for it.
 
  I think a use case would really help here.  For example, I don't see an individual in the "deployment" role ever touching the deployed archive.  Rather they would use the JMX Console to modify the MBean attributes, which would  be recorded in the MBean Persistence Store (XML, JDBC, OOS, whatever), and that would be the extent of their configuration work.  In the case of an extreme server failure (uncommon), they could hack the store directly when the server was off-line (XML files, JDBC Tables...). 
 
  Although this case is relatively uncommon, I believe this is one example where the separation of concerns mentioned above is useful.  If I get the server into an inconsistent state and, as a result, it fails at restart (the inconsistency is reloaded), then, I can always delete the Persistence Store.  When the server restarts, it returns to a clean-slate (deploy-time) state.  If, as you seem to be suggesting, the (inconsistent) state has been stored in the deployment descriptors themselves, however, this clean-slate is not possible.  One must go through each descriptor until the erroneous state information is found.  Then it must be manually corrected.  Since the MBean persistence engine will be writing to these files automatically, it may not be apparent how to do this.   
 
  Could you explain further the behaviour you would like to see in MBean Persistence?
 
  - Matt
 

<<attachment: winmail.dat>>

Reply via email to