Re: [Dev] Endpoints stored in registry can not be deleted if there is associations attached to it.
Hi Eranda, Thanks for the quick reply. Since this check was implemented to stop missing associations in endpoints which means we need to keep the store location naming convention[1] as it is. I have one small question if we keep this validation in delete functionality user have to crete a new endpoint each and every time and attach associations or else update the endpoint and reattached the missing associations, Is this the expected behaviour ? Thanks, Thushara. On Mon, Jun 15, 2015 at 8:33 PM, Eranda Sooriyabandara era...@wso2.com wrote: This is the behavior we defined. Endpoints shouldn't be missing when we refer them, in Service or WSDL. Thanks Eranda On Monday, June 15, 2015, Thushara Ranawaka thusha...@wso2.com wrote: Hi, In EndpointMediaTypeHandler[1] when we try to delete an endpoint there is a special validation to check whether endpoint have any dependancies attached and throw an exception[find the attached screen shot]. Because of this validation user can't delete or even edit endpoint address(URL) without removing the associations. I was enable to discover such behaviour in other media types. Is this dependancy check added for a reason or else can we get rid of it by letting user to edit endpoint details?. I try this out locally and currently facing some issues due to missing association after I update the endpoint address(URL). Looks like when we update the endpoint address(URL) we are temporally deleting endpoint artifact[2] then it cant find previous dependancies for some reason. public void delete(RequestContext requestContext) throws RegistryException { if (!CommonUtil.isDeleteLockAvailable()) { return; } CommonUtil.acquireDeleteLock(); Registry registry = requestContext.getRegistry(); String path = requestContext.getResourcePath().getPath(); try { if (path == null) { throw new RegistryException(The resource path is not available.); } checkEndpointDependency(registry, path); //Resource resource = registry.get(path); } finally { CommonUtil.releaseDeleteLock(); } } [1] - https://github.com/wso2/carbon-registry/blob/master/components/registry/org.wso2.carbon.registry.extensions/src/main/java/org/wso2/carbon/registry/extensions/handlers/EndpointMediaTypeHandler.java [2] - https://github.com/thushara35/carbon-governance/blob/b1/components/governance/org.wso2.carbon.governance.api/src/main/java/org/wso2/carbon/governance/api/common/GovernanceArtifactManager.java#L360-360 -- Thanks, Thushara Kasun Ranawaka Software Engineer WSO2 Inc.; http://www.wso2.com lean.enterprise.middleware Mobile : *+94 (0) 773438949 %2B94%20%280%29%20773438949* *thusha...@wso2.com* -- *Eranda Sooriyabandara*Senior Software Engineer; Integration Technologies Team; WSO2 Inc.; http://wso2.com Lean . Enterprise . Middleware E-mail: eranda AT wso2.com Mobile: (812) 964-9032 Linked-In: http://www.linkedin.com/in/erandasooriyabandara Blog: http://emsooriyabandara.blogspot.com/ -- Thanks, Thushara Kasun Ranawaka Software Engineer WSO2 Inc.; http://www.wso2.com lean.enterprise.middleware Mobile : *+94 (0) 773438949* *thusha...@wso2.com thusha...@wso2.com* ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
[Dev] Endpoints stored in registry can not be deleted if there is associations attached to it.
Hi, In EndpointMediaTypeHandler[1] when we try to delete an endpoint there is a special validation to check whether endpoint have any dependancies attached and throw an exception[find the attached screen shot]. Because of this validation user can't delete or even edit endpoint address(URL) without removing the associations. I was enable to discover such behaviour in other media types. Is this dependancy check added for a reason or else can we get rid of it by letting user to edit endpoint details?. I try this out locally and currently facing some issues due to missing association after I update the endpoint address(URL). Looks like when we update the endpoint address(URL) we are temporally deleting endpoint artifact[2] then it cant find previous dependancies for some reason. public void delete(RequestContext requestContext) throws RegistryException { if (!CommonUtil.isDeleteLockAvailable()) { return; } CommonUtil.acquireDeleteLock(); Registry registry = requestContext.getRegistry(); String path = requestContext.getResourcePath().getPath(); try { if (path == null) { throw new RegistryException(The resource path is not available.); } checkEndpointDependency(registry, path); //Resource resource = registry.get(path); } finally { CommonUtil.releaseDeleteLock(); } } [1] - https://github.com/wso2/carbon-registry/blob/master/components/registry/org.wso2.carbon.registry.extensions/src/main/java/org/wso2/carbon/registry/extensions/handlers/EndpointMediaTypeHandler.java [2] - https://github.com/thushara35/carbon-governance/blob/b1/components/governance/org.wso2.carbon.governance.api/src/main/java/org/wso2/carbon/governance/api/common/GovernanceArtifactManager.java#L360-360 -- Thanks, Thushara Kasun Ranawaka Software Engineer WSO2 Inc.; http://www.wso2.com lean.enterprise.middleware Mobile : *+94 (0) 773438949* *thusha...@wso2.com thusha...@wso2.com* ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Endpoints stored in registry can not be deleted if there is associations attached to it.
This is the behavior we defined. Endpoints shouldn't be missing when we refer them, in Service or WSDL. Thanks Eranda On Monday, June 15, 2015, Thushara Ranawaka thusha...@wso2.com wrote: Hi, In EndpointMediaTypeHandler[1] when we try to delete an endpoint there is a special validation to check whether endpoint have any dependancies attached and throw an exception[find the attached screen shot]. Because of this validation user can't delete or even edit endpoint address(URL) without removing the associations. I was enable to discover such behaviour in other media types. Is this dependancy check added for a reason or else can we get rid of it by letting user to edit endpoint details?. I try this out locally and currently facing some issues due to missing association after I update the endpoint address(URL). Looks like when we update the endpoint address(URL) we are temporally deleting endpoint artifact[2] then it cant find previous dependancies for some reason. public void delete(RequestContext requestContext) throws RegistryException { if (!CommonUtil.isDeleteLockAvailable()) { return; } CommonUtil.acquireDeleteLock(); Registry registry = requestContext.getRegistry(); String path = requestContext.getResourcePath().getPath(); try { if (path == null) { throw new RegistryException(The resource path is not available.); } checkEndpointDependency(registry, path); //Resource resource = registry.get(path); } finally { CommonUtil.releaseDeleteLock(); } } [1] - https://github.com/wso2/carbon-registry/blob/master/components/registry/org.wso2.carbon.registry.extensions/src/main/java/org/wso2/carbon/registry/extensions/handlers/EndpointMediaTypeHandler.java [2] - https://github.com/thushara35/carbon-governance/blob/b1/components/governance/org.wso2.carbon.governance.api/src/main/java/org/wso2/carbon/governance/api/common/GovernanceArtifactManager.java#L360-360 -- Thanks, Thushara Kasun Ranawaka Software Engineer WSO2 Inc.; http://www.wso2.com lean.enterprise.middleware Mobile : *+94 (0) 773438949* *thusha...@wso2.com javascript:_e(%7B%7D,'cvml','thusha...@wso2.com');* -- *Eranda Sooriyabandara*Senior Software Engineer; Integration Technologies Team; WSO2 Inc.; http://wso2.com Lean . Enterprise . Middleware E-mail: eranda AT wso2.com Mobile: (812) 964-9032 Linked-In: http://www.linkedin.com/in/erandasooriyabandara Blog: http://emsooriyabandara.blogspot.com/ ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev