Hi,

Is  this feature targetted for JON 3.0?

If so, I'd like to advocate for having the automated tests developed for this API as part of the feature.  Please consider including automated tests as part of the task breakdown as this feature gets slotted into a sprint.

--Mike


From: "Heiko W.Rupp" <hrupp@redhat.com>
To: rhq-devel@lists.fedorahosted.org
Cc: rhq-users@lists.fedorahosted.org
Sent: Monday, June 6, 2011 6:21:54 AM
Subject: Re: REST Api (was Re: Custom UI? )

Hi,

I sat down over the weekend (and some time this morning) to implement a first REST provider.
This code is in git in branch heiko-rest ( http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=shortlog;h=refs/heads/heiko-rest ).

The code is *far from production* but serves for bootstrapping the REST api work.
If you want to play with it, you need to run a container build so that the rest libraries get copied to server/default/lib.

Aside from the pure providing of resources , there are two technical issues still to solve:

* accessing resources (e.g. http://localhost:7080/rest/resource/r/10001 ) will result in a LazyLoad exception,
 as the marshalling code works outside the EJBs with JPA sessions in the servlet code.
* How to impose security ?

My guess is that both cases could be handled by some sort of Servlet filters. The first case could also be addressed
by "DTOs" tailored for the REST api (but I'd like to use the standard domain objects).

For a successful call use the url http://localhost:7080/rest/resource/a/10001 (assuming you have resources
in inventory).

  Heiko

_______________________________________________
rhq-devel mailing list
rhq-devel@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/rhq-devel