I am trying to create a 3.rd party persistent store and I have done with the conf. The only problem is: the samples are showing this like I need to write code in order to get the cache instance and then I need to call loadcache function.
Is there a way to call it over config(default-config.xml)?
I think what you might need is a Ignite LifecycleBean, which can be configured inside of XML file. More information here: https://apacheignite.readme.io/docs/ignite-life-cycle#section-lifecyclebean
I don't think that it can be done via XML configuration file. You have to call IgniteCache.loadCache() explicitly.
Related
We have usecase where we need to call an API that uploads its respective category of unique file.
For every API call we need to use a unique FileName. I mean File once used in an API call should not be used again.
For Example
CarAPI will be called by uploading a file-name from list of files (CarAP_1.xml to CarAP_1000.xml files)
File CarAP_1.xml once used in an API call should not be used again in next call
BikeAPI will be called by uploading a file-name from list of files (BikeAP_1.xml to BikeAP_1000.xml files)
File once used in an API call should not be used again.
Any thoughts or inputs on how we can achieve this using JMeter.
You can put these filenames
either to a CSV file and use HTTP Simple Table Server, its READ endpoint has KEEP=false mode so once the data is used it will be removed from memory hence you can avoid duplicate requests
or to Redis and use Redis Data Set Config which also provides possibility to remove the data from the list once it has been utilized
Both plugins can be installed using JMeter Plugins Manager
Is there a way to see TeamCity configurations that override parameter defined in template?
I don't think so. What's worked for me in the past was to search through the project files on the filesystem. If you have many build configs, this will be faster than opening each of them in the GUI.
Search for something like this:
<param name="myParamInheritedFromTemplate" value="myOverrideValue" />
in <TeamCity data directory>/config/projects/**/*.xml. If it's absent in an XML file, that build config just inherits the value. If it's present, it overrides it.
It's hacky but it's quick.
There is a feature request https://youtrack.jetbrains.com/issue/TW-21212, please vote. Current workaround are to either search the raw XML files with the settings stored under TeamCity Data Directory on the server as #sferencik suggested, or use REST API to get settings of all the build configurations and search for the parameter there. Let me know if you need help on any of these.
From what I've heard, A controller command can be invoked from within a scriptlet. But I am not sure of other methods. Any code level information would be very helpful.
You can also try making AJAX call from the JSP to the controller command.
You really shouldn't be directly executing a controller command from within the scriptlet code of a JSP. You could use AJAX to call a command service. Or you could use a DataBean Command, though they are really meant to be commands that populate the databean not really call controller commands. You may also be in a situation that you need to review your use of a controller command, possibly BOD commands would be a better fit if you are wanting to invoke a service from the JSP during the page generation.
You could create your own mapping of your ControllerCommand to REST.
http://www-01.ibm.com/support/knowledgecenter/SSZLC2_7.0.0/com.ibm.commerce.webservices.doc/tasks/twvrestsamplecmd.htm
Then you use the REST tag to run the ControllerCommand.
http://www-01.ibm.com/support/knowledgecenter/SSZLC2_7.0.0/com.ibm.commerce.component-services.doc/refs/rwvwcfresttag.htm
In the new implementation from IBM in FEP8 this will be done locally if possible and will therefor not add any extra network overhead.
By Using Databean also we can invoke controller commands.
ex : <wcbase:usebean>
Background: We are using grails 2.1.1. We are not using any DB as of now. We make a web service call for each response on another server.
Now the problem is, there is web service call which returns some static data in XML form and this data is usable throughout the application. The size of the xml is around 40kb. This xml contains static data like, project_list, status_type_list etc. and we have to use this in various dropdowns and menu items in different gsp pages.
So, please suggest us the best way to handle this data. So that it doesn't effect our page load time and browsing experience. And also we can easily use the data on client side.
responding to your comment on the question. I would prefer using annotation based caching over the plugin, if the requirement is as simple as you state that it is.
If the calls are being made from server-side and you want to cache the results of the parsed XML then you can do something like:
#Cacheable("staticDataCache")
def getStaticDataFromXML() {}
You can then use the above method to pull the maps, lists whatever data structure you've used to store the result and it will pull it from the cache.
and then another service method to flush the cache, which you can call frequently from a Job.
#CacheFlush("staticDataCache")
def flushStaticDataCache() {}
Use the cache plugin to cache the static xml data. And then add some policy as to when the cache should be updated... (i.e. using a job to check if the xml has changed every hour)
I am working on a task in which I have used HMVC. In it I have to check each controller name and compare it with database value before it loaded every time. Is there any way to accomplish this task.
You can use hooks to intercept the execution before a controller is created.
see Hooks - Extending the Framework Core for details.
This will be executed on every request, so if you really need to compare this with database values, consider using a cache like APC to store the database entries.
You can use to get the controller name:
$this->uri->segment(1);
But this won't work if you have controller is in sub folder structure.