It looks like the jar files in jboss.home.url/lib directory are first added when jboss-service.xml is deployed. I just wonder why it is not loader before jboss-service.xml so I don't need to worry about codebase if I move the instance directory elsewhere.