I have a web application which also uses JMS via Camel and Lingo.
How can I ensure that request scoped beans are also available to threads handling JMS messages?
Best regards,
Harald
Type: Posts; User: hwellmann; Keyword(s):
I have a web application which also uses JMS via Camel and Lingo.
How can I ensure that request scoped beans are also available to threads handling JMS messages?
Best regards,
Harald
That depends on the scope of "we": If you tried to do it in Spring Data alone, I agree you'd have to cherry pick and thus copy some bits of Spring Core or create alternative solutions.
If "we"...
Marten, thanks for your quick reply! This sounds like material for an enhancement request ;-)
Best regards,
Harald
There is an API AbstractRefreshableApplicationContext.setAllowBeanDefinitionOverriding() which seems to do the trick, but I can't find any usage examples.
The concrete non-web ApplicationContext...
I posted the same question to the Neo4j mailing list a while ago:
https://groups.google.com/forum/#!topic/neo4j/GjMpDNPf30Q
FSF has a rather confusing statement on ASL/GPLv3 compatibility which...
Pardon me for raising a somewhat heretic topic in this cathedral of Spring...
Spring Data has a potential for reaching a larger audience if it were independent of Spring Core.
For projects...
I had the same issue with Eclipse + m2e + m2e-wtp + Tomcat.
The neo4j-kernel JAR did not get copied to the Tomcat work area. Instead, the Maven dependencies of the Eclipse project listed a...
Ok, got it. Only Mars and Earth are connected and Mercury is isolated.
I was somehow expecting to see a list of all worlds returned from the demo.
Not exactly the best of marketing when the...
This is what I get when running the hello-worlds example from a fresh repository clone:
cd spring-data-neo4j-examples/hello-worlds
mvn clean package exec:java
At home on:...
Yes, that's precisely the problem with custom namespaces in general. It's not so easy to translate some of the legacy XML examples from the Spring Core manual to Java, because the relation between...
Now that Spring 3.1 finally got rid of the last bits of mandatory XML configuration by means of @Enable... annotations, I wonder if it's also possible to use Spring Security in pure Java mode. The...
Ok, moving the "file:" protocol prefix from the @PropertySource annotation value to the property value itself provides some more flexibility.
I don't even see this...
Is there a way to disable a bean profile which is enabled by default?
Use case:
We have a web app with a bunch of message queues and corresponding endpoint beans. With Spring 3.1, we've moved all...
Hi Chris,
thanks for your examples! Injecting an Environment, I can indeed work without a PropertySourcesPlaceholderConfigurer like this:
@Configuration
@PropertySource("file:${MY_CONFIG}")...
I'm currently trying to convert a mostly-Java-with-some-XML Spring 3.0.6 configuration to a Java-only configuration with Spring 3.1.0.RC1.
In my old XML context, I use a property placeholder
...
Some of my transactional JUnit test are broken after upgrading from Spring 3.0.5 to Spring 3.0.6.
This appears to be caused by a change in SpringJUnit4ClassRunner [SPR-7705].
Since @Rules are...
Does anybody have a copy-and-paste example configuration for a JPA 2.0 EntityManagerFactory with OpenJPA 2.1.0, Spring 3.0 and Tomcat 6.x with Load Time Enhancement?
The main point is load time...
I mean "stateless" in the sense of "does not save state between calls from the same client", having the EJB spec in mind, of course.
A public method called by the client may call other private...
As a rule, I wouldn't call any kind of method interceptor trivial. My notion of trivial is putting a @Stateless annotation on a POJO to make it pooled and thus implicitly thread-safe.
...
@Autowired ties your code to Spring. Using @Inject, you can run your code on Spring, Weld SE, Java EE 6, Guice, ...
So don't use @Autowired if you want to be flexible.
Regards,
Harald
I'd say you'd better not extend Assert but use static imports instead. And I prefer @Inject to @Resource or @Autowired. But that's it, more or less.
You may have to type a few more characters than...
I'm used to working in environments where the container guarantees thread-safety, i.e. each instance of an application class is always run by at most one thread at a time.
I've tried hard to find...
Ok, I've found the answer here:
http://blog.springsource.com/2008/01/28/spring-25s-comprehensive-annotation-support/
So it works just as I had imagined, you just need to make sure the EJB...
I'm trying to find out whether or not the Spring Test Context can be used for non-intrusive testing of Java EE 6 EJBs and JPA 2.0 entities.
"Non-intrusive" means that the sources shall not depend...
Googling for a solution, I found a reference to an annotation @AnnotationDrivenTx in a project called Spring JavaConfig.
But this annotation does not exist in Spring 3.0.5, which is a bit...