03 November 2009 | Spring | Boris
In a try to make it easy to override some service while using the original definition as parent I was using some alias for it.
orig.ac.xml:
<bean class=”SomeService>
<property name=”servicex” ref=”servicex”/>
</bean>
<bean id=”servicexImpl” class=”servicexImpl”>
….
</bean>
<alias alias=”servicex” name=”servicexImpl/>
additional.ac.xml
<bean id=”servicex” class=”ServicexAltImpl” parent=”servicexImpl”/>
So I was thinking now that SomeService would now use the ServicexAltImpl for servicex.
However it turn out that this doesn’t work. [...]
No Comments
15 October 2009 | Spring | StevenV
On the spring documentation website (http://static.springsource.org/spring/docs/2.5.6/reference/transaction.html) you’ll find this nice drawing of a spring transaction proxy :
However when this target method calls another target method in the same class with a different transaction setup the new transaction setup is ignored. The transaction setup of the first target method will be used for all calls to [...]
No Comments
23 September 2009 | Camel, Java, Spring | RobbieC
Camel allows you to define Type Converters by putting the annotation @Converter at class and converter-method level. You need to define a file META-INF/services/org/apache/camel/TypeConverter, which contains a comma separated list of packages Camel has to scan for Converter classes.
All fine as long as your Converter doesn’t need any dependencies injected. The Camel manual ‘extensively’ describes [...]
No Comments
22 September 2009 | Spring | Youri De Bondt
Imagine having a factory bean like MethodInvokingFactoryBean or MapFactoryBean (or any factory bean, but I’ll use these two as an example) and you want to call it using getApplicationContext().getBean(”myFactoryBean”).
In case of the MethodInvokingFactoryBean you will get the returnvalue of that method back (which can be “null”, even though getApplicationContext().contains(”myFactoryBean”) returns “true”) . If you’re [...]
No Comments
14 September 2009 | Architecture, Java, Spring | VitalyK
Our flagship product, Supply-It, is a planning application that (amonst others) is capable of scheduling the complete workload of production plants. This can results in quite elaborate plannings with numerous production orders.
The logic that caused the planning to be what it is, is often quite complex and it may often be tough to understand [...]
No Comments
26 August 2009 | Spring | StevenV
‘Spring RCP gives you the possibility to create controls that are bound to certain properties of a given object. This given object is in most cases a gui object. The bound controls are called bindings. A binder is a class that creates bindings. A binding factory, if you will. ‘
When creating a binder via spring [...]
Comments Off
19 August 2009 | Spring, Unit testing | RobbyVD
In our product team, we have a whole bunch of unit tests that load data from an XML dataset into an in-memory (HSQLDB) database.
We’re using the Unitils framework to load this data into the db, without constraints enabled. This allows us to load only the data that concerns the test (another approach would be to [...]
No Comments