I have found why the properties are not set. There's a BeanFactoryPostProcessor that also implements ApplicationContextAware and uses the application context to load the bean to do some dynamic...
Type: Posts; User: daniel.mfreitas; Keyword(s):
I have found why the properties are not set. There's a BeanFactoryPostProcessor that also implements ApplicationContextAware and uses the application context to load the bean to do some dynamic...
Hello guys. I tried everything but I'm at a loss here. I have used this approach before when working in a project from scratch, but now I'm working on a legacy system which already uses Spring. I'm...
But that means that I have to have an implementation of my interface right? What I'm really trying to do is "advise" interfaces. Yes it's crazy but let me explain.
I have interfaces annotated with...
Is it possible to have spring automatically create proxies for interfaces without having to declare any org.springframework.aop.framework.ProxyFactoryBean in the application context? Basically I...
Hello guys.
Is it possible to create your own Schema-based configuration? Is there documentation about hits somewhere?
Basically I have a utility that I use in almost all my spring apps (one...
After a lot of research and try outs that's what I have found:
<tx:annotation-driven/> does not work with AspectJ weaved beans created outside the spring container. (At least not fully ;))
Take...
In the spring documentation it is stated under section '9.5.9. Using @Transactional with AspectJ' that "The aspect must also be configured with a transaction manager." and that "The simplest way to...
Answering my own question, it seems there is no official aspect for the @Secured annotation. I checked the spring-aspects.jar source code and I could only see the transactional aspect. And for that...
Basically, I have to create domain objects outside of the spring container (rich domain model created by new or returned by hibernate).
Can I annotate their interfaces with @Secured and have them...
Hello folks,
I'm getting the following error when I run my integration tests:
java.lang.IllegalStateException: Property 'transactionManager' must be set on transaction aspect
I'm using...
Just a heads up on my final solution.
I decided to keep everything in the same class. The code was already simple enough and I didn't want to fragment my objects too much. That left me to stub the...
Thanks for the feedback. I already have integration tests for my dao layer with embedded databases.
But I have this specific class which constructs a string to be passed to...
I'm applying TDD in my project and I'm having good results so far. My classes are well better designed now than in previous non TDD approaches.
I'm trying to stay true to unit testing and mock...
This is a bug in oracle jdbc driver:
http://stackoverflow.com/questions/277744/jdbc-oracle-arrayindexoutofboundsexception
I'm facing the same issues.
I tried to downgrade to ojdbc14.jar but...
I found a workaround for the issue. Instead of having the interceptor annotated with @Transactional, I created another class to execute the custom queries and delegated all calls to it. This class...
Some experiments I did:
If I have this:
//.... Other imports
import java.lang.reflect.InvocationHandler;
public class HibernateInvocationHandler implements InvocationHandler {...
Hello guys.
I can't put annotation driven transactions to work with ProxyFactoryBean interceptors (the transactions work properly on other annotated beans, it just fails with my interceptor)....
Yes I can do this. Actually the <constructor-arg> tag means "arguments needed to create an object" and not "java constructor arguments". If the beans are create by constructor or by factory methods...
I saw a guy doing this in a blog (haven't tested it so don't know if it's correct)
public class DaoFactoryCreator {
public static DaoFactory createDaoFactory(List daos) {
DaoFactory factory...
Hello guys.
I have a factory that is responsible to create dynamic proxies for my DAOs. You send in the domain object Class you want to create the DAO proxy for and using reflection and naming...
Looks good. I'm happy I could help. :D
Well. It's is working for me with and without form objects. I can show the validation errors set by the commons-validator framework and formaction bindAndValidate method as well as my custom error...
My final solution:
if (error) { //or try..catch
FormObjectAccessor formObjectAccessor = new FormObjectAccessor(requestContext);
Errors errors =...
P.S.2 Please post here your findings and if it worked for you. I'm curious to know how other people approach this.
P.S. I just noticed that if you do this and you are using the same solution as I am, you can put any object/object name in Errors errors = new BindException();
For example I am using:
Errors...