Friday, December 28, 2007

Spring, Struts and Weblogic 8.1 SP6

It's hard to get these things working together in Weblogic. You will have to think about class loading issues. The main problem is Spring support action classes reference Struts action classes and this fails to work if they are located in sibling class loaders. It's a pain to find why. Weblogic doesn't come with a nice class loader debugger (or I am blind enough not to see it) and you have to write your own debugger. The only thing so far I could do to get around this is to edit Spring manifest file and add struts.jar to class path dependency so that Weblogic makes the link. I am wondering if this should be a part of spring jar file anyways. As far as I understand it is a Java fashion to do this. On top of this, I think spring jar file should be sliced up a little bit for class loading reasons. I mean the web part of it might not need to be in the same class loader its container code is. The container code has state, it loads a network of beans and it keeps the network in memory along with static scoped beans. Therefore, it makes much sense if you want to share this container with multiple modules for performance reasons. Nonetheless, you won't need to share the web helper classes. 

No comments: