[Design the new POJO MicroContainer] - Re: Heavy usage of VirtualFileURLConnection
by alesj
I've implemented simple vfs cache:
| public interface VFSCache
| {
| /**
| * Get the file.
| *
| * @param uri the file's uri
| * @return virtual file instance
| * @throws IOException for any error
| */
| VirtualFile getFile(URI uri) throws IOException;
|
| /**
| * Get the file.
| *
| * @param url the file's url
| * @return virtual file instance
| * @throws IOException for any error
| */
| VirtualFile getFile(URL url) throws IOException;
|
| /**
| * Put vfs context to cache.
| *
| * @param context the vfs context
| */
| void putContext(VFSContext context);
|
| /**
| * Remove vfs context from cache.
| *
| * @param context the vfs context
| */
| void removeContext(VFSContext context);
|
| /**
| * Start the cache.
| *
| * @throws Exception for any error
| */
| void start() throws Exception;
|
| /**
| * Stop the cache.
| */
| void stop();
| }
|
As you can see it caches VFSContex.
Every time VFSContext is created, it is put into cache.
This creation only happens - if you use VFS API - in VFS class.
When you demand VirtualFile for given URI/URL,
I match VFSContex's rootURI to get the right context for URI/URL.
Then it's plain navigation from VFSContext to the actual relative VirtualFile.
Relative path == URI/URL path - context's path.
VFSCache comes in different impls: LRU, Timed, Soft, Weak.
It's all configurable over jboss.vfs.cache System property.
There is also optional CacheStatistics interface,
which knows how to return:
- cached contexts (unfortunately not for CachePolicy based cache)
- cache size
- last insert
I expect only a dozen contexts in this cache when running JBossAS.
e.g. deployers and deploy dir should be among them
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4185753#4185753
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4185753
16 years
[Design of JBoss jBPM] - Re: Behavior when next state in a
by woo37830
I'm at the stage where we have a working process and a console that drives several processes. Again, I want to figure out how to create the action or code that would cause the next task queued for the same user to be brought up without having to click in the queue. I created a JSF tag that was like completeTask except it returns the id of the next task IF it is for the same user. I'm trying to figure out how to "redirect" so that a new task gets loaded.
I've been having very good success (with some agony) of morphing the jbpm-console into a useful "application", instead of a demo, that can have several business processes available and gives users of the processes a good experience. A few new tags and some customized pages with "tab" behavior, etc. have made it very useful. The use of the JSF and s4j tags makes it easy to test and retest without starting and stopping the server or having to redeploy the console ( I use Eclipse with my workspace pointing to the unzipped jbpm-console.war and alter it there ). The only time I have to start and stop the server is when I add a class to the console, of course. Business processes are deployed as usual to the console.
While many have stated that one should roll their own application, etc. I feel that the jbpm-console was a very good starting place and a general console is exactly the approach to take rather than separate applications.
It has taken some time to work though how the tags work, what the model for execution is, etc., but it's worth it. Thanks for the help!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4185709#4185709
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4185709
16 years