1 Reply Latest reply: Dec 1, 2011 11:43 AM by Tom Cunningham RSS

Create services via API instead of via jboss-esb.xml file?

Tim Collins Newbie

I need to create, modify, and delete ESB services via a web page without restarting the server and without modifying the jboss-esb.xml file nor re-building .esb files.

 

I am using a service copied from the SOAPProxy quickstart to both intercept and proxy to an outside server, and in some cases to act like a web service endpoint that has a list of actions where the business logic actually lives.  I

 

'd like, in response to user interaction through a web page, to change the proxy URL of a running service.  I'd like to add and remove these services through back-end code controlled by a web page as well.  My code will provide services such as logging and monitoring which web servicesmethods are invoked, record and track performance, provide debugging of SOAP messages and so on.  I have a collection of actions that performs certain business operations as a side effect of certain messages, but that part I can handle myself with JPA/Hibernate etc.

 

I'd like to write some code that would be able to, at startup time, read parameters from a database and create 0, 1 or more of these service objects, modify them on-the-fly, remove them, or add new ones while running.  All without building a fresh .esb file and without restarting the server.

 

I presume that each service with a SOAPProxy can only proxy one .wsdl.  If just one service could proxy multiple .wsdl URLs configured on the fly then perhaps that would be just as good as doing CRUD on ESB services.

 

Is this practical to do with JBoss ESB, or should I try another approach entirely?  Run everything through "membrane" somehow?  My group is already pretty committed to packaging business logic in ESBs in our current implementation.

 

Tim Collins

  • 1. Re: Create services via API instead of via jboss-esb.xml file?
    Tom Cunningham Master

    Starting and stopping services is entirely possible through JMX - take a look at the monitoring and management section in the Administration Guide.

     

    Where you are going to run into problems is creating / modifying services on the fly.      Hot deployment and remote deployment of ESB packages is supported, so if you wanted you could generate a new ESB package and then deploy it out remotely to the server without restarting anything.      I don't think that's the greatest idea, but it's certainly possible.   Creating ESB services programmatically is not supported though.

     

    I don't see the multiple SOAPProxy wsdl URL thing as an issue - you should be able to create multiple services for proxying and then route them in whichever direction you want to.     If you want to get more dynamic than that, here's some ideas on how to leverage UDDI :

     

    http://community.jboss.org/thread/156292

     

    I'd also look into the properties service and maybe the webservice_proxy_routed quickstart example for more ideas on maybe how to do what you want in a different manner.