Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8274171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:39:23+00:00 2026-06-08T07:39:23+00:00

We have different services deployed in DSS and we have a different way of

  • 0

We have different services deployed in DSS and we have a different way of caching:

  • no cache
  • 1 hour cache
  • 1 day cache

Is there any way to set this caching directly to each dbs file without using the administration console?

Another way would be to set these three caches through a configuration file and then to refers to them from the dbs files.

The solution we are looking for, is without using the administration console.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T07:39:24+00:00Added an answer on June 8, 2026 at 7:39 am

    It is indeed possible to configure caching for dataservices via a configuration file without using the management console. Each dataservice is deployed as form of a axis2 service. Therefore you can use the “services.xml” file which you would typically use to configure axis2 service related parameters, with dataservices too with a slight modification. That is, if the name of your dataservice is “TestDS” then you have to name your services.xml file as “TestDS_services.xml” and place it inside the dataservices deployment directory which can be located at “DSS_HOME/repository/deployment/server/dataservices”. Then you can include a caching policy having your own values as the parameters inside the aforementioned configuration file. Also it is important to note that, you can engage caching in three levels for a dataservies namely, per service group/per service/per operation.

    A sample services.xml is show below.

    <serviceGroup>
        <service name="TestDS">
            <!--parameter name="ServiceObjectSupplier">org.apache.axis2.engine.DefaultObjectSupplier</parameter-->
        <Description>Enabling caching through sevices.xml</Description>
    
        <operation name="op1">
            <messageReceiver class="org.wso2.carbon.dataservices.core.DBInOutMessageReceiver"/>
        <module ref="wso2caching"/>
            <wsp:Policy
                wsu:Id="WSO2CachingPolicy"
                xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
                xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsch:CachingAssertion xmlns:wsch="http://www.wso2.org/ns/2007/06/commons/caching">
            <wsp:Policy>
                <wsp:All>
                <wsch:XMLIdentifier>org.wso2.caching.digest.DOMHASHGenerator</wsch:XMLIdentifier>
                <wsch:ExpireTime>70000</wsch:ExpireTime>
                <wsch:MaxCacheSize>1000</wsch:MaxCacheSize>
                <wsch:MaxMessageSize>1000</wsch:MaxMessageSize>
                </wsp:All>
            </wsp:Policy>
            </wsch:CachingAssertion>
            </wsp:Policy>
        </operation>
    
        <operation name="op2">
            <messageReceiver class="org.wso2.carbon.dataservices.core.DBInOutMessageReceiver"/>
        <module ref="wso2caching"/>
            <wsp:Policy
                wsu:Id="WSO2CachingPolicy"
                xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
                xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsch:CachingAssertion xmlns:wsch="http://www.wso2.org/ns/2007/06/commons/caching">
            <wsp:Policy>
                <wsp:All>
                <wsch:XMLIdentifier>org.wso2.caching.digest.DOMHASHGenerator</wsch:XMLIdentifier>
                <wsch:ExpireTime>600000</wsch:ExpireTime>
                <wsch:MaxCacheSize>1000</wsch:MaxCacheSize>
                <wsch:MaxMessageSize>1000</wsch:MaxMessageSize>
                </wsp:All>
            </wsp:Policy>
            </wsch:CachingAssertion>
            </wsp:Policy>
        </operation>
            <operation name="op3">
            </operation>
    
        </service>
      </serviceGroup>
    

    After placing your “data_service_name”_services.xml file inside the aforesaid directory, you have to comment out the following entry from the axis2.xml configuration file that can be located at “DSS_HOME/repository/conf” directory.

    <listener class="org.wso2.carbon.core.deployment.DeploymentInterceptor">
    

    Now you’re good to go with your deployment. Restart the server and you’ll be able to get the aforementioned functionality working.

    NOTE: You would also want to be informed that a lot of improvements have been done on this space in DSS for our immediate upcoming DSS release. (DSS 3.0.0).

    Regards,
    Prabath

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to communicate between two different services? I have a service
I have a WCF Service Application. I have 2 different contracts(services). I did this
Various online services have different values for maximum year of expiry, when it comes
In our infrastructure we have several nodes with different capabilities (in terms of services).
I have different php output in jQuery-based tabs. This output is formed from database
I have the same ASP.NET WebService deployed 3 times under 3 different URI's configured
I've been working with about a dozen WCF Services that have been deployed to
Scenario: I have several services that I want to be discovered by different clients.
I have a web application deployed in an internet hosting provider. This web application
I have 2 different windows services that should be installed by a single setup

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.