[jboss-dev-forums] [JBoss Microcontainer Development POJO Server] - Re: Cleanup path for Structure Deployers

david.lloyd@jboss.com do-not-reply at jboss.com
Tue Nov 3 18:06:25 EST 2009


"alesj" wrote : 
  | Thinking about how to hack this non-automount approach. ;-)
  | e.g. 
  | Lets say we just have component deployers (probably not gonna happen, but still ...), 
  | no parsing stuff, nothing that would need to touch resources, hence no VFS usage.
  | But we have a bunch of pre-attached component metadatas,
  | meaning those component deployers would pick this up and deploy it.
  | And one of our services at runtime calls URL.inputStream on a location that is sure it exists, but as an inner resource (double nested jar entry).
  | What would happen in this case or how you make sure this is mounted and unmounted?
  | 

In this case the service is just not going to work unless the archive is mounted through one of the mechanisms designed to do so:

- A deployer mounting a deployment
- A deployer mounting a classpath element
- User code using the deployer API to mount the resource

There is one option for auto-loading external JARs like you mention - do some type of archive detection (maybe read the first four bytes to identify whether it's an archive), automount if necessary, and assign the handle to whatever deployment owns the caller's classloader.  Of course if no deployment owns the classloader, it won't work.  Anyway this would probably be something we could add later?


View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4263830#4263830

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4263830



More information about the jboss-dev-forums mailing list