[jboss-dev-forums] [Design of POJO Server] - Re: JBAS-6061 or weird nested jar
jaikiran
do-not-reply at jboss.com
Wed Jan 21 01:38:21 EST 2009
"alesj" wrote : We need to fix the code (btw: where is this?) that does this,
| to use the right VFS method, the one that uses cache.
Finally, found some time to debug and figure out what and where the issue is. This is what is happening:
server/< serverName>/conf/jboss-service.xml is being picked up by org.jboss.system.deployers.SARDeployer which has this:
String codebase = path.getCodeBase();
| String archives = path.getArchives();
|
| log.debug("Processing classpath: " + unit.getName() + " codebase=" + codebase + " archives=" + archives);
| VirtualFile codebaseFile = unit.getRoot();
| if (".".equals(codebase) == false)
| {
| ServerConfig config = ServerConfigLocator.locate();
| URL codeBaseURL = new URL(config.getServerHomeURL(), codebase);
| codebaseFile = VFS.getVirtualFile(codeBaseURL, "");
| }
The 2 variants of VFS.getVirtualFile() have this:
| public static VirtualFile getVirtualFile(URI rootURI, String name) throws IOException
| {
| VFS vfs = getVFS(rootURI);
| return vfs.findChild(name);
| }
The context associated with this returned VirtualFile does not have the exception handler associated with it. Based on your post about the caching API, i decided to change these 2 methods to:
| public static VirtualFile getVirtualFile(URI rootURI, String name) throws IOException
| {
| VirtualFile vf = getCachedFile(rootURI);
| return vf.getChild(name);
| }
This change fixed the problem and i was able to boot JBossAS. I don't know much about VFS internals (and i don't know whether was i did can be termed as a fix :) ), but as Dimitris says:
"dimitris at jboss.org" wrote : Obviously I'm totally ignorant but shouldn't caching be an internal implementation detail of the VFS api? I.e. why you need a VFS.getCachedFile(...)?
So, shouldn't the exception handler be associated with a context irrespective of whether it is cached or not?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4203492#4203492
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4203492
More information about the jboss-dev-forums
mailing list