I'm using wro4j with a maven + spring-mvc based web application. I have two different wro.properties file to configure the web app differently when in development mode vs deployment mode. wro4j is configured to run using the runtime solution. The setup is working fine so far.
What I want to be able to do now is that in deployment mode, all the wro4j groups should be built immediately on server start up (as opposed to on-first-request per wro resource). I haven't found a configuration option for this - is there one? If not, how can I go about making this happen?
(I know I can probably get similar result using compile mode for deployment, but given that I already have runtime mode set up I am wondering if I can piggy back on that)
A possible solution is to create a custom requestHandler which would iterate through all the groups and would trigger processing. You would have to invoke that request handler during application startup.
If you would like to have this feature out of the box, feel free to open an issue.
Related
I have a C# MVC application hosted in IIS test environment with only one action method in APIController. Clients call this single method and depending upon the parameters different small processes are performed.
I am using IIS 10.0.17763. Application is built in .Net Framework 4.6
I have disabled these modules as i don't need them.
WebDAVModule
WindowsAuthentication
ScriptModule-4.0
DefaultAuthentication
ServiceModel-4.0
UrlAuthorization
FileAuthorization
The problem is that under load test from jmeter, all calls somehow stay longer in ResolveRequestCache State.
Can someone guide me the problem behind or suggest me something to check. I am not using any kind of caching due to business requirement.
Here is the Screenshot of requests states from IIS
Edit. I have removed some other modules too to check the effect.
Here is the list of loaded modules in my application
I am using go build constraints to conditionally compile constants into my test/staging/production cloud functions. How can I pass -tags ENV to the builder used by gcloud beta functions deploy?
As #Guilherme mentioned in the comments, indeed, it seems that it's not possible to pass the go constraints/tags to the builder used by Cloud Functions.
I searched around and while there isn't this option, I think indeed, having the option to send constraints to the builder used by Cloud Functions. Considering that, I would recommend you to raise a Feature Request for this to be checked by Google.
One option that you might want to give a look at it, it's deploying your application using Cloud Run. As it's informed in their official documentation about this application:
Use the programming language of your choice, any language or operating system libraries, or even bring your own binaries.
Cloud Run pairs great with the container ecosystem: Cloud Build, Container Registry, Docker.
So, this might work for you as a workaround. In this below tutorial, there are the steps to build and deploy a quick application with Go in Cloud Run.
Quickstart: Build and Deploy
Let me know if the information helped you!
I am working on a spring boot application in java. I have a case where I need to pick up some runtime configuration(which can change dynamically without any need of deployment or rebooting the app) and use it in all the classes further ahead. It basically stores all the plug and play configurations I want my app to support.
I have tried listener pattern but it doesn't seem to be the best option since I don't want that config to be listened by a few, rather I want that config to flow through whole of the code.
Is there an existing design pattern or a technique that is a standard for such activity?
Kindly suggest.
In general you need to store the application configuration externally and then listen to changes on that. How the change is notified depends on the runtime environment. For example cloud platforms may have separate decoupled notification systems, desktop application may want to implement a file change listener and so on.
This pattern is generally called Runtime Reconfiguration Pattern (see this link). In conclusion there is no magic that will apply the changes throughout your code, but you will need to listen for the changes and adjust the runtime behavior based on those.
I'm setting up my front-end application to use continuous integration in CircleCI. Unit tests work fine, but end-to-end tests are not.
The problem is that it requires the backend (API) server to be running, and ours is in another completely different application. So, what is the best way to setup this backend server (thinking about CI)?
I thought about uploading it on heroku, but then I'd have to keep manually updating the code via git. Another option was to download the code to the CI VM and run the server directly there, but it is just too much work (install ruby, postgres, gems...), and it doesn't seem in no way the best option.
Have anyone passed through the same situation? How do you guys usually deal with this kind of situations?
I ended up doing everything inside the CI. I made some custom scripts that configure the backend project every time the test suite is ran. Also, I cached the folder with the backend code and the gems (which was taking ~2min to install).
The configuring part now adds ~20 seconds to the total time, so it wasn't a big deal. Although I still think that this is probably not the best way to do this, it has some advantages, such as not worrying about updating the backend code (it pulls from master automatically) or its database (it runs rake db:reset after updating the code).
Assuming the API server is running somewhere, configure the front-end application to point there while in the test/CI environment, at least to start out. If there are multiple API environments, choose the one the most closely matches the front-end environment (e.g. dev, staging, etc).
It gets more complicated if/when you need to run the e2e tests each time the API is built or match up specific build versions of the front-end and the API. In that case you will have to run the API server as part of the test.
I am trying to implement jasmine-maven-plugin for my project.
In my project there are multiple separate web projects, I successfully integrate the above plugin in all of my web projects except one.
I have used HtmlUnit driver for all of my web projects but getting RuntimeException: Exception invoking setOnopen from WebSocket class for a particular web project, others are executing fine.
Instead of htmlunit if I use phantomjs driver then it is working seamlessly but for that I have to keep the phantomjs executable in my system PATH which is not go with the maven philosophy, I do not want to keep any separate executable in my system. Due to this I want to use htmlunit driver which is throwing the above setOnopen exception.
I did lots of google but not able to get any solution, if you have any insight on this issue please let me know. Thanks In advance.
If you want to avoid requiring phantomjs be installed separately you may want to take a look at these projects for some ideas:
https://github.com/qa/arquillian-phantom-binary
https://github.com/qa/arquillian-phantom-driver
And take a look at this forum discussion:
https://groups.google.com/forum/#!topic/phantomjs/yZj_ciH21pE
I've yet to have time to try this out myself but it sounds promising. Also, note that you don't need to have phantomjs on your system path. You can specify the location of the binary using the phantomjs.binary.path property. See the second example on this page which shows how to configure it using this property.
Hope that helps.