[Design the new POJO MicroContainer] - VFS HDScanner test
by mstruk
The first reason this test is failing is because the default mode for vfszip is asynchronous lock reaping. That means the archive remains locked for 5 seconds after it was last used.
Also, this test forces archive reuse (and consequently a file lock) continuously in two ways:
a) MockProfileServiceRepository creates a new VFSContext on every deployment scan:
| VirtualFile deployDir = VFS.getRoot(applicationDir.toURI());
|
instead of holding on to one instance of root VirtualFile, thereby forcing reinitialization of arhive metadata on every scan, which causes a file lock to be acquired and also slows things down.
b) The test itself forces redeploy by continuously changing lastModified - again causing a file lock to be acquired.
Every time a file lock is acquired it takes 5 seconds (after no longer needed - which in most cases is a split second after it was acquired) for it to clear.
Possible solutions are:
1) put the following at the beginning of testDeleteWhileScanning() to activate synchronous lock release (access to archive entries becomes a bit slower).
| System.setProperty("jboss.vfs.forceNoReaper", "true");
|
2) Stop the scanner first, wait for 5 seconds and then do a delete (but I guess the whole purpose of the test is to do a delete while the scanner is still active)
3) Rewrite MockProfileServiceRepository to reuse deployDir VirtualFile. Tweak scan, and wait periods to bigger values + try archive.delete() multiple times - to catch a window when archive is unlocked.
| VirtualFile deployDir = getDeploymentRoot(applicationDir.toURI());
|
| ...
|
| private VirtualFile deploymentRoot;
|
| protected VirtualFile getDeploymentRoot(URI uri) throws IOException
| {
| if (deploymentRoot == null)
| {
| deploymentRoot = VFS.getRoot(uri);
| }
| return deploymentRoot;
| }
|
This approach relies on correct interplay of lastModified changes, and scanner and reaper periods which are internally hardcoded and can possibly change without notice - it's not a reliable approach.
I opted for approach one. It's commited.
Cheers,
- marko
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4160492#4160492
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4160492
16 years
[Design of Clustering on JBoss (Clusters/JBoss)] - Re: JBPAPP-863 -- FC blocks during slow failure detection
by bela@jboss.com
It's not just FC that might block for credits from crashed members (by pulling the plug), but also all cluster-wide calls with GET_ALL will either block or time out (if configured) because they won't get a response from the 'pulled' members. Note that of course this doesn't apply to GET_FIRST or other modes, e.g. a response filter:
a response filter could handle SUSPECT messages, and terminate a call if the only responses missing are one from suspected members.
If we decrease that timeout, we might run into false suspicions again. However, with 2.5 and later versions, since we use out-of-band (OOB) messages for heartbeats, which are handled by a separate thread pool, we should at least not run into the problem that a heartbeat is not handled because it is stuck behind a regular message, as this won't be the case.
So in this light, +1 for reducing the timeout in FD, BUT ONLY in 2.6.x, *NOT* 2.4.x !
Changing to FD_ALL from FD in a future version will also help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4160466#4160466
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4160466
16 years
[Design of JBoss ESB] - Re: Regarding JBoss ESB
by AmbicaSona
oh....may b my explanation was poor...:)
I have not started integrating the ESB with the JSP. actually mine is a web application and accepts only one type of request format. But i have 4 clients and the formats of their request is diifrent from mine. So i am using ESB and changing their format to my application understandable format and sending the response back after receiving the response from my application server by changing in to their specific format.
This i have successfully finished with out any errors and my response is also exactly same as what i wanted. But for this i have followed the guide of JBOSS ESB and i created in a way which will run through command prompt.
Is there any direct class (like in Mule, "org.mule.components.simple.BridgeComponent") through which we can assign a url for this ESB or we have to write a JSP class compulsory? and how i can call ESB from my doPost()/doGet() method of my JSP/Servlet...??????????
i have gone through native_client sample which is exposed as a web service.. i dont want to expose my ESB as a web service.. I just want to make my ESB as a web so that i can call that through a URL...
Any help is highly appreciable..
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4160464#4160464
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4160464
16 years