Hi Kishanthan,
After going through the ServicePersistenceManager, it seems we use it to
see whether a given transport is enabled in the running instance. Since all
the available transports persist the transport config by design (via
org.wso2.carbon.transport.<transport-name> bundles), this mechanism has
been chosen. But this seems like some old code, and is an overkill.
I'm not sure about other references, but I can't find any references to the
actual transport config being read inside ServicePersistenceManager.
ServicePersitenceManager accesses the registry via
TransportPersistenceManager to make sure the a given transport's
configuration is available in the registry at a given registry location.
See the following code segment.
private Resource getTransportResource(Registry registry, String name,
boolean listener) throws
Exception {
String path = RegistryResources.TRANSPORTS + name + "/";
if (listener) {
path += TRANSPORT_LISTENER;
} else {
path += TRANSPORT_SENDER;
}
* if (registry.resourceExists(path)) {*
* return registry.get(path);*
* }*
return null;
}
On Fri, Oct 11, 2013 at 7:06 PM, Kishanthan Thangarajah <[email protected]
> wrote:
> Hi KasunG,
>
> There seems to be some tight dependency between ServicePersistenceManager
> (SPM) and TransportPersistenceManger (TPM).
>
> For example SPM uses some methods from TPM to retrieve transport related
> resources from registry and then add those values to service meta file for
> persisting. I know this is for persisting transport level details in the
> meta-file. But any reason for the above behavior on why it has to access
> registry?
>
> This will cause issues when we try to remove those references of TPM.
>
> Kishanthan.
>
>
> On Fri, Oct 11, 2013 at 2:03 PM, Pradeep Fernando <[email protected]>wrote:
>
>> IIUC, the persistant manager comes in to picture only when we do changes
>> using UI. However we only do transport cofnigs through config files now...
>> Hence +1 to removal.
>>
>> Thanks,
>> --Pradeep
>>
>>
>> On Fri, Oct 11, 2013 at 1:29 PM, Kishanthan Thangarajah <
>> [email protected]> wrote:
>>
>>> Hi,
>>>
>>> While working on removing the part on loading/persisting transport
>>> config from registry I came across several places that that
>>> TransportPersitenceManger class is used. From my understanding the above
>>> class is used to persist/load transport configurations to/from registry.
>>>
>>> What I'm thinking is to deprecate this class and remove its usages. I'm
>>> just checking on this that apart from registry related operations, any
>>> other usage that this class is intended for?
>>>
>>> Thanks,
>>> Kishanthan.
>>>
>>> --
>>> *Kishanthan Thangarajah*
>>> Senior Software Engineer,
>>> Platform Technologies Team,
>>> WSO2, Inc.
>>> lean.enterprise.middleware
>>>
>>> Mobile - +94773426635
>>> Blog - *http://kishanthan.wordpress.com*
>>> Twitter - *http://twitter.com/kishanthan*
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> [email protected]
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> *Pradeep Fernando*
>> Associate Technical Lead;WSO2 Inc.; http://wso2.com
>>
>> blog: http://pradeepfernando.blogspot.com
>> m: +94776603662
>>
>
>
>
> --
> *Kishanthan Thangarajah*
> Senior Software Engineer,
> Platform Technologies Team,
> WSO2, Inc.
> lean.enterprise.middleware
>
> Mobile - +94773426635
> Blog - *http://kishanthan.wordpress.com*
> Twitter - *http://twitter.com/kishanthan*
>
--
*Kasun Gajasinghe*
Software Engineer;
WSO2 Inc.; http://wso2.com
,
*email: **kasung AT spamfree wso2.com
** cell: **+94 (77) 678-0813*
*linked-in: *http://lk.linkedin.com/in/gajasinghe
*
*
*blog: **http://kasunbg.org* <http://kasunbg.org>
*
twitter: **http://twitter.com/kasunbg* <http://twitter.com/kasunbg>
*
*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev