[Design the new POJO MicroContainer] - VFS cache as impl detail, to what extent
by alesj
WRT:
- http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4203492#4203492
Afaics the VFS cache cannot be completely hidden from the user.
e.g. you want to create new roots that behave differently
- diff ExceptionHandler, diff options (copy, case-sensitivity, ...), ...
And that's exactly what VFS::getVFS(URI|URL) does.
Where I now see VFS::getRoot(URI|URL) just as a shortcut to
previously mentioned VFS::getVSF::getRoot to actually do work on
a more familiar VirtualFile api (as you can see, VFS has a bunch of deprecated methods).
What's the diff between VFS::getVSF::getRoot and VFS:getRoot?
It's in the step in the middle. ;-)
You can eventually do this (possible optimizations):
VFS vfs = VFS.getVFS(url);
// set some options on it
VFSUtils.enableCopy(vfs);
...
VirtualFile root = vfs.getRoot();
where "VirtualFile root = VFS.getRoot(url)" comes with defaults.
The much disputed VFS::getCachedFile is a cached counter weight to previous VFS::getRoot.
It will first check the cache, only then create a new root.
Most of the time we should be using this cached lookup,
unless you explicitly want new VFS root.
What might be a feasible plan is to introduce just the opposite method:
- VFS:createNewRoot(URI|URL)
and change the existing getRoot to use getCachedFile.
Wdyt?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4203668#4203668
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4203668
17 years, 2 months
[Design of POJO Server] - Using temp at undeploy
by alesj
WRT:
- https://jira.jboss.org/jira/browse/JBSEAM-3702
Moving Norman's post here:
"Norman Richards" wrote :
| Do you have a complete example of a jboss-structure.xml that works? Whenever I tried to create one, the only effect was that the application would be completely ignored and wouldn't deploy. Is it realistic to create a jboss-structure.xml that will work across multiple example apps with roughly the same structure? What about WAR files? I guess we would need two versions for each app - one for deploying as an EAR and for deploying as a WAR, right?
|
| Is there any way we can add metadata to the jboss-app.xml to indicate how we want the app treated? It seems like this should be at most a one-line change for an app, if not the default behavior for the server. Deleting the file from the deploy directory has always been a clean way to undeploy an application, and it's really strange that now we don't have a clean undeploy. I'm not trying to be overly critical. I'm just trying to figure out what our official answer is to someone who asls "How do I undeploy an application?".
|
| Before you could use the MBeans to deploy/undeploy an application. Undeploying did not remove the files from the deploy directory. In fact, you could easily use the MBeans to deploy/undeploy an application directly from your own project's build directory if you wanted. We generally didn't do that because making a connection to the MBeanServer required a login, which complicates things. But, it was definitely an option.
|
I'm thinking of some programmatic addition of this at structure recognition.
e.g. adding temp modification type to ContextInfo instance
I'll have a better look on Friday, but any suggestions/ideas welcome.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4203667#4203667
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4203667
17 years, 2 months