Andrew Rubinger [http://community.jboss.org/people/ALRubinger] replied to the 
discussion

"ShrinkWrapDeployer"

To view the discussion, visit: http://community.jboss.org/message/540878#540878

--------------------------------------------------------------
Realtime discussion:

(04:10:23 PM) a...@msn: About ShrinkWrapDeployer: let me ask you:
(04:10:30 PM) Ales: shoot
(04:10:35 PM) a...@msn: Where's the component that bridges VFS inputs to the 
Deployers ?
(04:10:47 PM) Ales: vfs inputs?
(04:10:51 PM) a...@msn: VirtualFile.
(04:10:55 PM) a...@msn: How do you deploy one?
(04:11:07 PM) Ales: VFSDeployment extends Deployment
(04:11:17 PM) a...@msn: Right.  Where does VFSDeployment live?
(04:11:27 PM) Ales: jboss-deployers-vfs-spi
(04:11:42 PM) a...@msn: Where should the component that bridges SW Archive 
inputs to Deployers be?
(04:12:02 PM) Ales: hmmm ...
(04:12:13 PM) a...@msn: Say it.
(04:12:16 PM) Ales: hehe
(04:12:16 PM) a...@msn: jboss-deployers-shrinkwrap. ;D
(04:12:19 PM) Ales: hmmmm ...
(04:12:21 PM) Ales: nope
(04:12:24 PM) a...@msn: Hahahahaha!
(04:12:33 PM) Ales: vfs spi is really a spi ... and it has actual impl
(04:12:45 PM) Ales: whereas your sw stuff is wrapper/facade
(04:12:50 PM) a...@msn: ShrinkWrapDeployers is just an impl.
(04:12:56 PM) a...@msn: The SPI part is yes, a wrapper.
(04:13:03 PM) a...@msn: But there's only one reason why:
(04:13:21 PM) a...@msn: I need to mount and unmount archives as VFS alongside 
the deployment/undeployment process
(04:13:36 PM) a...@msn: So I can't make the equivalent of VFSDeploymentFactory 
and call it a day.
(04:13:45 PM) Ales: true
(04:13:48 PM) a...@msn: On undeploy we need to unmount.
(04:14:18 PM) Ales: your SW is just another api for VFS
(04:14:27 PM) a...@msn: Correct.
(04:14:32 PM) Ales: hence it's a wrapper/facade
(04:14:39 PM) a...@msn: Well, no.
(04:14:45 PM) a...@msn: SW doesn't wrap VFS.
(04:14:47 PM) Ales: if we didn't have vfs, then I would say yes, put it into 
deployers
(04:14:51 PM) Ales: but we a;ready have vfs
(04:14:53 PM) a...@msn: We have, however, a VFS adaptor
(04:15:17 PM) Ales: yeah, you need to adapt Archive to VFSDeployment
(04:15:27 PM) a...@msn: Right.
(04:15:34 PM) Ales: == facade
(04:15:44 PM) a...@msn: And if not for the unmounting, I could do it the same 
way as in VFSDeploymentFactory
(04:15:58 PM) a...@msn: With no new deploy/undeploy APIs.
(04:16:18 PM) Ales: why's that?
(04:16:33 PM) Ales: why is mounting/unmoounting an issue?
(04:16:37 PM) a...@msn: VFSDeployment deployment = 
ShrinkWrapDeploymentFactory.createDeployment(archive); // Easy
(04:16:49 PM) a...@msn: Because I need to mount it using a ShrinkWrap extension.
(04:16:58 PM) a...@msn: ArchiveFileSystem.
(04:17:10 PM) a...@msn: Which is what enables VFS to read SW
(04:17:41 PM) a...@msn: You guys do inspection to mountReal or mountJar or 
something.
(04:17:47 PM) Ales: aha, so when asked if it's already mounted, it says true
(04:17:54 PM) Ales: hence it doesn't do mounting
(04:18:01 PM) a...@msn: "it"?
(04:18:17 PM) Ales: mounting mechanism inside deployers
(04:18:21 PM) a...@msn: After it comes into MainDeployer, nothing will mount 
it, yes.
(04:18:32 PM) a...@msn: We mount.
(04:18:56 PM) Ales: if you didn't?
(04:19:06 PM) a...@msn: Then something in deployers would need to.
(04:19:10 PM) Ales: i guess structiure deployers would try and fail?
(04:19:14 PM) a...@msn: And unmount it when undeployed.
(04:19:26 PM) a...@msn: Right.  getChildren would return nothing.
(04:19:31 PM) Ales: no
(04:19:53 PM) Ales: see AbstractVFSArchiveStructureDeployer
(04:20:57 PM) a...@msn:  
http://fisheye.jboss.org/browse/JBossAS/projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/AbstractVFSArchiveStructureDeployer.java?r=101137
 
http://fisheye.jboss.org/browse/JBossAS/projects/jboss-deployers/trunk/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/AbstractVFSArchiveStructureDeployer.java?r=101137
(04:21:01 PM) a...@msn: So why "no"?
(04:21:50 PM) Ales: it would try to mount
(04:21:53 PM) Ales: and probably fail
(04:21:55 PM) Ales: or not?
(04:21:58 PM) a...@msn: Oh, right
(04:22:05 PM) a...@msn: Because it'd be using the wrong FileSystem.
(04:22:09 PM) Ales: yes
(04:22:47 PM) a...@msn: I have no qualms with removing the wrapper API
(04:22:59 PM) a...@msn: If you wanna make structure deployers figure out how to 
mount it properly
(04:22:59 PM) Ales: perhaps this should made possible
(04:23:04 PM) Ales: yes
(04:23:05 PM) Ales: exactly
(04:23:10 PM) a...@msn: But I assumed you didn't wanna back that logic in.
(04:23:21 PM) Ales: didn't think of that
(04:23:41 PM) Ales: how would we recognize which FS we need to mount?
(04:23:43 PM) Ales: hmmm ...
(04:23:45 PM) a...@msn: No idea.
(04:23:48 PM) Ales: :-)
(04:24:07 PM) a...@msn: VirtualFile is just a pointer.
(04:24:15 PM) a...@msn: You'd have to rely on exceptions for flow control.
(04:24:25 PM) a...@msn: ie. try and catch the exception if it's not a SW 
archive.
(04:24:33 PM) a...@msn: Which is no good solution.
(04:25:07 PM) Ales: i'll think about it a bit

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/540878#540878]

Start a new discussion in JBoss Microcontainer Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2115]

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to