Need advice about server-side actions

John Mazzitelli mazz at redhat.com
Tue Jul 5 09:35:06 UTC 2011


> That works fine, except that the URL in that field cannot be copied and
> pasted anywhere!  Can this field be made copyable?

That's probably due to the read-only nature of the fields in the 
ConfigurationEditor. There might even be a BZ on this - I know many of 
us have noticed this before.

Ian - how easy is it to fix that? Didn't we figure out a trick in 
SmartGWT to get the text field to reject user input but have it not be 
disabled (setDisabled(true))? I seem to recall we had this conversation 
a few months ago :) I think it should be easy to do this IIRC.

> I also had a problem with the snapshot operation timing out.  I am using
> SupportManager.getSnapshotReport(), so there is not the usual option to
> supply a timeout that an ResourceOperationSchedule provides.  Is there
> any way to set a timeout, maybe at a global level?

There is not, no. That snapshot feature is not really to be considered 
fully built out with all the bells and whistles (this is why there is no 
easy UI interfacing to it). There is probably lots more we can do here 
to fill out that feature - this customizable timeout is one such 
feature. Can you write up a bugzilla on this.

For the record, the code gives your plugin 10 minutes to complete the 
building of the snapshot report. See the plugin container class called 
org.rhq.core.pc.support.SupportManager:

     public InputStream getSnapshotReport(int resourceId, String name, 
String description) throws Exception {
         SupportFacet facet = getSupportFacet(resourceId, 600000L); // 
give it enough time to zip up all the snapshot content

What we will probably do here is change that method API, collapse those 
parameters into a single parameter "SnapshotReportRequest" (to mimic the 
plugin API). We could then add a timeout to the request and pass it to 
the second parameter you see there to getSupportFacet.


More information about the rhq-devel mailing list