Hi there,
over the last couple of weeks I have been working on a small project(in my free time) to
provide RESTful access to some common management/metrics tasks for JBoss(currently tested
on 5.1.0.GA). An early access build can be found on the project web site
http://code.google.com/p/jboss-admin-rest/ just copy
"jboss-admin-rest-1.0-SNAPSHOT.war" to your jboss deploy directory and off you
go.
The interface allows for remote deployment of artifacts(war, ear, etc) and components
(DataSource, ConnectionFactory etc) as well as inspecting(where appropriate) some useful
metrics. Full information is provided for WAR, DataSource and EAR, for other types of
deployments we just display some basic info. Further, access to server logs and general
server information is provided. XML representation is returned(we have partial support for
JSON) for the inspection. I suggest you use firefox/ie that they have built-in support for
displaying xml.
I tried to comply with rest principles e.g. posting a new artifact results in "201
Created", undeployment results in "200 OK", artifact not found results in
"404 Not Found" etc but we still need some work if we want to be fully
compliant. There is doc.txt file that contains a TODO list on what we want to provide. On
the project's web site you can find a list of all supported operations with their
respective urls.
The project uses JBoss RESTEasy JAX-RS implementation(of course ;) and the new Management
API's introduced in JBoss 5. Information on how things work on the management api, was
extracted from the jboss-as-5 jopr/embjopr plugin as well as the unit tests in
http://anonsvn.jboss.org/repos/jbossas/branches/Branch_5_x/testsuite/src/....
Further we are maven based so you can easily compile/install (hopefully ;). I use jdk 1.6
as my primary jdk for development. If you want to run it jdk1.5 remove the
"exclusions" from the pom file. These are the activation and jaxb api's that
they already come with jdk 1.6.
In the subversion repository(trunk) there is a folder "testapps" that contains
some deployment artifacts(war, ear, datasource, ejb3) that were used for testing. You can
use them to play around. Information on how can you access the svn repository is provided
in
http://code.google.com/p/jboss-admin-rest/source/checkout. They also provide web-based
browsing of source code.
As a final note, keep in mind that I am newcomer both in JAX-RS, JAXB and management
api's so don't expect to have come up with the "best" solution. But I am
willing to learn and I would be glad if I can have feedback so that I can improve this
work.
Document, explain, blog, experiment, test-drive, have fun and spread the word :-)
Regards,
Christos
P.S I hope developers excuse me for using "org.jboss.admin.rest" package name.
If there is any problem using it I can rename it.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4259754#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...