Short answer: no, not that I'm aware of. The only context in Seam that outlives a server restart is BUSINESS_PROCESS context.
If you really want to avoid the PermGen out of space problem, use a JVM that does not have a PermGen space like Oracle JRockit.
Is your environment a 2 node horizontal JBoss cluster or what? If state replication is turned on, the HTTP session state and SFSB state should be replicated to the other nodes in your cluster, typically after each business method in a SFSB, for example, successfully completes. If the node for that client's session fails, then the state should be
pre-replicatedfor the subsequent HTTP request from that same client that will hit another active node in the cluster. This is seamless failover which preserves the user's session data and typically re-authentication is not required. Essentially, the user should not even know that a node failed in the JBoss cluster.
Your other option is to increase the PermGen allocation in the JVM arguments.
I use this JVM tuning based on DAllen's recommendation in SiA book for my local JBoss and have not run out of PermGen space in a long time:
-server -Xms512m -Xmx1024m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=512m -Xverify:none
note that in prod you want to pin the max and min Heap space allocation to the same size (i.e. -Xms512m -Xmx512m). Read JBoss in Action tuning section for more info.
thanks a lot for your detailed reply. I was kinda hoping for a quick fix, but I guess I will have to go for the 'session replication across cluster nodes' solution.
Until I have that set up, I'll use the PermGen configuration above to minimize restarts of the server.
Thanks a lot,