[jboss-user] [JBoss Microcontainer Development] - ShrinkWrapDeployer

Andrew Rubinger do-not-reply at jboss.com
Mon May 3 16:27:30 EDT 2010


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) ALR at MSN: About ShrinkWrapDeployer: let me ask you:
(04:10:30 PM) Ales: shoot
(04:10:35 PM) ALR at MSN: Where's the component that bridges VFS inputs to the Deployers ?
(04:10:47 PM) Ales: vfs inputs?
(04:10:51 PM) ALR at MSN: VirtualFile.
(04:10:55 PM) ALR at MSN: How do you deploy one?
(04:11:07 PM) Ales: VFSDeployment extends Deployment
(04:11:17 PM) ALR at MSN: Right.  Where does VFSDeployment live?
(04:11:27 PM) Ales: jboss-deployers-vfs-spi
(04:11:42 PM) ALR at MSN: Where should the component that bridges SW Archive inputs to Deployers be?
(04:12:02 PM) Ales: hmmm ...
(04:12:13 PM) ALR at MSN: Say it.
(04:12:16 PM) Ales: hehe
(04:12:16 PM) ALR at MSN: jboss-deployers-shrinkwrap. ;D
(04:12:19 PM) Ales: hmmmm ...
(04:12:21 PM) Ales: nope
(04:12:24 PM) ALR at 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) ALR at MSN: ShrinkWrapDeployers is just an impl.
(04:12:56 PM) ALR at MSN: The SPI part is yes, a wrapper.
(04:13:03 PM) ALR at MSN: But there's only one reason why:
(04:13:21 PM) ALR at MSN: I need to mount and unmount archives as VFS alongside the deployment/undeployment process
(04:13:36 PM) ALR at 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) ALR at MSN: On undeploy we need to unmount.
(04:14:18 PM) Ales: your SW is just another api for VFS
(04:14:27 PM) ALR at MSN: Correct.
(04:14:32 PM) Ales: hence it's a wrapper/facade
(04:14:39 PM) ALR at MSN: Well, no.
(04:14:45 PM) ALR at 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) ALR at MSN: We have, however, a VFS adaptor
(04:15:17 PM) Ales: yeah, you need to adapt Archive to VFSDeployment
(04:15:27 PM) ALR at MSN: Right.
(04:15:34 PM) Ales: == facade
(04:15:44 PM) ALR at MSN: And if not for the unmounting, I could do it the same way as in VFSDeploymentFactory
(04:15:58 PM) ALR at 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) ALR at MSN: VFSDeployment deployment = ShrinkWrapDeploymentFactory.createDeployment(archive); // Easy
(04:16:49 PM) ALR at MSN: Because I need to mount it using a ShrinkWrap extension.
(04:16:58 PM) ALR at MSN: ArchiveFileSystem.
(04:17:10 PM) ALR at MSN: Which is what enables VFS to read SW
(04:17:41 PM) ALR at 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) ALR at MSN: "it"?
(04:18:17 PM) Ales: mounting mechanism inside deployers
(04:18:21 PM) ALR at MSN: After it comes into MainDeployer, nothing will mount it, yes.
(04:18:32 PM) ALR at MSN: We mount.
(04:18:56 PM) Ales: if you didn't?
(04:19:06 PM) ALR at 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) ALR at MSN: And unmount it when undeployed.
(04:19:26 PM) ALR at MSN: Right.  getChildren would return nothing.
(04:19:31 PM) Ales: no
(04:19:53 PM) Ales: see AbstractVFSArchiveStructureDeployer
(04:20:57 PM) ALR at 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) ALR at 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) ALR at MSN: Oh, right
(04:22:05 PM) ALR at MSN: Because it'd be using the wrong FileSystem.
(04:22:09 PM) Ales: yes
(04:22:47 PM) ALR at MSN: I have no qualms with removing the wrapper API
(04:22:59 PM) ALR at 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) ALR at 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) ALR at MSN: No idea.
(04:23:48 PM) Ales: :-)
(04:24:07 PM) ALR at MSN: VirtualFile is just a pointer.
(04:24:15 PM) ALR at MSN: You'd have to rely on exceptions for flow control.
(04:24:25 PM) ALR at MSN: ie. try and catch the exception if it's not a SW archive.
(04:24:33 PM) ALR at 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]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100503/9338e050/attachment.html 


More information about the jboss-user mailing list