changcheng / wro4j

Automatically exported from code.google.com/p/wro4j
0 stars 0 forks source link

reloadModel and reloadCache should be ignored if wro is not initialized yet #370

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
We have an application that listens to a directory for new files and then calls 
wro4j to reloadModel and cache when new files arrive. 
On startup of the application we also check for new files and since wro4j 
haven't got any requests yet it fails with a stacktrace.

Is it possible to just ignore these reloadModel calls if the filter haven't 
been initialized yet?
We are currently solving this by wrapping things in a try catch, but my fear is 
that the initialization is not happening correctly when this occurs. We could 
of course keep state in our application and not do these calls before we have 
had one request, but it would feel much better if wro4j just handled this.

What steps will reproduce the problem?

1. startup a web project with wro4j filter
2. call reloadmodel before making any requests

What is the expected output? What do you see instead?
I would like it to just silently ignore these calls as the model will be built 
on the first request anyway.

What version of the product are you using? On what operating system?
wro4j 1.4.3 windows. Spring configuration

Attached stacktrace

Original issue reported on code.google.com by tommys...@gmail.com on 10 Feb 2012 at 6:35

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by alex.obj...@gmail.com on 10 Feb 2012 at 7:57

GoogleCodeExporter commented 9 years ago

Original comment by alex.obj...@gmail.com on 12 Feb 2012 at 10:54