I ran across an email thread that just suggested to create the
WebRequest/WebSession objects. So I am going to try that. If anyone has a
better idea let me know.

On 9/26/06, Patrick Moore <[EMAIL PROTECTED]> wrote:

Hi Ben ---

thanks for this info.

I just tried what I think is your suggestion. I added the
ApplicationInitializer interface to my demo.Samples service and added this
method:

    public void initialize(HttpServlet arg0) {
        try {
            init();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
 and it doesn't seem to work quite completely. I get past the point of the
infrastructure object ApplicationStateManager not being available. However,
now I get a different exception.

How does tapestry initialize a session? Is it possible for a background
thread to initialize a tapestry session?

--------------------------
java.lang.NullPointerException: Property 'webRequest' of <OuterProxy for
tapestry.globals.RequestGlobals(
org.apache.tapestry.services.RequestGlobals)> is null.
    at
$WebRequest_10deb12def2._targetServiceProperty($WebRequest_10deb12def2.java)

    at $WebRequest_10deb12def2.getSession($WebRequest_10deb12def2.java)
    at $WebRequest_10deb12dec3.getSession($WebRequest_10deb12dec3.java)
    at $WebRequest_10deb12dec2.getSession($WebRequest_10deb12dec2.java)
    at org.apache.tapestry.engine.state.SessionScopeManager.getSession(
SessionScopeManager.java:48)
    at org.apache.tapestry.engine.state.SessionScopeManager.get(
SessionScopeManager.java:64)
    at
$StateObjectPersistenceManager_10deb12deed.get($StateObjectPersistenceManager_10deb12deed.java)

    at
$StateObjectPersistenceManager_10deb12deec.get($StateObjectPersistenceManager_10deb12deec.java)
    at org.apache.tapestry.engine.state.StateObjectManagerImpl.get(
StateObjectManagerImpl.java:50)
    at org.apache.tapestry.engine.state.ApplicationStateManagerImpl.get (
ApplicationStateManagerImpl.java:60)
    at
$ApplicationStateManager_10deb12de9a.get($ApplicationStateManager_10deb12de9a.java)
    at
$ApplicationStateManager_10deb12de9b.get($ApplicationStateManager_10deb12de9b.java)

    at
com.transparentpolitics.core.TransPolSessionManagerImpl.getTransPolSession
(TransPolSessionManagerImpl.java:46)


Reply via email to