You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Stefan Vladov <ch...@gmail.com> on 2008/02/28 15:41:11 UTC

Dynamic update of policy

Hi guys,

I am trying to figure out, is it possible to dynamically update policies
that are to be applied to a service, without having to redeploy the service?
I am not familiar with axis2 well enough (obviously) so I guess I could be
missing sth. I saw the PolicyInclude object that seems to hold all the
policies of let's say an AxisService, I guess it could be updated, but I
couldn't figure out how to ensure synchronization with already invoked
services. Since the policy element could be used anywhere in the axis2
execution chain (accessible through the message context) I have to make sure
the service, that is to be updated, is not used at the time of the policy
update (for example deactivate/block future service calls -> wait for all
currently running invocations to terminate -> update the service -> activate
the service, however I also need not to loose any service invocation that
were requested during the time the service was inactive...). Is there a way
to check if/when is a web service invoked? I found some ContextListener but
it seems it only applies to the ConfigurationContext and not to the
MessageContext... Additionally if a service is requested in a transaction I
guess I should wait for the transaction to finish before updating the
AxisService.

Besides that I'm curious if the wsdl accessible through a "....?wsdl" get
request to the AxisServlet will have its policy definition updated
automatically, especially in the case of a user supplied wsdl.

Any ideas are welcome. I've been browsing the code base / mail archives for
hours now and I feel lost and desperate...

Best wishes!
Stefan

Re: Dynamic update of policy

Posted by Nandana Mihindukulasooriya <na...@gmail.com>.
Hi Stefan,.

> Any ideas are welcome. I've been browsing the code base / mail archives for
> hours now and I feel lost and desperate...

         In WSO2 WSAS [1] which is built on top of Axis 2, policies of
the services are updated dynamically ( via a management console )
using a web service call to an admin service. I think looking at how
they does it will help you to get an idea. Take a look at the
configureScenario method of SecurityScenarioConfigAdmin [2] and
setPolicy method of the ServiceAdmin [3].

thanks,
/nandana

[1] - http://wso2.org/projects/wsas/java
[2] - https://wso2.org/repos/wso2/trunk/wsas/java/modules/admin/src/org/wso2/wsas/admin/service/SecurityScenarioConfigAdmin.java
[3] - https://wso2.org/repos/wso2/trunk/wsas/java/modules/admin/src/org/wso2/wsas/admin/service/ServiceAdmin.java

http://nandana83.blogspot.com/
http://nandanasm.wordpress.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org