-
1. Re: Can any type of file go in the farm dir?
jimm Oct 19, 2006 1:11 PM (in response to andrewboyd)The farm service is intended to deploy deployment units across a cluster. Not merely to copy files. You could extend FarmMemberService and basically copy the FarmMemberService.deploy method without 'supper.deploy(du)' line and this would basically just copy files around. However, this is a bit hackish. Also, the files are only going to be copied as often as the configured ScanPeriod so if server-02 gets the task before the scan on server-01 then server-02 wouldn't see the file.
I do not know what you are trying to accomplish but a cleaner solution might be to just use JBoss Cache to store the data in the file and then just throw away the file. The data would then be replicated across cluster and persisted however you like.
If you are looking for distributed replication of a filesystem then you could check out http://labs.jboss.com/portal/davcache
This project uses JBoss Cache to replicate files across a cluster. -
2. Re: Can any type of file go in the farm dir?
andrewboyd Oct 20, 2006 10:20 AM (in response to andrewboyd)Great reply. Thanks that gives me a lot to try.
Thanks again,
Andrew -
3. Re: Can any type of file go in the farm dir?
andrewboyd Oct 24, 2006 12:06 PM (in response to andrewboyd)Jim,
I tried extending the FarmMemberService but I get an exception at startup. I created a new thread for the exception:
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=93274
Do you have any suggestions?
Thanks,
Andrew -
4. Re: Can any type of file go in the farm dir?
jiwils Oct 24, 2006 12:37 PM (in response to andrewboyd)I did almost, but note quite what Jim suggested to create a "mirror" service. It even works (there is one minor issue). The main problem for me was that there are some hard coded SERVICE_NAME constants that come into play, so subclassing does not actually work well (you get spurious errors). I basically have a few classes that mirror the farming service's classes with changes to these constants (and a couple of other things). I think I might could even post this little project if anyone cared to see it.
-
5. Re: Can any type of file go in the farm dir?
andrewboyd Oct 24, 2006 1:32 PM (in response to andrewboyd)Yes I'd really apreciate you posting it.
Thanks
Andrew -
6. Re: Can any type of file go in the farm dir?
jiwils Oct 27, 2006 4:23 PM (in response to andrewboyd)"AndrewBoyd" wrote:
Yes I'd really apreciate you posting it.
Its coming...I've been very busy outside of work these past few days. -
7. Re: Can any type of file go in the farm dir?
jiwils Nov 1, 2006 1:48 AM (in response to andrewboyd)"jiwils" wrote:
Its coming...I've been very busy outside of work these past few days.
Take a look at the beginnings of the MirrorService wiki for a very, very alpha release of the code that should be helpful to you. Check that wiki page for updates later this week. I'll also post an annoucement in the JMX user forum when the first release is available.