I use the following tomcat definition for a cocoon based webapp
that restarts automatically, when classes or jars change:

<Context path="/mywebapp"
         docBase="/opt/cocoon/develop"
         reloadable="true"
         debug="0">
         <Resources
          className="org.apache.naming.resources.FileDirContext"
          allowLinking="true"/>
        </Context>
</Context>

interpretation:

docbase    points to where the cocoon app resides
reloadable tells tomcat to restart on changes in webapp

the <Resources> tag is only needed, if your webapp directory
contains symbolic links or the docbase itself is a symbolic link.

NOT NOTE NOTE!!! caveat:

Your webapp MUST NOT BE DEPLOYED WITHIN THE webapps Directory,
if you use this approach. Otherwise your cocoon app would be
started twice !!!!!!!

Just another hint:

Befoire cocoon-2.0.4 the sitemap reloading had a bug, that
crashed cocoon under certain circumstances. This bug has
been fixed with cocoon-2.0.4.


regards, hussayn

Derek Hohls wrote:
Hussayn
These tips would be useful on the Cocoon Wiki too!
One question - just *how* do you restart only the cocoon app
without restarting tomcat (and do you delete the work files somewhere
in that process as well?)
Thanks
Derek

>>> [EMAIL PROTECTED] 20/01/2003 12:50:26 >>>

Mark Horgan wrote:

> Also, do others find working with Cocoon very frustrating? When you make a
> change it takes forever for the web-app to reload and re-compile the java
> class, espcially when it takes up so much memory. Also even when using the
> logs its very hard to track down bugs in ones code especially logicsheets.
> But generally I like Cocoon though I wish it was more straight-forward to
> develop with it.
>
> Thx in advance,
> Mark
>

Hy,

When i started with cocoon i got really mad with hunting errors
and understanding, how all this fits together. But after about
three months of working with the beast, i built up some
survival strategies. It is how I do it. It may help as a guide,
but it does not claim to be the "best approach":

1.) Instead of restarting the whole container, i only restart
the cocoon app, when needed. This takes a few seconds with
tomcat 4.1.* (~300 MHz sparc dual processor, solaris 2.8)
2.) During development i use tomcat and i set the reloadable="true"
within the <Context/> of my webapp. By this any changes in the
classpath causes an automatic webapp restart.
3.) use released versions if possible (cocoon-2.0.4 seems quite mature)
4.) Proceed in "baby steps" when changing things in your cocoon app
5.) follow KISS (keep it simple, stupid) i keep as much as possible
with the basics of cocoon and don't use (yet) the more fancy stuff.
6.) Separate your app into subsitemaps and subdirs with related issues
7.) use the cocoon-wiki
Especially the search function unhides
interesting docs
8.) I started using the "coocon developers handbook"
It's written from Lajos Moczar and some other active
cocoon developers...

Here are two of my personal favorites. I have documented this in
our company wiki:

9.) For XSLT processing i have added Saxon-6.5.2. It's not
straight forward to install, but sometimes it can be
utilised with less pain, than xalan (just a matter of taste)
Look into cocoon wiki for a quick description or look at
http://www.saxess.com/JSPWiki/Wiki.jsp?page=Install
for a quickinstall step by step instruction.
10.)use entity resolver wherever possible.
look at the cocoon docs for the basics or at
http://www.saxess.com/JSPWiki/Wiki.jsp?page=EntityResolver
for a quickinstall description.

hope, that helps someone ...

regards, hussayn

--
Dr. Hussayn Dabbous
SAXESS Software Design GmbH
Neuenhöfer Allee 125
50935 Köln
Telefon: +49-221-56011-0
Fax: +49-221-56011-20
E-Mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>


--
This message has been scanned for viruses and dangerous content by
*MailScanner* <http://www.mailscanner.info/>, and is believed to be clean.

"The CSIR exercises no editorial control over E-mail messages and/or
attachments thereto/links referred to therein originating in the
organisation and the views in this message/attachments thereto are
therefore not necessarily those of the CSIR and/or its employees.
The sender of this e-mail is, moreover, in terms of the CSIR's Conditions
of Service, subject to compliance with the CSIR's internal E-mail and
Internet Policy."
--
Dr. Hussayn Dabbous
SAXESS Software Design GmbH
Neuenhöfer Allee 125
50935 Köln
Telefon: +49-221-56011-0
Fax:     +49-221-56011-20
E-Mail:  [EMAIL PROTECTED]


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to