> I recently took up the task of getting slide to work on weblogic 6.1. I
> have
> everything up and working fine, but now I have one small bug/change
request.
>
>
> org.apache.slide.common.Domain.java
> around line 660
> replace:
> FileInputStream is = new FileInputStream(fileName);
> with
> InputStream is =
> Domain.class.getClassLoader().getResourceAsStream(fileName);
>
> with this done, weblogic has no problem finding the Domain.xml file when
it
> is
> included in a war at WEB-INF\classes. Before I made this change, there
was
> nowhere I could put the Domain.xml file for weblogic to find it.
>
> I don't have Tomcat set up, so I wasn't able to validate whether or not
the
> change affects the typical deployment. If it does, I'd suggest trying the
> FileInputStream, checking for an error, and then trying the
ResourceAsStream
> method.
It's not very surprising that the self init would break in a servlet
environment, as it is not designed to be used in that case. The init is
supposed to be done in a servlet, like the WebDAV servlet does, like:
if (domainConfigFile != null) {
URL domainConfigFileURL =
getServletContext().getResource(domainConfigFile);
if (domainConfigFileURL != null) {
Domain.init(domainConfigFileURL);
}
}
So here, I would write a servlet implementing init(). You can also choose to
use the new EmbeddedDomain (it's cleaner).
There's an example of an integration for Catalina. A listener + the embedded
domain is used to handle the Slide lifecycle and keep it in sync with the
servlet container's lifecycle (see the SlideServerListener class for the
source code).
> Should I submit this as a bug as well?
Not really, as the selfInit is supposed to be used from a standalone
environment, where the file access would work.
> Now that I have it up and running, my next task is going to be to get it
to
> be part of a clustered environment. My three options seem to be:
> 1) Find all references to the cache and allow it to be turned off.
The easiest way to do that is probably to make the abstract store not
abstract, and use it instead of the standard store.
> 2) Implement some sort of timestamp on each Node and make sure that
> whichever
> layer does the caching checks this before returning the contents
Eventually, that's what I plan to be doing. Using the Xid here should be a
really good idea.
If you want to do that, the simplest would be to write a more sophisticated
StandardStore.
> 3) Allow only one slide instance to be running at any point in time, and
> create a
> heartbeat with a slave so that if the first instance crashes, the second
> takes over.
I guess that could do the job too.
Remy
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>