voyent
Sample project for AHS on Glassfish: GroupAsyncRenderer and other questions  XML
Forum Index -> Async HTTP Server
Author Message
senortorpedo

Joined: 09/Feb/2008 00:00:00
Messages: 5
Offline


Hi,

I developed a small example application to test AHS support on Glassfish V2 UR2, IntelMac 2,33GHz with Java 1.6. The application toggles the String "Hello World" to "Goodbye World" and vice versa, sharing the current state to all members of the group renderer and updating them with ajax push. I followed all instructions from the developer guide to setup the JMS capabilities on the server as well as the configuration needed in web.xml, as you can see in the attached war-file.

I want to discuss some issues and questions on this sample application hoping this will find your immediate attention.


1. Deployment)

This is the log output when deploying the module:
------------------------------------------------------------------------------
[#|2008-05-06T14:37:25.046+0200|INFO|sun-appserver9.1|javax.enterprise.system.tools.admin|_ThreadID=19;_ThreadName=httpWorkerThread-4848-0;/private/tmp/s1astempdomain1server-986122318/AHSTest.war;|ADM1006:Uploading the file to:[/private/tmp/s1astempdomain1server-986122318/AHSTest.war]|#]

[#|2008-05-06T14:37:26.641+0200|INFO|sun-appserver9.1|javax.enterprise.system.tools.deployment|_ThreadID=23;_ThreadName=Thread-423;|deployed with moduleid = AHSTest|#]

[#|2008-05-06T14:37:27.072+0200|INFO|sun-appserver9.1|javax.enterprise.resource.webcontainer.jsf.config|_ThreadID=18;_ThreadName=httpWorkerThread-4848-1;/AHSTest;|Initializing Sun's JavaServer Faces implementation (1.2_04-b20-p03) for context '/AHSTest'|#]

[#|2008-05-06T14:37:27.168+0200|INFO|sun-appserver9.1|com.icesoft.faces.application.D2DViewHandler|_ThreadID=18;_ThreadName=httpWorkerThread-4848-1;|
ICEsoft Technologies, Inc.
ICEfaces x.x.x
Build number: x
Revision: x
|#]

[#|2008-05-06T14:37:27.315+0200|INFO|sun-appserver9.1|com.icesoft.faces.application.D2DViewHandler|_ThreadID=18;_ThreadName=httpWorkerThread-4848-1;|ICEfaces JSP parser disabled. This is a Facelets-only configuration.|#]

[#|2008-05-06T14:37:28.161+0200|INFO|sun-appserver9.1|com.icesoft.net.messaging.jms.JMSAdapter|_ThreadID=18;_ThreadName=httpWorkerThread-4848-1;|JMS Environment:
java.naming.provider.url = iiop://localhost:3700
java.naming.factory.initial = com.sun.appserv.naming.S1ASCtxFactory
|#]

[#|2008-05-06T14:37:28.162+0200|WARNING|sun-appserver9.1|javax.enterprise.system.core.naming|_ThreadID=18;_ThreadName=httpWorkerThread-4848-1;iiop://localhost:3700;_RequestID=bd11468d-4bd4-429e-86c2-2ea8e5257cb9;|NAM1001: No Endpoints selected in com.sun.appserv.iiop.endpoints property. Using JNDI Provider URL iiop://localhost:3700 instead|#]
------------------------------------------------------------------------------

As you can see the last entry already informs me about some missing properties. I'm not shure whether this is important or not. At least it seems important to mention. Any comments?

2. Runtime)
When initially opening the URL in the browser and hitting the link following exceptions occur:
----------------------------------------------------------------------------
[#|2008-05-06T14:41:04.727+0200|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=26;_ThreadName=Timer-463;_RequestID=d9ab9f30-7c63-4cc4-8714-5769f525e410;|
Exception in thread "Timer-463" |#]

[#|2008-05-06T14:41:04.728+0200|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=26;_ThreadName=Timer-463;_RequestID=d9ab9f30-7c63-4cc4-8714-5769f525e410;|java.lang.NumberFormatException: For input string: "0:0:0:0:0:0:1:3700"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:456)
at java.lang.Integer.parseInt(Integer.java:497)
at com.sun.jndi.cosnaming.IiopUrl$Address.<init>(IiopUrl.java:117)
at com.sun.jndi.cosnaming.IiopUrl.<init>(IiopUrl.java:174)
at com.sun.appserv.naming.RoundRobinPolicy.getAddressPortList(RoundRobinPolicy.java:370)
at com.sun.appserv.naming.RoundRobinPolicy.setClusterInstanceInfo(RoundRobinPolicy.java:169)
at com.sun.appserv.naming.S1ASCtxFactory.getInitialContext(S1ASCtxFactory.java:284)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at com.icesoft.net.messaging.jms.JMSAdapter.initialize(JMSAdapter.java:402)
at com.icesoft.net.messaging.jms.JMSAdapter.publish(JMSAdapter.java:169)
at com.icesoft.net.messaging.MessagePipeline.publish(MessagePipeline.java:151)
at com.icesoft.net.messaging.PublishTask.run(PublishTask.java:46)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
|#]

[#|2008-05-06T14:41:21.876+0200|SEVERE|sun-appserver9.1|com.icesoft.faces.context.View|_ThreadID=21;_ThreadName=httpSSLWorkerThread-8080-0;_RequestID=aaf815ef-1198-4058-8ad6-7e5642069d66;|Failed to notify listener: com.icesoft.faces.context.View$3@fb6cc3f
java.lang.IllegalStateException: Timer already cancelled.
at java.util.Timer.sched(Timer.java:354)
at java.util.Timer.schedule(Timer.java:170)
at com.icesoft.net.messaging.MessageServiceClient.schedule(MessageServiceClient.java:825)
at com.icesoft.net.messaging.MessagePipeline.enqueue(MessagePipeline.java:129)
at com.icesoft.net.messaging.MessageServiceClient.publish(MessageServiceClient.java:922)
at com.icesoft.net.messaging.MessageServiceClient.publish(MessageServiceClient.java:493)
at com.icesoft.net.messaging.MessageServiceClient.publish(MessageServiceClient.java:604)
at com.icesoft.faces.async.server.AsyncHttpServerAdaptingServlet$1.run(AsyncHttpServerAdaptingServlet.java:111)
at com.icesoft.faces.webapp.http.core.ViewQueue.put(ViewQueue.java:17)
at com.icesoft.faces.context.View$3.run(View.java:73)
at com.icesoft.faces.context.View.broadcastTo(View.java:189)
at com.icesoft.faces.context.View.put(View.java:164)
at com.icesoft.faces.webapp.http.core.ReceivePing.service(ReceivePing.java:29)
at com.icesoft.faces.webapp.http.core.RequestVerifier.service(RequestVerifier.java:44)
at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer$Matcher.serviceOnMatch(PathDispatcherServer.java:50)
at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:19)
at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19)
at com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:29)
at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:139)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:35)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:79)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:855)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:542)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:440)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:366)
at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:54)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
at com.sun.enterprise.web.connector.grizzly.comet.CometEngine.executeServlet(CometEngine.java:547)
at com.sun.enterprise.web.connector.grizzly.comet.CometEngine.handle(CometEngine.java:299)
at com.sun.enterprise.web.connector.grizzly.comet.CometAsyncFilter.doFilter(CometAsyncFilter.java:87)
at com.sun.enterprise.web.connector.grizzly.async.DefaultAsyncExecutor.invokeFilters(DefaultAsyncExecutor.java:175)
at com.sun.enterprise.web.connector.grizzly.async.DefaultAsyncExecutor.interrupt(DefaultAsyncExecutor.java:153)
at com.sun.enterprise.web.connector.grizzly.async.AsyncProcessorTask.doTask(AsyncProcessorTask.java:92)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
|#]
--------------------------------------------------------------------------------

Can anybody tell me what that means and which measurements I should take into consideration to get rid of these outputs? Also important to mention is that the GroupAsyncRendering is NOT working with AHS. Only if you comment out the AHS configuration block in web.xml, the application is working as it should (then, however, without AHS, the "old" way).

3. Undeployment)
When undeploying the web module I get following exceptions:
-------------------------------------------------------------------------------
[#|2008-05-06T14:36:35.655+0200|SEVERE|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=18;_ThreadName=httpWorkerThread-4848-1;_RequestID=bd11468d-4bd4-429e-86c2-2ea8e5257cb9;|WebModule[/DefaultIceWebBase]PWC1410: Servlet Persistent Faces Servlet threw unload() exception
javax.servlet.ServletException: PWC1386: Servlet.destroy() for servlet Persistent Faces Servlet threw exception
at org.apache.catalina.core.StandardWrapper.unload(StandardWrapper.java:1448)
at org.apache.catalina.core.StandardWrapper.stop(StandardWrapper.java:1796)
at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1102)
at org.apache.catalina.core.StandardContext.removeChild(StandardContext.java:3782)
at org.apache.catalina.startup.ContextConfig.stop(ContextConfig.java:1046)
at com.sun.enterprise.web.WebModuleContextConfig.lifecycleEvent(WebModuleContextConfig.java:158)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:143)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:5335)
at com.sun.enterprise.web.WebModule.stop(WebModule.java:357)
at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1102)
at com.sun.enterprise.web.WebContainer.unloadWebModule(WebContainer.java:2207)
at com.sun.enterprise.web.WebContainer.unloadWebModule(WebContainer.java:2137)
at com.sun.enterprise.server.WebModuleDeployEventListener.moduleUndeployed(WebModuleDeployEventListener.java:226)
at com.sun.enterprise.server.WebModuleDeployEventListener.moduleUndeployed(WebModuleDeployEventListener.java:313)
at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:976)
at com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:961)
at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:464)
at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:176)
at com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.java:308)
at com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:226)
at com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStopEvent(ServerDeploymentTarget.java:332)
at com.sun.enterprise.deployment.phasing.ApplicationStopPhase.runPhase(ApplicationStopPhase.java:136)
at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:919)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.stop(PEDeploymentService.java:652)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.stop(PEDeploymentService.java:699)
at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.stop(ApplicationsConfigMBean.java:767)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:375)
at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:358)
at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:464)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)
at $Proxy1.invoke(Unknown Source)
at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304)
at com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174)
at com.sun.enterprise.admin.jmx.remote.server.callers.InvokeCaller.call(InvokeCaller.java:69)
at com.sun.enterprise.admin.jmx.remote.server.MBeanServerRequestHandler.handle(MBeanServerRequestHandler.java:155)
at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.processRequest(RemoteJmxConnectorServlet.java:122)
at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.doPost(RemoteJmxConnectorServlet.java:193)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:116)
Caused by: java.lang.IllegalStateException: PWC2779: getAttributeNames: Session already invalidated
at org.apache.catalina.session.StandardSession.getAttributeNames(StandardSession.java:1188)
at org.apache.catalina.session.StandardSessionFacade.getAttributeNames(StandardSessionFacade.java:153)
at com.icesoft.faces.webapp.http.core.DisposeBeans.in(DisposeBeans.java:25)
at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet$4.run(MainSessionBoundServlet.java:124)
at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.shutdown(MainSessionBoundServlet.java:143)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.shutdown(SessionDispatcher.java:55)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.shutdown(PathDispatcher.java:60)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.shutdown(PathDispatcher.java:68)
at com.icesoft.faces.webapp.http.servlet.MainServlet.destroy(MainServlet.java:90)
at org.apache.catalina.core.StandardWrapper.unload(StandardWrapper.java:1433)
... 74 more
----- Root Cause -----
java.lang.IllegalStateException: PWC2779: getAttributeNames: Session already invalidated
at org.apache.catalina.session.StandardSession.getAttributeNames(StandardSession.java:1188)
at org.apache.catalina.session.StandardSessionFacade.getAttributeNames(StandardSessionFacade.java:153)
at com.icesoft.faces.webapp.http.core.DisposeBeans.in(DisposeBeans.java:25)
at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet$4.run(MainSessionBoundServlet.java:124)
at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.shutdown(MainSessionBoundServlet.java:143)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.shutdown(SessionDispatcher.java:55)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.shutdown(PathDispatcher.java:60)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.shutdown(PathDispatcher.java:68)
at com.icesoft.faces.webapp.http.servlet.MainServlet.destroy(MainServlet.java:90)
at org.apache.catalina.core.StandardWrapper.unload(StandardWrapper.java:1433)
at org.apache.catalina.core.StandardWrapper.stop(StandardWrapper.java:1796)
at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1102)
at org.apache.catalina.core.StandardContext.removeChild(StandardContext.java:3782)
at org.apache.catalina.startup.ContextConfig.stop(ContextConfig.java:1046)
at com.sun.enterprise.web.WebModuleContextConfig.lifecycleEvent(WebModuleContextConfig.java:158)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:143)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:5335)
at com.sun.enterprise.web.WebModule.stop(WebModule.java:357)
at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1102)
at com.sun.enterprise.web.WebContainer.unloadWebModule(WebContainer.java:2207)
at com.sun.enterprise.web.WebContainer.unloadWebModule(WebContainer.java:2137)
at com.sun.enterprise.server.WebModuleDeployEventListener.moduleUndeployed(WebModuleDeployEventListener.java:226)
at com.sun.enterprise.server.WebModuleDeployEventListener.moduleUndeployed(WebModuleDeployEventListener.java:313)
at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:976)
at com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:961)
at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:464)
at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:176)
at com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.java:308)
at com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:226)
at com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStopEvent(ServerDeploymentTarget.java:332)
at com.sun.enterprise.deployment.phasing.ApplicationStopPhase.runPhase(ApplicationStopPhase.java:136)
at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:919)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.stop(PEDeploymentService.java:652)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.stop(PEDeploymentService.java:699)
at com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.stop(ApplicationsConfigMBean.java:767)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:375)
at com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:358)
at com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:464)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)
at $Proxy1.invoke(Unknown Source)
at com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304)
at com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174)
at com.sun.enterprise.admin.jmx.remote.server.callers.InvokeCaller.call(InvokeCaller.java:69)
at com.sun.enterprise.admin.jmx.remote.server.MBeanServerRequestHandler.handle(MBeanServerRequestHandler.java:155)
at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.processRequest(RemoteJmxConnectorServlet.java:122)
at com.sun.enterprise.admin.jmx.remote.server.servlet.RemoteJmxConnectorServlet.doPost(RemoteJmxConnectorServlet.java:193)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:116)
|#]
----------------------------------------------------------------------------------

I can reproduce these exceptions with your sample applications like the auctionMonitor as well so this seems to be a more internal IceFaces issue (I did not yet search for a similar issue in your jira). There seems to happen some kind of unclean session disposal. As I'm not actively developing on IceFaces I don't feel responsible for issueing this to your bug tracker. Maybe you can do it on your own if it really turns out to be a bug.

So please, this is a small example with almost no usage. But I need to get the AHS usage as clean as possible as we (or my company) starts with a new application implementation right now which aims a huge amount of clients. Any help on the topics above is very appreciated!

Thank you in advance,
Oliver
 Filename HelloWorldBean.java [Disk] Download
 Description HelloWorldBean, the source code of the request scoped bean working in the background. Any other important files can be exctrated from the war-file.
 Filesize 3 Kbytes
 Downloaded:  351 time(s)

 Filename AHSTest.war [Disk] Download
 Description AHSTest.war, a sample web application demonstrating usage of AHS support on glassfish V2
 Filesize 5172 Kbytes
 Downloaded:  200 time(s)

jack.van.ooststroom


Joined: 26/Oct/2004 00:00:00
Messages: 223
Offline


Hello Oliver,

We are currently working on addressing a number of JMS-issues that we encountered with AHS and AHS-enabled ICEfaces applications deployed on the GlassFish V2 application server.

To answer your questions and concerns:

1) Lately we've been seeing some issues related to our supplied glassfish.properties file (included in our 1.7.0 release). A new version of this properties file is currently checked into the HEAD branch that we are testing with at the moment. Feel free to give that a try.

2) The first exception mentioned seems that it might be related to our "old" glassfish.properties file, though I haven't seen that exception before. Additionally, I haven't seen the second exception before either. I will give your attached example a try to see if I can reproduce it with that.

3) Both exceptions seem to happen on undeployment as well as application server shutdown. Currently it looks like GlassFish is invalidating the session before we can finish our application shutdown sequence. This is a known issue.

Regards,

Jack van Ooststroom
Senior Developer
ICEsoft Technologies, Inc.
[Email]
senortorpedo

Joined: 09/Feb/2008 00:00:00
Messages: 5
Offline


Dear Jack,
today I tested the AHS capabilities with your new IceFaces 1.7.1. This time no exceptions occurred and everything going on in the server.log was looking fine! The problem is that the application still does not work. For you to show that JMS and everything was set up right I post the part of the log with the application deployment outputs:


[#|2008-07-08T13:45:36.168+0200|INFO|sun-appserver9.1|javax.enterprise.system.tools.deployment|_ThreadID=17;_ThreadName=Thread-38;|deployed with moduleid = DefaultIceWeb|#]

[#|2008-07-08T13:45:37.125+0200|INFO|sun-appserver9.1|javax.enterprise.resource.webcontainer.jsf.config|_ThreadID=16;_ThreadName=httpWorkerThread-4848-1;/DefaultIceWeb;|Initializing Sun's JavaServer Faces implementation (1.2_04-b20-p03) for context '/DefaultIceWeb'|#]

[#|2008-07-08T13:45:37.548+0200|INFO|sun-appserver9.1|com.icesoft.faces.application.D2DViewHandler|_ThreadID=16;_ThreadName=httpWorkerThread-4848-1;|
ICEsoft Technologies, Inc.
ICEfaces 1.7.1
Build number: 6
Revision: 16923
|#]

[#|2008-07-08T13:45:38.458+0200|INFO|sun-appserver9.1|com.icesoft.faces.application.D2DViewHandler|_ThreadID=16;_ThreadName=httpWorkerThread-4848-1;|ICEfaces JSP parser disabled. This is a Facelets-only configuration.|#]

[#|2008-07-08T13:45:40.057+0200|INFO|sun-appserver9.1|com.icesoft.faces.util.event.servlet.ContextEventRepeater|_ThreadID=16;_ThreadName=httpWorkerThread-4848-1;|Asynchronous HTTP Service available: true|#]

[#|2008-07-08T13:45:40.167+0200|INFO|sun-appserver9.1|com.icesoft.net.messaging.jms.JMSAdapter|_ThreadID=16;_ThreadName=httpWorkerThread-4848-1;|Messaging Properties (web.xml): glassfish.properties|#]

[#|2008-07-08T13:45:40.324+0200|INFO|sun-appserver9.1|com.icesoft.net.messaging.jms.JMSAdapter|_ThreadID=16;_ThreadName=httpWorkerThread-4848-1;|Trying JMS Environment:
|#]

[#|2008-07-08T13:45:40.371+0200|INFO|sun-appserver9.1|javax.resourceadapter.mqjmsra.outbound.connection|_ThreadID=16;_ThreadName=httpWorkerThread-4848-1;|MQJMSRA_MF1101: setAddressList:NOT setting default value=localhost|#]

[#|2008-07-08T13:45:40.371+0200|INFO|sun-appserver9.1|javax.resourceadapter.mqjmsra.outbound.connection|_ThreadID=16;_ThreadName=httpWorkerThread-4848-1;|MQJMSRA_MF1101: setPassword:NOT setting default value|#]

[#|2008-07-08T13:45:40.371+0200|INFO|sun-appserver9.1|javax.resourceadapter.mqjmsra.outbound.connection|_ThreadID=16;_ThreadName=httpWorkerThread-4848-1;|MQJMSRA_MF1101: setUserName:NOT setting default value=guest|#]

[#|2008-07-08T13:45:40.481+0200|WARNING|sun-appserver9.1|javax.resourceadapter.mqjmsra.outbound.connection|_ThreadID=16;_ThreadName=httpWorkerThread-4848-1;_RequestID=82b47104-bfd4-4dc2-95fb-09bebfa3d05f;|MQJMSRA_MC2001: createConnection API used w/ username, password for Container Auth|#]

[#|2008-07-08T13:45:40.622+0200|WARNING|sun-appserver9.1|javax.resourceadapter.mqjmsra.outbound.connection|_ThreadID=16;_ThreadName=httpWorkerThread-4848-1;_RequestID=82b47104-bfd4-4dc2-95fb-09bebfa3d05f;|MQJMSRA_MC2001: createConnection API used w/ username, password for Container Auth|#]

[#|2008-07-08T13:45:40.638+0200|WARNING|sun-appserver9.1|javax.resourceadapter.mqjmsra.outbound.connection|_ThreadID=16;_ThreadName=httpWorkerThread-4848-1;_RequestID=82b47104-bfd4-4dc2-95fb-09bebfa3d05f;|MQJMSRA_MC2001: createConnection API used w/ username, password for Container Auth|#]

[#|2008-07-08T13:45:40.638+0200|WARNING|sun-appserver9.1|javax.resourceadapter.mqjmsra.outbound.connection|_ThreadID=16;_ThreadName=httpWorkerThread-4848-1;_RequestID=82b47104-bfd4-4dc2-95fb-09bebfa3d05f;|MQJMSRA_MC2001: createConnection API used w/ username, password for Container Auth|#]

[#|2008-07-08T13:45:40.638+0200|WARNING|sun-appserver9.1|javax.resourceadapter.mqjmsra.outbound.connection|_ThreadID=16;_ThreadName=httpWorkerThread-4848-1;_RequestID=82b47104-bfd4-4dc2-95fb-09bebfa3d05f;|MQJMSRA_MC2001: createConnection API used w/ username, password for Container Auth|#]

[#|2008-07-08T13:45:40.653+0200|WARNING|sun-appserver9.1|javax.resourceadapter.mqjmsra.outbound.connection|_ThreadID=16;_ThreadName=httpWorkerThread-4848-1;_RequestID=82b47104-bfd4-4dc2-95fb-09bebfa3d05f;|MQJMSRA_MC2001: createConnection API used w/ username, password for Container Auth|#]

[#|2008-07-08T13:45:40.653+0200|WARNING|sun-appserver9.1|javax.resourceadapter.mqjmsra.outbound.connection|_ThreadID=16;_ThreadName=httpWorkerThread-4848-1;_RequestID=82b47104-bfd4-4dc2-95fb-09bebfa3d05f;|MQJMSRA_MC2001: createConnection API used w/ username, password for Container Auth|#]

[#|2008-07-08T13:45:40.653+0200|WARNING|sun-appserver9.1|javax.resourceadapter.mqjmsra.outbound.connection|_ThreadID=16;_ThreadName=httpWorkerThread-4848-1;_RequestID=82b47104-bfd4-4dc2-95fb-09bebfa3d05f;|MQJMSRA_MC2001: createConnection API used w/ username, password for Container Auth|#]

[#|2008-07-08T13:45:40.779+0200|INFO|sun-appserver9.1|com.icesoft.util.ThreadFactory|_ThreadID=16;_ThreadName=httpWorkerThread-4848-1;|New thread: MessageReceiver Thread [1]|#]

[#|2008-07-08T13:45:40.779+0200|INFO|sun-appserver9.1|com.icesoft.net.messaging.jms.JMSSubscriberConnection$MessageReceiver|_ThreadID=18;_ThreadName=MessageReceiver Thread [1];|MessageReceiver [message_type = 'Announcement'] started.|#]

[#|2008-07-08T13:45:40.826+0200|INFO|sun-appserver9.1|com.icesoft.net.messaging.jms.JMSAdapter|_ThreadID=16;_ThreadName=httpWorkerThread-4848-1;|Messaging Properties (web.xml): glassfish.properties|#]

[#|2008-07-08T13:45:40.873+0200|INFO|sun-appserver9.1|com.icesoft.net.messaging.jms.JMSAdapter|_ThreadID=16;_ThreadName=httpWorkerThread-4848-1;|Trying JMS Environment:
|#]

[#|2008-07-08T13:45:40.889+0200|INFO|sun-appserver9.1|com.icesoft.util.ThreadFactory|_ThreadID=16;_ThreadName=httpWorkerThread-4848-1;|New thread: MessageReceiver Thread [1]|#]

[#|2008-07-08T13:45:40.904+0200|INFO|sun-appserver9.1|com.icesoft.net.messaging.jms.JMSSubscriberConnection$MessageReceiver|_ThreadID=19;_ThreadName=MessageReceiver Thread [1];|MessageReceiver [message_type = 'BufferedContextEvents' OR message_type = 'ContextEvent'] started.|#]

[#|2008-07-08T13:45:40.998+0200|INFO|sun-appserver9.1|com.icesoft.util.ThreadFactory|_ThreadID=16;_ThreadName=httpWorkerThread-4848-1;|New thread: MessageReceiver Thread [2]|#]

[#|2008-07-08T13:45:40.998+0200|INFO|sun-appserver9.1|com.icesoft.net.messaging.jms.JMSSubscriberConnection$MessageReceiver|_ThreadID=20;_ThreadName=MessageReceiver Thread [2];|MessageReceiver [message_type = 'Announcement' OR message_type = 'Purge' OR message_type = 'UpdatedViews' AND (destination_nodeAddress IS NULL OR destination_nodeAddress = '192.168.100.17')] started.|#]

[#|2008-07-08T13:45:41.046+0200|INFO|sun-appserver9.1|com.icesoft.faces.async.servlet.AsyncHttpServlet|_ThreadID=16;_ThreadName=httpWorkerThread-4848-1;|Starting the Asynchronous HTTP Server in servlet-mode...|#]

[#|2008-07-08T13:46:05.089+0200|INFO|sun-appserver9.1|com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet|_ThreadID=21;_ThreadName=httpSSLWorkerThread-8080-0;|GlassFish ARP available: true|#]

[#|2008-07-08T13:46:05.089+0200|INFO|sun-appserver9.1|com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet|_ThreadID=21;_ThreadName=httpSSLWorkerThread-8080-0;|Jetty ARP available: false|#]

[#|2008-07-08T13:46:05.089+0200|INFO|sun-appserver9.1|com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet|_ThreadID=21;_ThreadName=httpSSLWorkerThread-8080-0;|Adapting to GlassFish ARP environment|#]

[#|2008-07-08T13:46:05.215+0200|INFO|sun-appserver9.1|com.icesoft.faces.webapp.http.core.AsyncServerDetector|_ThreadID=21;_ThreadName=httpSSLWorkerThread-8080-0;|Asynchronous HTTP Service available: true|#]

[#|2008-07-08T13:46:05.215+0200|INFO|sun-appserver9.1|com.icesoft.faces.webapp.http.core.AsyncServerDetector|_ThreadID=21;_ThreadName=httpSSLWorkerThread-8080-0;|Adapting to Asynchronous HTTP Service environment.|#]

[#|2008-07-08T13:46:05.230+0200|INFO|sun-appserver9.1|com.icesoft.net.messaging.jms.JMSAdapter|_ThreadID=21;_ThreadName=httpSSLWorkerThread-8080-0;|Messaging Properties (web.xml): glassfish.properties|#]

[#|2008-07-08T13:46:10.328+0200|INFO|sun-appserver9.1|de.kiwiconsult.HelloWorldBean|_ThreadID=21;_ThreadName=httpSSLWorkerThread-8080-0;|HelloWorldBean de.kiwiconsult.HelloWorldBean@51c5bd inited!|#]

[#|2008-07-08T13:48:42.630+0200|INFO|sun-appserver9.1|de.kiwiconsult.HelloWorldBean|_ThreadID=21;_ThreadName=httpSSLWorkerThread-8080-0;|HelloWorldBean de.kiwiconsult.HelloWorldBean@294c71 inited!|#]

Both the last lines show the application instanciation from two different browsers. But hitting the "Hit Me!" link (start application for this) does not seem to call anything on the bean. Further the application session is expiring prematurely after about 2 minutes (something similar was already posted in another thread in this forum). Can you please have a look on this again? Maybe something is wrong with the web.xml. Please find the current demo sources attached.

By the way, there was a little problem configuring the JMS system which was easy to resolve but should be remarked in the ICEFacesDevelopersGuide. On page 84, at step 7, it is said that a new topic with the name icefacesContentEventTopic should be created. icefaces-ahs, instead, is looking for a topic called icefacesContextEventTopic. See the difference?

Thank you in advance,
Oliver
 Filename DefaultIceWeb.war [Disk] Download
 Description The demo application
 Filesize 5223 Kbytes
 Downloaded:  206 time(s)

 Filename HelloWorldBean.java [Disk] Download
 Description The bean's source
 Filesize 3 Kbytes
 Downloaded:  380 time(s)

jack.van.ooststroom


Joined: 26/Oct/2004 00:00:00
Messages: 223
Offline


Hello Oliver,

Thanks for you follow-up using ICEfaces 1.7.1.

Looking at your ICEfaces application's web.xml I have a couple of questions and suggestions:

  • Are you deploying the Asynchronous HTTP Server separately as well? (async-http-server.war)
  • Your ICEfaces application's web.xml seems to contain the configuration for the AHS as well. These should be removed.
  • Additionally, the ContextEventRepeater seems to be commented out. The ContextEventRepeater is necessary to communicate the ICEfaces IDs, View Numbers and Updated Views to the AHS. Please un-comment this.
  • Finally, the BlockingServlet has been commented out as well. Even though your using the AHS, the BlockingServlet is still required to handle UI requests and such. The AHS only handles the /block/receive-updated-views requests. Please un-comment this as well.

    For you convenience I attached an updated web.xml that you can use for your ICEfaces application. You can compare the differences to see what I've changed.

    If you have any additional questions related to the changes, feel free to post them. I hope this helps.

    Regards,


     Filename web.xml [Disk] Download
     Description Updated web.xml for the DefaultIceWeb application.
     Filesize 7 Kbytes
     Downloaded:  404 time(s)


  • Jack van Ooststroom
    Senior Developer
    ICEsoft Technologies, Inc.
    [Email]
    senortorpedo

    Joined: 09/Feb/2008 00:00:00
    Messages: 5
    Offline


    Dear Jack,
    Yes, I do have some questions on this. I was wondering why your modified web.xml now does not contain ANY configuration for the AHS (except the com.icesoft.net.messaging.properties property) anymore. As I was following your guidelines to setup the AHS in the developer guide it was not easy for me to find out the steps needed for the AHS as servlet usage (what I am still aiming for!). It was not clear to me that I have to deploy the async-http-server.war as well. Isn't there any other way to get the AHS servlet mode baked into my application's ear-file for having things alltogether? I was missing the com.icesoft.faces.async.service property in your web.xml as well, as the devolper guide says:

    To configure it as a server, set the com.icesoft.faces.async.service context parameter to “server” instead of “servlet” in the web.xml as follows...

    and as I wanted to have the servlet mode I wrote this property with "servlet" as the value into my web.xml and I thought that now the servlet mode is "switched on" or something like that. It would be a great help for me if you could explain the steps needed to get the AHS running as servlet in more detail. But you can leave out the server-side configuration if you want as the comet support on the http-listener and the jms framework seem to run fine already.

    I tried out your modified web.xml and now the application is running for one client. But there is no async rendering to secondary clients happening. What might be wrong here?

    Thank you in advance,
    Oliver
     
    Forum Index -> Async HTTP Server
    Go to:   
    Powered by JForum 2.1.7ice © JForum Team