Hi,
In the first place, I would like to congratulate you on your efforts and
making JSF Templating popular.
I am glad to be involved with this forum and send the attached proposal
for making JSF Templating even more useful and popular.
You may see from the proposal that basically what I am proposing for is
to discover the annotations on a POJO, create corresponding GUI and
enable the runtime management.
Please let me know your comments/suggestions and what it would take to
make this happen.
Thanks,
Sreeni.
Proposal for exposing Management Info through JSF Templating.
-------------------------------------------------------------
Sreenivas Munnangi, 29jan08
GlassFish V3 is based on modular architecture and provides for extensibility by enabling integration of external modules. These modules would like to be managed and monitored the same way GlassFish V3 does. To facilitate the runtime management, the external module will expose its management thru GUI so that the user experience is uniform.
One approach is to ask the developer to come up with all the GUI code by himself so that it intergates into GlassFish V3 GUI. And an easier appraoch for simple CRUD functionality would be to ask the developer to annotate the POJO and discover those annotations at compile time or runtime and generate the GUI code ourselves instead of burdening the developer and I am sure many developers will love such a facility.
For example, consider the following POJO and its interest in being exposed in GUI through the annotation @GUI
@RuntimeMgmt
@GUI
public class MangeNewModule {
@ManagedAttribute
public int getCacheSize() {...}
@ManagedAttribute
public void setCacheSize(int size) {...}
@ManagedAttribute
public String getModuleName() {...}
@ManagedOperation
public void start() {...}
@ManagedOperation
public void stop() {...}
@ManagedOperation
public void refresh(Integer minThreshold, Integer maxThreshold) {...}
}
Corresponding to the above annotations, the GUI is expected to display the following and allow for the update appropriately.
------------------------------------------------------
ManageNewModule:
CacheSize: ____ <update>
ModuleName: ____
<start>
<stop>
MinThreshold: ____ MaxThreshold: ____ <refresh>
------------------------------------------------------
- CacheSize can be updated because it has setter and getter methods
- ModuleName cannot be updated because it doesn't have a setter
- start and stop methods need to be invoked without any parameters
- refresh method needs to be invoked with 2 parameters, minimum and maxmimum thresholds.
Above is a simple scenario for us to get started and I am sure several improvements will be possible as we progress. Some of them include representing complex data types, and describining annotations in more detail to enable Rich Interface.