Skip to main content

Posts

Showing posts with the label springframework

New Article at heise.de Developer: (Bi)Temporal Data Management in Java with Open Source Frameworks

If you ever need to handle (bi)temporal data in your Java app, check out my new article (in German language) at heise.de about: (Bi)Temporal Data, Implementation in Java with Open Source Frameworks: http://goo.gl/g8Lec4 Actually you always need to handle this topic in your Java business apps, a must read. All the examples can be found at Github: http://goo.gl/30Xy15 Have fun!

CDI vs. Spring Framework Core

Another question I got in my Spring Framework training is: is it worthwhile to switch from Spring Framework 3.x to CDI with JBoss Weld or Apache OpenWebBeans implementation? After googling around I found some good articles and blogs about this topic. These two articles are the best in my opinion: Spring DI and CDI Comparative Study CDI 1.0 vs. Spring 3.1 feature comparsion: bean definition & dependency injection Luckily I had a chance to take a CDI course intensively for two days to be able to see what we actually could do with CDI. After doing two days intensive course of CDI I can sum up this topic as following: CDI takes a lot of good idea of Spring Framework , this is for sure. Anything you can do with CDI (I used JBoss Weld in the course I followed) is not new and you can have those stuffs in Spring Framework as well. In CDI 1.0 (JEE 6) there is still a lot of things which is not supported natively such as "scanning of classes and packages" to turn on ...

Creating Spring Bean dynamically in the Runtime

In my training someone asked me whether it is possible to create an object (a Spring Bean) dynamically so you can choose which implementation you want to have  in the runtime . So at the compile time you don't know what object actually should be created yet. The application should decide what object to be created based on a property file . 1. We create an annotation so we can mark the method which should be able to create the object dynamically: ... package your.package; ... @Retention(RetentionPolicy.RUNTIME) public @interface InjectDynamicObject { } ... 2. Use the new created annotation in your method which should be able to create the object dynamically: ... @Named("customerBo") public class CustomerBoImpl implements CustomerBo { ...     @Override   @InjectDynamicObject   public Customer getDynamicCustomer() {         return this.dynamicCustomer; } ... 3. Write an aspect with Pointcut a...

One Day in your Life... with UML2, oAW, Weblogic FastSwap, Oracle Enterprise Pack for Eclipse, Maven2 and SpringFramework...

In my new project - as usual in a software project - we have a very tight schedule. Using our old JEE application architecture (Oracle 10g, EJB 2.x, JFormular, Ant with Maven2 dependencies, full deployment EAR, WAR and EJB JAR on Weblogic 10.3 with Java6) would mean that we will have a long turn-around time (code, compile, deploy and test) for our development. Our build process with Ant does not support "naked" deployment", so it takes ages before the artefacts are built, jarred and can be deployed in Weblogic. In case that you only change one small thing in your web layer (JSP file, Java class) you will need to go through all those build steps. In combination that at that time I had an old development hardware (3 years old) you can imagine how horrible the situation was... So I was searching for a better solution. We need a fast turn around time, especially in our web layer because I'm not an expert in JFormular and I definitely need to "try and error". ...