The Artima Developer Community
Sponsored Link

Java Buzz Forum
The JBoss UCL is the blink tag of J2EE servers

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Norman Richards

Posts: 396
Nickname: orb
Registered: Jun, 2003

Norman Richards is co-author of XDoclet in Action
The JBoss UCL is the blink tag of J2EE servers Posted: Sep 18, 2003 12:42 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Norman Richards.
Original Post: The JBoss UCL is the blink tag of J2EE servers
Feed Title: Orb [norman richards]
Feed URL: http://members.capmac.org/~orb/blog.cgi/tech/java?flav=rss
Feed Description: Monkey number 312,978,199
Latest Java Buzz Posts
Latest Java Buzz Posts by Norman Richards
Latest Posts From Orb [norman richards]

Advertisement

I like JBoss. It's a great application server, but I'm not always happy the way they play fast and loose with the J2EE way of doing things. Take for example one of the biggest sources of JBoss pain, the UnifiedClassLoader. The UCL was supposed to simplify things. Why worry about organizing your application correctly when you can just shove all your jars off in the deploy directory. JBoss will take care of making sure all your classes are visible everywhere you go. Who needs manifests?

Unfortunately, it's pretty easy for things to go wrong. When you have a shared classloader in a place where you don't expect one, all sorts of chaos can (and will) ensue. I believe the solution to Toby's problem is simple enough. He needs to a jboss-app.xml descriptor to his ear file which declares loader repository that will look to the ear file first before looking out to the shared world.

It looks something like this:

<jboss-app>
  <loader-repository>unique.domain:loader=yourapp.ear</loader-repository>
</jboss-app>

That's just crazy. That's a pretty obscure way of saying that you want classloading="j2ee" instead of classloading="broken". But, let's look beyond the inelegant configuration mechanism. What is really wrong here is that JBoss ships out of the box with a classloading mechanism that encourages you to develop sloppy non-portable applications.

It happened where I work. Because JBoss let's you be sloppy, one of the developers did just that and gave us a tangled deployment image that suffers from deploy order problems and is a nightmare to work with. I hope I get some time to undo all the damage, but until then, we are stuck with a messy non-standard install that makes me want to go add blink tags to our HTML just for completeness.

Here is a quote from Bill Burk on the topic: This is the default behavior because our users demanded it. In JBoss, by default, there is a flat classloading structure so that a class is visible by any component. I myself found this quite refreshing since I had struggled with other application server's parent-child delegation models in the past. It was nice not to worry about Linkage or ClassCastExceptions. This is what the flat classloading structure alleviates for you.

Personally, I find it refreshing when things work in the way I expect. I haven't struggled with loading inother servers. J2EE deployment is quite clunky, but once you figure it out you can count on things working the same way on whatever J2EE environment you are working on. Well, except JBoss...

Read: The JBoss UCL is the blink tag of J2EE servers

Topic: Quote of the week: Ross Judson Previous Topic   Next Topic Topic: Where .NET is better then Java

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use