Hi, recently a friend of mine has been to qcon; she told me that she heard Rod Johnson during his key notes speech saying that OSGi was his worse mistake in 8 years.
What is the future of OSGi?...
Type: Posts; User: alzamabar; Keyword(s):
Hi, recently a friend of mine has been to qcon; she told me that she heard Rod Johnson during his key notes speech saying that OSGi was his worse mistake in 8 years.
What is the future of OSGi?...
Hi all,
I've got a Timer Task defined in a Spring XML bean but I'd like this task to run only if a certain property is set.
Would it be possible to do something like:
<if...
The perfect post. Thanks.
It's not only the decent amount of tests. IDE like eclipse will refactor all mutator methods, whereas if you used strings the refactoring wouldn't touch these.
You would have to run a global...
Hi, I have the following method:
@Override
public void validate(Object arg0, Errors errors) {
FeedbackDto dto = (FeedbackDto) arg0;
ValidationUtils.rejectIfEmptyOrWhitespace(errors,...
Gotcha, thanks
Hi folks,
I was wondering why one would like to set a placeholderPrefix while configuring a PropertyPlaceholderConfigurer? I know that if I set one, say $secureCfg{, then I would address my...
In my message above I said that the solution would be twofold: on one side the protected resources would be served through a customised component which would retrieve them as stream of bytes serving...
You could use the getResource or getResourceAsStream, obviiously obfuscated by a Spring clever bean, such as (I'm just making it up), ProtectedViewResolver, etc, which could be exposed through a...
Thank you guys. My arguments were more about protecting resources. If these are under WEB-INF they cannot be accessed directly. In a company which cared for copyrights and such (a part from disabling...
Hi, while I can move the JSP pages under WEB-INF using an internalviewresolver I don't seem able to move generic resources (e.g. css, images, js) under WEB-INF. Wouldn't it be nice (or is there any...
I think that both of you gentlemen have a valid point. On one side Spring is written following the JavaBean specification. On the other Spring allows for a non JavaBean to be instrumented as a...
Thank you Andreas. I got all your points, but probably I didn't explain MY one properly...Sorry. I already declare the cache manager as a Spring singleton: my question was: is it evil to declare the...
Excuse me, but apart from the definition of static (e.g. related to class) and instance variable (e.g. object's runtime state), where can I read that static variables should be used only as constants?
Dear all,
I had a cache wrapper Spring component (therefore Singleton by default) with a cache (as a ConcurrenMap) in it. I declared the cache like:
private static final...
Hi all,
I'm facing a problem which now is biting back times and again. I have got a JAR project (fido-core) which contains the 'kernel' of the system and then I have a WAR project (fido-web)...
Thank You, but I still prefer this:
@PostConstruct
public void triggerIndexer() {
documentPaths = (Set<String>) getApplicationContext().getBean(...
What about it? If I declare something in the configuration file I expect to be able to wire it in my bean. Looking at the GenericBeanFactoryAccessor API, I'd need to invoke a getter giving the type...
Ok, so how would you go from a ListFactoryBean to a Set<String> respecting strong typing?
Nope, sorry, that was a typo :)
Mmmmm.....Then why can I cast it to a Set<String> as in my example above. From what you are saying, and given that I understood correctly, the <util:set> generates a ListFactoryBean. But in my class...
Hi, I tried what you suggested but it doesn't work.
<!-- The list of document roots -->
<util:set id="documentPaths" set-class="java.util.Hash">
<value>${webapp.root.path1}</value>...
Wow, that's great, thanks a bunch
Hi,
I want to use Spring 2.5 annotation-based model. So I have a @Controller which I'd like to inject with a collection. Since I don't want to define the controller in the XML configuration file,...
Hi, I originally declared an Hibernate3 sessionFactory with the following configuration:
<...etc.>
<property name="hibernateProperties">
<props>
<!-- Necessary to use...