Hey folks,
I know some discussion was under way that talked about creating an
integration module for Stripes with Terracotta. I've got a little time
this week to work on integration, and would love it if folks could chime
in with some pointers on at least one issue I'm seeing.
The following configuration options were required to get things going
thus far:
<instrumented-classes>
<include>
<class-expression>net.sourceforge.stripes.controller.FlashScope</class-expression>
</include>
<include>
<class-expression>net.sourceforge.stripes.controller.StripesRequestWrapper</class-expression>
</include>
<include>
<class-expression>javax.servlet.http.HttpServletRequestWrapper</class-expression>
</include>
<include>
<class-expression>javax.servlet.ServletRequestWrapper</class-expression>
</include>
</instrumented-classes>
However, this doesn't work out, as the FlashScope uses a non-portable
class:
com.tc.exception.TCNonPortableObjectError:
*******************************************************************************
Attempt to share an instance of a non-portable class referenced by a
portable class. This
unshareable class is a JVM- or host machine-specific resource. Please
ensure that instances
of this class don't enter the shared object graph.
For more information on this issue, please visit our Troubleshooting
Guide at:
http://terracotta.org/kit/troubleshooting
Referring class : net.sourceforge.stripes.controller.FlashScope
Referring field :
net.sourceforge.stripes.controller.FlashScope.semaphore
Thread : http-9080-7
JVM ID : VM(26)
Unshareable class: java.util.concurrent.Semaphore
Action to take:
1) Change your application code
* Ensure that no instances of java.util.concurrent.Semaphore
are added to any shared object graph
- OR -
2) Mark the offending field as transient (and thus not shared)
* edit your tc-config.xml file
* locate the <dso> element
* add this snippet inside the <dso> element, above the <locks>
element
<transient-fields>
<field-name>null</field-name>
</transient-fields>
* if there is already a <transient-fields> element present, simply
add
the new field inside it
*******************************************************************************
My biggest question about the use of a Semaphore is this -- if this
object were to get serialized and then re-materialized onto a different
node due to a failover, what would that mean for the Semaphore? Is it
possible to replace it with something else that is more portable? Any
thoughts are appreciated..
Thanks,
Stephen.
--
Stephen Starkey
[email protected]
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users