On Mon, Mar 26, 2012 at 2:10 PM, Afkham Azeez <[email protected]> wrote:
>
>
> On Mon, Mar 26, 2012 at 2:05 PM, Hiranya Jayathilaka <[email protected]>wrote:
>
>>
>>
>> On Mon, Mar 26, 2012 at 2:01 PM, Afkham Azeez <[email protected]> wrote:
>>
>>> But you said earlier in this thread
>>>
>>> "We don't need Axis2 level persistence for proxy services. Synapse has
>>> its own persistence logic for proxy services, which takes care of saving
>>> proxy services to the file system."
>>>
>>> But it seems proxy services do need Axis2 level persistence as well
>>> because things like enabling security, engaging modules etc. are handled at
>>> that level.
>>>
>>
>> We need a place to store policies etc. But saving the proxy service
>> configuration is taken care of by our components. What sort of information
>> are written to the file system by this new persistence impl?
>>
>
> Anything that makes changes to an AxisService, ServiceGroup or Axis2
> Module. e.g. engaged modules, enabled policies... basically everything
> related to service-mgt, module-mgt, security-mgt and other such components.
> Everything that used to be stored into registry are now stored in the file
> system.
>
Ok then I guess we need that part too. And I can see that a file has been
created for my proxy service under the metafiles directory (see the
attachment test.xml). Still I'm confused as to why so many
PersistenceExceptions are thrown when updating the configuration or
starting the ESB. Also why can't I enable security on my proxy services?
>From the stacktrace it looks like SecurityConfigAdmin is trying to locate
the service in the registry. Is that behavior correct?
>
>
>>
>> Thanks,
>> Hiranya
>>
>>
>>>
>>> On Mon, Mar 26, 2012 at 1:59 PM, Hiranya Jayathilaka
>>> <[email protected]>wrote:
>>>
>>>>
>>>>
>>>> On Mon, Mar 26, 2012 at 1:41 PM, Afkham Azeez <[email protected]> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Mon, Mar 26, 2012 at 12:50 PM, Hiranya Jayathilaka <
>>>>> [email protected]> wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>> On Mon, Mar 26, 2012 at 12:31 PM, Afkham Azeez <[email protected]>wrote:
>>>>>>
>>>>>>> If you do things like securing a proxy service using the Carbon
>>>>>>> service security UI, where does that information get persisted?
>>>>>>>
>>>>>>
>>>>>> Policy is saved to the registry as usual. Service configuration is
>>>>>> saved to the same proxy service file:
>>>>>>
>>>>>> <proxy name="foo">
>>>>>> ...
>>>>>> <policy key="conf:/path/to/policy"/>
>>>>>> <enableSec/>
>>>>>> </proxy>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> Is this done through an AxisObserver?
>>>>>
>>>> Is the security UI handling proxy services in a different way?
>>>>>
>>>>
>>>> We do have an observer, but security (and other QoS stuff) is handled
>>>> the same way as in Axis2 services.
>>>>
>>>>
>>>>> Is so, we can check for proxy services in the default
>>>>> DeploymentInterceptor, and skip those proxy services. The bottom line is,
>>>>> proxy service persistence through the DeploymentInterceptor has been
>>>>> happening all along.
>>>>>
>>>>
>>>> That's correct, and it was not by accident. Proxy services were also
>>>> stored in the registry along with all other Axis2 services. But Synapse
>>>> loads the services by reading the artifacts in the file system
>>>> (synapse-config directory). So when applying security or some other policy
>>>> we have an observer which persists the relevant changes to the file system.
>>>> So in effect what we had was a hybrid persistence model. The Synapse part
>>>> is stored in the file system and the Axis2 part is stored in the registry.
>>>>
>>>> Thanks,
>>>> Hiranya
>>>>
>>>>
>>>>>
>>>>>>>
>>>>>>> On Mon, Mar 26, 2012 at 12:19 PM, Hiranya Jayathilaka <
>>>>>>> [email protected]> wrote:
>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Mon, Mar 26, 2012 at 12:11 PM, Kasun Gajasinghe <[email protected]
>>>>>>>> > wrote:
>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Mon, Mar 26, 2012 at 11:45 AM, Hiranya Jayathilaka <
>>>>>>>>> [email protected]> wrote:
>>>>>>>>>
>>>>>>>>>> We see a lot of persistence exceptions in the latest ESB packs:
>>>>>>>>>>
>>>>>>>>>> org.wso2.carbon.core.persistence.PersistenceException: A
>>>>>>>>>> transaction is already started. Nested transactions are no longer
>>>>>>>>>> supported
>>>>>>>>>> in the new model
>>>>>>>>>> at
>>>>>>>>>> org.wso2.carbon.core.persistence.file.ServiceGroupFilePersistenceManager.beginTransaction(ServiceGroupFilePersistenceManager.java:62)
>>>>>>>>>> at
>>>>>>>>>> org.wso2.carbon.core.persistence.AbstractPersistenceManager.updateParameter(AbstractPersistenceManager.java:136)
>>>>>>>>>> at
>>>>>>>>>> org.wso2.carbon.core.persistence.ServicePersistenceManager.updateServiceParameter(ServicePersistenceManager.java:775)
>>>>>>>>>> at
>>>>>>>>>> org.wso2.carbon.core.persistence.ServicePersistenceManager.handleExistingServiceInit(ServicePersistenceManager.java:592)
>>>>>>>>>> at
>>>>>>>>>> org.wso2.carbon.core.deployment.DeploymentInterceptor.serviceUpdate(DeploymentInterceptor.java:282)
>>>>>>>>>> at
>>>>>>>>>> org.apache.axis2.engine.AxisConfiguration.notifyObservers(AxisConfiguration.java:652)
>>>>>>>>>> at
>>>>>>>>>> org.apache.axis2.engine.AxisConfiguration.addServiceGroup(AxisConfiguration.java:406)
>>>>>>>>>> at
>>>>>>>>>> org.apache.axis2.engine.AxisConfiguration.addService(AxisConfiguration.java:336)
>>>>>>>>>> at
>>>>>>>>>> org.apache.synapse.core.axis2.ProxyService.buildAxisService(ProxyService.java:566)
>>>>>>>>>> at
>>>>>>>>>> org.wso2.carbon.mediation.configadmin.ConfigurationUpdater.deployServices(ConfigurationUpdater.java:286)
>>>>>>>>>>
>>>>>>>>>> What does this mean? Things seem to work find in spite of the
>>>>>>>>>> exceptions though.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> The way to make sure things work is to restart the server and see
>>>>>>>>> whether the changed parameters are still there.
>>>>>>>>>
>>>>>>>>
>>>>>>>> We don't need Axis2 level persistence for proxy services. Synapse
>>>>>>>> has its own persistence logic for proxy services, which takes care of
>>>>>>>> saving proxy services to the file system.
>>>>>>>>
>>>>>>>>
>>>>>>>>>
>>>>>>>>> Does this seen in server startup? If not, please tell me how to
>>>>>>>>> reproduce this.
>>>>>>>>>
>>>>>>>>
>>>>>>>> Create a proxy service and then update the ESB configuration from
>>>>>>>> the source view.
>>>>>>>>
>>>>>>>>
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>> --KasunG
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Hiranya Jayathilaka
>>>>>>>>>> Associate Technical Lead;
>>>>>>>>>> WSO2 Inc.; http://wso2.org
>>>>>>>>>> E-mail: [email protected]; Mobile: +94 77 633 3491
>>>>>>>>>> Blog: http://techfeast-hiranya.blogspot.com
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Dev mailing list
>>>>>>>>>> [email protected]
>>>>>>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> *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://blog.kasunbg.org* <http://blog.kasunbg.org>
>>>>>>>>>
>>>>>>>>> *
>>>>>>>>> twitter: **http://twitter.com/kasunbg*<http://twitter.com/kasunbg>
>>>>>>>>>
>>>>>>>>> *
>>>>>>>>> *
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Hiranya Jayathilaka
>>>>>>>> Associate Technical Lead;
>>>>>>>> WSO2 Inc.; http://wso2.org
>>>>>>>> E-mail: [email protected]; Mobile: +94 77 633 3491
>>>>>>>> Blog: http://techfeast-hiranya.blogspot.com
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Dev mailing list
>>>>>>>> [email protected]
>>>>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> *Afkham Azeez*
>>>>>>> Director of Architecture; WSO2, Inc.; http://wso2.com
>>>>>>> Member; Apache Software Foundation; http://www.apache.org/
>>>>>>> * <http://www.apache.org/>**
>>>>>>> email: **[email protected]* <[email protected]>* cell: +94 77 3320919
>>>>>>> blog: **http://blog.afkham.org* <http://blog.afkham.org>*
>>>>>>> twitter:
>>>>>>> **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez>
>>>>>>> *
>>>>>>> linked-in: **http://lk.linkedin.com/in/afkhamazeez*
>>>>>>> *
>>>>>>> *
>>>>>>> *Lean . Enterprise . Middleware*
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Hiranya Jayathilaka
>>>>>> Associate Technical Lead;
>>>>>> WSO2 Inc.; http://wso2.org
>>>>>> E-mail: [email protected]; Mobile: +94 77 633 3491
>>>>>> Blog: http://techfeast-hiranya.blogspot.com
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> *Afkham Azeez*
>>>>> Director of Architecture; WSO2, Inc.; http://wso2.com
>>>>> Member; Apache Software Foundation; http://www.apache.org/
>>>>> * <http://www.apache.org/>**
>>>>> email: **[email protected]* <[email protected]>* cell: +94 77 3320919
>>>>> blog: **http://blog.afkham.org* <http://blog.afkham.org>*
>>>>> twitter:
>>>>> **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez>
>>>>> *
>>>>> linked-in: **http://lk.linkedin.com/in/afkhamazeez*
>>>>> *
>>>>> *
>>>>> *Lean . Enterprise . Middleware*
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Hiranya Jayathilaka
>>>> Associate Technical Lead;
>>>> WSO2 Inc.; http://wso2.org
>>>> E-mail: [email protected]; Mobile: +94 77 633 3491
>>>> Blog: http://techfeast-hiranya.blogspot.com
>>>>
>>>
>>>
>>>
>>> --
>>> *Afkham Azeez*
>>> Director of Architecture; WSO2, Inc.; http://wso2.com
>>> Member; Apache Software Foundation; http://www.apache.org/
>>> * <http://www.apache.org/>**
>>> email: **[email protected]* <[email protected]>* cell: +94 77 3320919
>>> blog: **http://blog.afkham.org* <http://blog.afkham.org>*
>>> twitter: **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez>
>>> *
>>> linked-in: **http://lk.linkedin.com/in/afkhamazeez*
>>> *
>>> *
>>> *Lean . Enterprise . Middleware*
>>>
>>>
>>
>>
>> --
>> Hiranya Jayathilaka
>> Associate Technical Lead;
>> WSO2 Inc.; http://wso2.org
>> E-mail: [email protected]; Mobile: +94 77 633 3491
>> Blog: http://techfeast-hiranya.blogspot.com
>>
>
>
>
> --
> *Afkham Azeez*
> Director of Architecture; WSO2, Inc.; http://wso2.com
> Member; Apache Software Foundation; http://www.apache.org/
> * <http://www.apache.org/>**
> email: **[email protected]* <[email protected]>* cell: +94 77 3320919
> blog: **http://blog.afkham.org* <http://blog.afkham.org>*
> twitter: **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez>
> *
> linked-in: **http://lk.linkedin.com/in/afkhamazeez*
> *
> *
> *Lean . Enterprise . Middleware*
>
>
--
Hiranya Jayathilaka
Associate Technical Lead;
WSO2 Inc.; http://wso2.org
E-mail: [email protected]; Mobile: +94 77 633 3491
Blog: http://techfeast-hiranya.blogspot.com
<?xml version="1.0" encoding="UTF-8"?>
<serviceGroup name="test" successfully.added="true">
<service name="test" exposed.all.transports="false" service.deployed.time="1332744514914" successfully.added="true">
<operation name="mediate">
<module name="POXSecurityModule" version="4.0-SNAPSHOT" type="engagedModules"/>
<module name="addressing" version="4.0-SNAPSHOT" type="engagedModules"/>
<module name="ServerAdminModule" version="4.0-SNAPSHOT" type="engagedModules"/>
<module name="wso2statistics" version="4.0-SNAPSHOT" type="engagedModules"/>
</operation>
<bindings>
<binding name="testHttpBinding">
<operation name="mediate"/>
</binding>
<binding name="testSoap12Binding">
<operation name="mediate"/>
</binding>
<binding name="testHttpBinding">
<operation name="mediate"/>
</binding>
<binding name="testSoap11Binding">
<operation name="mediate"/>
</binding>
<binding name="testSoap11Binding">
<operation name="mediate"/>
</binding>
<binding name="testSoap12Binding">
<operation name="mediate"/>
</binding>
</bindings>
<policies/>
<module name="POXSecurityModule" version="4.0-SNAPSHOT" type="engagedModules"/>
<module name="addressing" version="4.0-SNAPSHOT" type="engagedModules"/>
<module name="ServerAdminModule" version="4.0-SNAPSHOT" type="engagedModules"/>
<module name="wso2statistics" version="4.0-SNAPSHOT" type="engagedModules"/>
<association destinationPath="/repository/transports/https/listener" type="exposedTransports"/>
<association destinationPath="/repository/transports/http/listener" type="exposedTransports"/>
<parameter name="serviceType" type="1">proxy</parameter>
</service>
</serviceGroup>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev