Friday, April 15, 2011

Spring meet CDI, CDI meet Spring

I got the CDI to Spring Bridge working on Monday.
I got some design help from (Caucho) Resin's core engineering team on Monday to get an initial design and ideas for going from Spring to CDI .
(The other Direction!)
Today I got Spring to CDI integration working with Weld. It should also work with Resin 4.0.17 or Resin 4.0.18.

You can see the code at:


The tests are at:


This was really fun to write.

The CDI to Spring Bridge was easy and it was similar to something I wrote before for Presto (a precursor to Crank).
The Spring to CDi was much more difficult. It currently only works with Weld. It will work with Resin in the 4.0.17 release (likely).

This class does the CDI to Spring bridge:


This class does the Spring to CDI bridge.


This roo based webapp/project uses the CDI to Spring Bridge (it runs in Resin and should run in any CDI compliant app server Glassfish, JBoss, etc.):


Come fork it on github!

JMeter vs. Gatling: Fact Checking: SHILL! ASTROTURFING SHILL!