Sorry, Howard, haven't I posted a copy to the list?.. I'll correct it.

  First of all, I agree with your guess. It's, probably, a classloading
problem. If interested in, more info on current jboss class loading model
you can get here http://jboss.org/forums/thread.jsp?forum=67&thread=15974.

  About exceptions I get. The most often one is the following (catalog is a
StatelessSession bean remote interface, I handle it like persistent
property):

Name: com.primix.tapestry.record.RollbackException
Message: Unable to set property catalog of component CategoryManager to
tracker/ejb/Catalog:Stateless.
componentId: CategoryManager
newValue: tracker/ejb/Catalog:Stateless
propertyName: catalog

Name: com.primix.tapestry.util.DynamicInvocationException
Message: Could not invoke method getCatalog on
com.imedia.tracker.web.pages.CategoryManager@8a9d2a[CategoryManager].

Name: java.lang.IllegalArgumentException
Message: argument type mismatch
Trace:
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
com.primix.tapestry.util.prop.PropertyAccessor.set(PropertyAccessor.java:169
)
com.primix.tapestry.util.prop.PropertyHelper.set(PropertyHelper.java:586)
com.primix.tapestry.record.PageRecorder.rollback(PageRecorder.java:222)
com.primix.tapestry.engine.RequestCycle.getPage(RequestCycle.java:257)
com.primix.tapestry.engine.PageService.service(PageService.java:92)
com.primix.tapestry.engine.AbstractEngine.service(AbstractEngine.java:706)
com.primix.tapestry.ApplicationServlet.doService(ApplicationServlet.java:203
)
com.primix.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:168)
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:243)
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:190)
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:528)
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2
46)
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2343)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170
)
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1012)
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107
)
java.lang.Thread.run(Thread.java:536)


  And once I was lucky to get another one:

WebAppClassLoader: Lifecycle error : CL stopped
java.lang.NoClassDefFoundError: java/lang/Integer
at com.primix.tapestry.util.pool.Pool.toString(Pool.java:351)
at java.lang.String.valueOf(String.java:2173)
at java.lang.StringBuffer.append(StringBuffer.java:369)
at com.primix.tapestry.util.pool.Pool.executeCleanup(Pool.java:300)
at com.primix.tapestry.util.pool.JanitorThread.sweep(JanitorThread.java:184)
at com.primix.tapestry.util.pool.JanitorThread.run(JanitorThread.java:219)

I've got it only once at all. I deployed the app and then undeployed it.

> I suspect the problem is that on each redeploy, a new
> classloader loads the framework.  Because of this, its a
> new instance of JanitorThread, and thus a new static
> variable ... in other words,new shared JanitorThreads
> keep getting created.

Agree. I packaged tapistry's jar with other classes in the war.
Now I tried to deploy tapestry framework separately from the ear. And after
redeployment I still get the first exception.

My guess is if the framework is loaded once, only one pool will be created
for all applications. Is it right? Deploying tapestry separately from the
app, after redeployment of the app I see a new pool object created. I see
its cleaning up and don't see cleaning for the old pool. Is it a correct
behaviour?
But the most important problem is the first exception. Can't figure out
what's going on... It really works when deployed once.

Hope it's useful. Thank you for the help.

alex

>
> Assuming this is the problem, then the solution is to
> not rely on a static variable to store the JanitorThread
> uses by the Pools in Tapestry; one more thing to store
> in the ServletContext.
>
> I'd be interested in seeing those exceptions though; I
> had thought I'd weeded out all the race conditions
> related to setting page properties.
>
> --
> [EMAIL PROTECTED]
>
> http://tapestry.sf.net
> >   I met a weird problem related with pooling.
> >   Though, I am not sure it's tapistry's or jboss' problem.
> >
> >   My application deploys successfully. And runs fines at
> least after first
> > deployment.
> >
> >   The problem is that, when I undeploy my app, pool
> cleaning continuous to
> > run. After many redeployment I got many pools running. It
> seems like they
> > are empty. But yesterday I met a problem that after next
> redeployment my
> > pages got weird behaviour, I got exceptions on inability to set page
> > properties. Server restart seems to solve this.
> >
> >   Could anyone comment it?
> >
> >   I use Tapestry-2.0.1, JBoss-3.1/Tomcat, j2sdk1.4.0
> >
> > TIA,
> >
> > alex
> >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, May 21, 2002 4:20 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: [Tapestry-developer] Pool cleaning
> > >
> > >
> > > The default configuration is to clean the pool every 30
> > > seconds in a low-priority thread.
> > >
> > > I use a "generational" approach to clean the pool.  As
> > > objects go into the pool, they are tagged with the
> > > current generation (this is more efficient than
> > > recording the current time).  When the pool is cleaned,
> > > the generation count is incremented, and older objects
> > > (more than a few generations old) are culled.
> > >
> > > I've been thinking about making some entries in the
> > > pool "sticky" ... for instance, it would be nice if the
> > > Home page, in the default locale, was kept around
> > > always.  Currently, if the application is queiscent for
> > > a long period of time, it causes the Home page to come
> > > up slow (since it must be rebuilt from its
> > > specification).
> > >
> > > Of course, any site built with Tapestry would be so
> > > popular, this would never happen!
> > >
> > > --
> > > [EMAIL PROTECTED]
> > >
> > > http://tapestry.sf.net
> > > >   I see the pool cleans up constantly like a crazy. Can it
> > > be configured?
> > > >
> > > > Culled 0 pooled objects and 0 keys
> > > > Executing cleanup of Pool@blabla[Generation XX]
> > > >
> > > > There so many pools instantiated. What's going on? Why is
> > > it executing
> > > > cleanup if it culled 0 objects and 0 keys?
> > > >
> > > > TIA,
> > > >
> > > > alex
> > > >
> > > > PS: but comparing with other frameworks I worked with,
> > > Tapestry's idea is
> > > > the best!
> > > >
> > > >
> > > > _______________________________________________________________
> > > >
> > > > Don't miss the 2002 Sprint PCS Application Developer's
> Conference
> > > > August 25-28 in Las Vegas --
> > > http://devcon.sprintpcs.com/adp/index.cfm
> > > >
> > > > _______________________________________________
> > > > Tapestry-developer mailing list
> > > > [EMAIL PROTECTED]
> > > > https://lists.sourceforge.net/lists/listinfo/tapestry-developer
> >


_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer

Reply via email to