This discussion was never really meant as a bug report or feature request, but it's always good to look at improving whats out there. Such a provider might be nice and I was thinking of something like that.
Perhaps I can pick this up as my first GBean? On 10/24/05, David Jencks <[EMAIL PROTECTED]> wrote: > > On Oct 23, 2005, at 11:32 PM, Barry van Someren wrote: > > > David, > > > > My experience with persistance in webapps has been with using > > databases. > > I recently ran into a JSP based Wiki that uses flat files (most likely > > in the working directory) to persist data. > > > > Now I remember that back at my old company we used Tomcat for a > > project and it would let you add files to the working directory that > > would persist between runs. > > When you used JBoss, it wouldn't (and I reasoned that it's fair from a > > security point of view) > > So I'm kind of asking how Geronimo handles this and what is the best > > way of persisting if you insist on flat files. > > Well, I would avoid having your application save anything in its own > unpacked directory at all costs: this is just asking for trouble, for > instance, when you deploy the next upgrade :-). > > I recommend creating a subdirectory under var (e.g. var/myAppData). > Unfortunately AFAIK finding this at runtime is a bit involved. > > private static final ObjectName SERVER_INFO = > ObjectName.getInstance("geronimo.server: > J2EEApplication=null,J2EEModule=org/apache/geronimo/ > System,J2EEServer=geronimo,j2eeType=GBean,name=ServerInfo"); > > Kernel kernel = KernelRegistry.getSingleKernel(); > File dir = (FIle)kernel.invoke(SERVER_INFO, "resolve", new Object[] > {"var/myAppData"}, new String[] {String.class.getName()}); > > There might be an easier way to get this but I don't know what it is. > > It would be nice to provide a better way :-) Perhaps we could write a > URLHandler that would resolve for us? serverinfo://var/myAppData Any > other ideas? > > thanks > david jencks > > > > > Greetings, > > > > Barry > > > > > > On 10/24/05, David Jencks <[EMAIL PROTECTED]> wrote: > >> > >> On Oct 23, 2005, at 1:16 PM, Barry van Someren wrote: > >> > >>> Hi there, > >>> > >>> The deploy instructions show how to deploy WAR's only deals with > >>> packed WAR's. > >>> Can you also deploy exploded WAR's in Geronimo (just like you can do > >>> with Tomcat)? > >> > >> I think so. Note that any war or ear with a war inside will get > >> unpacked into the config-store. I think if you modify jsps or static > >> content there the changes will get picked up. > >> > >> We've had a plan for a while to make it possible to deploy a war so > >> that jsps and static content are picked up from the original source > >> location rather than a deployed copy. This would let you work on your > >> jsps in your IDE in the location your SCM system knows about yet see > >> the changes immediately. I'm not sure if anyone has had the time to > >> expose this functionality yet. I would think this would be more > >> useful > >> than an "unpacked war" deploy feature. > >> > >>> And what about creating flat files? (writing in the deployed/work > >>> directory) > >> > >> Could you explain what you have in mind here in more detail? > >> > >>> I'm trying out some open source projects to see how well they work > >>> under Geronimo (to add to the samples matrix) > >> > >> Great! > >>> I'm only learning here, sorry ;-) > >> > >> Well, hopefully I'm learning here too :-) > >> > >> thanks > >> david jencks > >> > >>> > >>> Greets, > >>> > >>> Barry > >>> > >> > >> > > > >