If you implement a ConfigurationProvider you can do whatever you want to build the rules. You could for example load data from a database or something like that. There should be no problem with doing so.
Thanks for good answer,
But the problem is that I use a startup class for initialize the webapp, this class will start a connection pool, then only after this moment can be performed actions to the DB.
So the problem is how can I be sure that the class “HttpConfigurationProvider” is started after my startup class?
I think Rewrite will initialize before any ServletContextListeners, so your startup class won’t be ready when Rewrite initializes.
If you really need the startup class for Rewrite configuration, you should find some other way of initialization. If you are using CDI or Spring, there are many better ways to do this compared to a ServletContextListeners. And manually setting up a connection pool is also not very common. This should be done by the container which will take care of preparing it before the application is deployed.
If you show me the code of your startup class, I could try to give some thoughts for improvement.
Viewing 10 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic.
Comments are closed.
Do you play Magic?
Get TopDecked MTG, the essential all-in-one Magic App, built by players, for players. Free to use, forever.
Deck Simulator (3d)
Cards & Prices
Top 8 Decks & Metagame
Get updates from OCPSoft
If you find our tools useful, please consider making a donation to help us stay online and building software!