Primefaces推动glassfish 3.1.2例外

时间:2013-06-29 17:47:58

标签: jsf-2 primefaces glassfish atmosphere grizzly

这是我的config.xml

<dependency>
    <groupId>org.atmosphere</groupId>
    <artifactId>atmosphere-runtime</artifactId>
    <version>1.0.0.RC1</version>
</dependency>

<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-api</artifactId>
    <version>1.7.5</version>
</dependency>
<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-jdk14</artifactId>
    <version>1.7.5</version>
</dependency>

的web.xml

    <servlet>
    <servlet-name>Push Servlet</servlet-name>
    <servlet-class>org.primefaces.push.PushServlet</servlet-class>
</servlet>
<servlet-mapping>
    <servlet-name>Push Servlet</servlet-name>
    <url-pattern>/primepush/*</url-pattern>
</servlet-mapping>

是反例,当3或7之后的clic然后:

  

警告:GRIZZLY0024:终止进程中断。   java.lang.InterruptedException at   java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1325)     在java.util.concurrent.Semaphore.tryAcquire(Semaphore.java:414)at   com.sun.grizzly.http.ProcessorTask.terminateProcess(ProcessorTask.java:1021)     在   com.sun.grizzly.arp.DefaultAsyncExecutor.finishResponse(DefaultAsyncExecutor.java:186)     在   com.sun.grizzly.arp.DefaultAsyncExecutor.finishExecute(DefaultAsyncExecutor.java:210)     在   com.sun.grizzly.arp.AsyncProcessorTask.doTask(AsyncProcessorTask.java:133)     在   com.sun.grizzly.comet.CometEngine.flushPostExecute(CometEngine.java:426)     在com.sun.grizzly.comet.CometEngine.interrupt0(CometEngine.java:405)     在com.sun.grizzly.comet.CometEngine.interrupt(CometEngine.java:383)     在   com.sun.grizzly.comet.CometContext.resumeCometHandler(CometContext.java:442)     在   org.atmosphere.container.GrizzlyCometSupport.resume(GrizzlyCometSupport.java:172)     在   org.atmosphere.container.GrizzlyCometSupport.action(GrizzlyCometSupport.java:184)     在   org.atmosphere.container.GrizzlyCometSupport.action(GrizzlyCometSupport.java:81)     在   org.atmosphere.cpr.AtmosphereResourceImpl.resume(AtmosphereResourceImpl.java:317)     在   org.atmosphere.handler.AbstractReflectorAtmosphereHandler.onStateChange(AbstractReflectorAtmosphereHandler.java:146)     在   org.atmosphere.cpr.DefaultBroadcaster.broadcast(DefaultBroadcaster.java:853)     在   org.atmosphere.cpr.DefaultBroadcaster.executeAsyncWrite(DefaultBroadcaster.java:768)     在   org.atmosphere.cpr.DefaultBroadcaster $ 3.run(DefaultBroadcaster.java:801)     在   java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:471)     at java.util.concurrent.FutureTask $ Sync.innerRun(FutureTask.java:334)     在java.util.concurrent.FutureTask.run(FutureTask.java:166)at   java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)     在   java.util.concurrent.ThreadPoolExecutor中的$ Worker.run(ThreadPoolExecutor.java:615)     在java.lang.Thread.run(Thread.java:722)

1 个答案:

答案 0 :(得分:3)

我还没有尝试过primefaces-push,但我只是使用Atmosphere(primefaces-push也使用了Atmosphere)。为了使它工作,我必须添加这些JVM选项:

  • -Dv3.grizzly.cometSupport=true
  • -Djava.net.preferIPv4Stack=true(我不确定大气的最新版本是否仍然需要此选项)

也许它可以帮到你。