Using one persistence layer (I'll talk about Hibernate, but it most
likely applies to any other)
for more than one web-app is a bit tricky.

Simpler part is creating subclasses of TapestryFilter
 one that loads hibernate and shares it via ServletContext
 one that loads Tapestry without hibernate and uses one from ServletContext

The tougher part is that any shared libraries must be in a higher ClassLoader
or you'll end up with bunch of classloader issues.
So you have to put hibernate and it's dependancies into shared lib of your
web container, and your persisted entities as well.
remove those libs from the webapps and run the whole thing.



I've made it work once for T4 because I was very annoyed with
restarting webapp and waiting
for ages (about 15 seconds actualy). So this way I could restart only
the web part and have some speedup.
Idid ti with tomcat because I could restart a webapp inside tomcat
with an ant script,
now I use jetty launcher and it can bi done with JMX (I havent tried it yet)

If I get annoyed enough with hibernate startup again I'll do it for T5,
If you make it work pelase put it on the wiki :)

Davor Hrg

On Feb 4, 2008 9:28 AM, Angelo Chen <[EMAIL PROTECTED]> wrote:
>
> Hi Renat,
>
> EJB is not a must, any suggestions for this kind of app as long as front end
> is Tapestry 5.
>
>
> Renat Zubairov wrote:
> >
> > Hello Angelo,
> >
> > Main question is do you want to use EJB in your app or not, because
> > usually
> > there is no proper way to share state between multiple WAR's deployed
> > inside
> > the application container.
> >
> > Renat
> >
> >
> >
>
> --
> View this message in context: 
> http://www.nabble.com/T5%3A-best-practice-for-a-multiple-module-app-tp15260841p15263775.html
>
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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

Reply via email to