OK, back to the usual - my Spring deployer. ;-) With a few changes in the deployers and complete classloading re-wamp, Spring deployer also needed a minor update. Here is the latest build: - SpringDeployer 3.1 at SourceForge
Alongside Microcontainer project a new VFS project was developed. VFS stands for Virtual File System, a simple read-only framework abstracting the way we look at the 'file' system. The two key points there are that we don't limit ourselves with the underlying 'file' system, meaning the file can be basically anything that has specific 'file' semantics, ranging of course from plain/real file system to in-memory byte 'file' representation (the two that we currently implement), or perhaps even some LDAP or relational database. The other key point is the way you traverse over path. We've seen a lot of duplicate code all over the place where the code was asking the resources whether they are plain files/directories or archives, asking the URL connection if it's plain file or jar connection, ... With VFS you just put in a path or URL, and the framework abstracts all the details for you, hiding them behind simple VirtualFile API. But of course something like that comes with a cost, expecting other written frameworks not to understand VFS protocol, since they mostly limit itself to what default JDK provides (a horrible URL handling code for Windows ;-). We first encountered this with Facelets while deploying Seam apps. So here is the fix:
For all those who missed yesterday's announcement: - JBossAS5 Beta3 I won't go into details, the massive release docs say it all. But let me just say it's been a complete revamp of AS, down to the core aka kernel. :-)
Since all my previous blog posts included an update of Spring Deployer, this one is no exception. With the new AS kernel there came a new much improved Deployers architecture as well. As such, the old SpringDeployer wasn't compatible any more. So, I've rewritten the existing SpringDeployer to be compatible with the new style deployers. Since new deployers are more fine grained, this meant splitting the existing deployer into two aspect deployers - one able to recognize -spring.xml files, the second one instantiating BeanFactory and binding it into JNDI. The rest of the Spring beans injection logic remained the same. Here's the link to the binaries: Spring Deployer 3.0 As before, simply drop the jboss-spring.deployer into JBOSS_HOME/server/your_config_here/deployers directory. This will currently pick up all meatdata files that end with -spring.xml. To support the old .spring archive, simply rename them to .jar :-), or add a .spring suffix to JARStructure - for more details, turn to our forum.
And since it's almost holidays time, happy Xmas and successful year 2008 to you all. I know we're gonna have a blast, JBoss5 star is looking bright!
The changes weren't very drastic. Spring reworked their xml parsing stuff - lot less xml and (better) xsd support. They simply deprecated some XML parsing classes - which were easily replaceable - updating my slightly changed parser.
What's new with this release, else than compatibility? I added 'bean by type' support to @Spring annotation. What this means is, that you don't have to define bean's name if you are aware that there is exactly one bean which satisifies class type requirement. If there are multiple such beans - which satisfy class type requirement - we use default name. What is default name - in case of the field it is filed's name, in case of method it is a simple pojo setter/getter name. Since a code tells more than words, here it is :-)
private Object getObjectFromBeanFactory(Spring spring, String defaultBeanName, Class beanType) throws Exception
Here I would like to thank c.vidal from the forum, for initializing the whole thing - also writing much of the code / patch. This has been a long time on my todo list, just needed a little kick. ;-)
Ok, we are slowly getting unnecessary definition info out of the @Spring annotation. Currently working on getting that jndiName attribute out too. Should be done something similar to EJB3 PersistenceContext default unit name - when there is just one persistence context in your deployment, you don't need to supply unit name.
As JBoss Microcontainer is getting more and more momentum - with new JBoss5 and its deployers - work in progress also involves rewriting SpringDeployer to new deployers concept - see JIRA JBMICROCONT-26.
It's been an amazing week in Las Vegas. If you ever have a chance to go to LV, don't hesitate - a must see!
It's all about entertainment - gambling, shows, beautiful women, ... And JBW was no exception. Ok, not the same kind of entertainment :-), but still a lot of fun. Atmosphere was exceptionally relaxed, great RedHat merger for sure doing its part. Each day ending with easy going coctail party, with a lot of interesting conversations going on - with other attendees as well as JBoss' core developers. And I think that fameous JBoss party doesn't need any introduction, fabulous pictures tell it all: JBossWorld party by Michael Yuan.
I attended many different sessions. When looking back at the topics that they covered you really see how huge JBoss JEMS really is. And the stuff is keep on being implemented and integrated - new Messaging and Transactions, Drools, ESB, ...
The main attraction of the conference was definitely JBoss Seam and its founder Gavin King. Yep, he's a rock star :-).
My session was good - or probably you should ask the people that listened to what I had to say. I did cover everything that my JBoss Spring intergation involves in connection to JBoss AS and EJB3. Definitely my talking skills have to improve - practice practice practice. It definitely is not easy for non native speaker to talk about subject which is not totally trivial. There were some interesting questions at the end, and Dimitris pointed out an obvious solution / fix to my deployer implementation - it is already work in progress.
But the main point of JBW for me was to finally personally meet people I often communicate with (via MSN, forum topics, emails, ...) - Bill, Julien, Emmanuel, Gavin, Adrian, Dimitris, Thomas, Bela, Scott, Jason, Koen, ...
And [remember], shaking hands with Marc was cool too :-).
One week from tomorrow I'm off to Las Vegas for JBoss World. Looking at the agenda one can see that it is going to be a great event - lots of interesting JEMS sessions, presented to you by the lead developers themself. There is also my session if you are interested - as you can see, it is a continuation of previously mentioned article.
Currently my interest is on JBoss Portal, Seam and of course EJB3 - since we are in the middle of developing a new enterprise application, using best of all three projects.
When you are using a lot of EJB3 stuff, embeddable EJB3 container comes real handy with unit testing - and I believe Bill just did a new release - check it out!
Just in case any JBoss/Spring user stumbles on this before Sunday - new release compatible with the latest EJB3 release in JBoss AS 4.0.4.GA is coming at the end of the weekend, in the worst case on Monday morning.