Hello Lukas -
Thank you for the suggestion. I didn't think about that but now I do have a
follow up question because I think that it is a good idea.
How about this. Instead of using a single map to define the scheduled job I
can use the list (as done is the custom server plugin sample) and always
have a single map entry as a default. Then using the ControlFacet feature,
the user can add a new entry to the scheduled map list (which they will
have to fill out later).
So basically the idea is to use the ControlFacet's invoke method to insert
a new job schedule definition or whatever that is called and then allow the
user to set the parameters for that new entry under the server plugin
definition page.
Now the question is: I can get access to the Server plugin context but
what should I use to insert a new schedule definition record from the
invoke method within the Server Plugin Component? In other words is it
possible to programmatically modify the rhq-serverplugin.xml on runtime
(i.e. while the server is running)?
If so, are there APIs that I can use to do this (i.e. do the CRUD for the
job definition)? What I want to do is grab an existing record, clone it and
just change its name and save it as a new instance of the schedule, which
the user can later be presented with in order to set the parameter values
for that new job instance.
The reason I am going this way is that there is now way to know how many
records to insert to begin with and so having the option of adding or
deleting would be the best way to approach this.
Is this feasible with the current design of RHQ?
Note: if it will help I can send you my code so you can take a look at it
and see what I am talking about.
Also on another related note I have a question with regard to how the
server plugins are deployed. What class are you guys using to deploy the
plugins (i.e. when the plugin jars are placed in the plugins folder, what
class are you using to deploy them to the jboss as server). The reason I am
asking is that I am writing an arquillian test for my plugin and I am
having issues with the deployment manager that the arquillian container
adapter is using because it is not expecting a jar by itself as a
deployable module unless it is an ejb (which the server plugin are not) so
I was wondering about how you guys are doing this under the hood so I can
take a look and see how to work around that with Arquillian.
Regards,
--
Claudianus
Re ---
I think that is not possible. There is always only a single instance of the
plugin running inside the server.
But what prevents you from handling multiple content sources from within
that
single instance? I obviously don't know your code and you probably have good
reasons for that - I just immediately don't see any hurdles on the RHQ side
that would prevent you from doing that.
Lukas
Show replies by date