Thanks Mete,

I really appreciate your help.  I've changed up my java message producer a
bit to see if that helps as well.   I guess I'll let you know how it works
out in about 5-6 days


Thanks again,
-Justin

On Tue, Apr 22, 2008 at 11:15 AM, meteatamel <[EMAIL PROTECTED]> wrote:

>   I've added some info to the bug report. Please take a look.
>
> -Mete
>
>
> --- In flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>,
> "jfujita1" <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > I've built a GIS FLEX application that uses blazeDS' messaging
> > capability to push location (latitude/longitude/geocode) info to flex
> > clients.
> >
> > The message producer is a custom Java bootstrapper and adapter that
> > configures the messaging destination endpoints upon server startup.
> >
> > The destination runtime config java bootstrap method for our
> > "fleet_demo" destination looks like this:
> >
> > public void initializeDestinations()
> > {
> > String destinationId = "fleet_demo";
> > String serviceId = "message-service";
> > MessageBroker broker = MessageBroker.getMessageBroker(null);
> > MessageService service = (MessageService)
> > broker.getService(serviceId);
> > MessageDestination destination = (MessageDestination)
> > service.createDestination(destinationId);
> >
> > destination.addChannel("my-streaming-amf");
> > destination.addChannel("my-polling-amf");
> >
> > ServerSettings serverSettings = new ServerSettings();
> > serverSettings.setMaxCacheSize(1000);
> > serverSettings.setMessageTTL(0);
> > serverSettings.setDurable(false);
> >
> > destination.setServerSettings(serverSettings);
> >
> > if (service.isStarted())
> > {
> > //initialize and run the destination
> > destination.start();
> > }
> > }
> >
> >
> > The bootstrapper also spawns a separate thread that continuously
> > receives location data from our server and packages it into an
> > AsyncMessage and routes it to the appropriate destination using a
> > method similar to this:
> >
> > private void sendMessage(latitudeFromServer:double,
> > longitudeFromServer:double)
> > {
> > MessageBroker msgBroker = MessageBroker.getMessageBroker(null);
> > String clientID = UUIDUtils.createUUID(false);
> > AsyncMessage msg = new AsyncMessage();
> >
> > msg.setDestination("fleet_demo");
> > msg.setHeader("latitude", latitudeFromServer);
> > msg.setHeader("longitude", longitudeFromServer);
> >
> > msg.setClientId(clientID);
> > msg.setMessageId(UUIDUtils.createUUID(false));
> > msg.setTimestamp(System.currentTimeMillis());
> > msgBroker.routeMessageToService(msg, null);
> > }
> >
> >
> > Now I start up the server and the bootstrapper initializes the
> > "fleet_demo" endpoint and the sendMessage thread routes location data
> > perfectly to my flex client(averaging about 500-1600 messages per
> > hour) It works! This keeps up for about 5-6 days. After that I stop
> > receiving any messages when I should be. Its as though the
> > MessageBrokerServlet just goes silent. The only way to fix this is to
> > restart jboss and when I try to shutdown the server I get this NPE
> > message from the MessageBrokerServlet:
> >
> > 11:22:36,295 INFO [Server] Runtime shutdown hook called, forceHalt: true
> > 11:22:36,295 INFO [Server] JBoss SHUTDOWN: Undeploying all packages
> > 11:22:36,296 INFO [TomcatDeployer] undeploy, ctxPath=/jmx-console,
> > warUrl=.../deploy/jmx-console.war/
> > 11:22:36,330 INFO [TomcatDeployer] undeploy, ctxPath=/enterprise,
> > warUrl=.../deploy/enterprise.war/
> > 11:22:36,331 INFO [StandardWrapper] Waiting for 5 instance(s) to be
> > deallocated
> > 11:22:37,350 INFO [StandardWrapper] Waiting for 5 instance(s) to be
> > deallocated
> > 11:22:38,373 INFO [StandardWrapper] Waiting for 3 instance(s) to be
> > deallocated
> > 11:22:38,512 ERROR [[MessageBrokerServlet]] Servlet.service() for
> > servlet MessageBrokerServlet threw exception
> > java.lang.NullPointerException
> > at
> >
>
> flex.messaging.endpoints.BaseStreamingHTTPEndpoint.handleFlexClientStreamingOpenRequest(BaseStreamingHTTPEndpoint.java:959)
> > at
> >
>
> flex.messaging.endpoints.BaseStreamingHTTPEndpoint.serviceStreamingRequest(BaseStreamingHTTPEndpoint.java:1131)
> > at
> >
>
> flex.messaging.endpoints.BaseStreamingHTTPEndpoint.service(BaseStreamingHTTPEndpoint.java:468)
> > at
> >
> flex.messaging.MessageBrokerServlet.service(MessageBrokerServlet.java:377)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> > at
> >
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> > at
> >
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> > at
> >
>
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
> > at
> >
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> > at
> >
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> > at
> >
>
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
> > at
> >
>
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
> > at
> >
>
> org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
> > at
> >
>
> org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
> > at
> >
>
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
> > at
> >
>
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> > at
> >
>
> org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
> > at
> >
>
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> > at
> >
>
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
> > at
> >
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
> > at
> >
>
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
> > at
> > org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
> > at java.lang.Thread.run(Thread.java:595)
> > 11:22:38,514 ERROR [[MessageBrokerServlet]] Servlet.service() for
> > servlet MessageBrokerServlet threw exception
> > java.lang.NullPointerException
> > at
> >
>
> flex.messaging.endpoints.BaseStreamingHTTPEndpoint.handleFlexClientStreamingOpenRequest(BaseStreamingHTTPEndpoint.java:959)
> > at
> >
>
> flex.messaging.endpoints.BaseStreamingHTTPEndpoint.serviceStreamingRequest(BaseStreamingHTTPEndpoint.java:1131)
> > at
> >
>
> flex.messaging.endpoints.BaseStreamingHTTPEndpoint.service(BaseStreamingHTTPEndpoint.java:468)
> > at
> >
> flex.messaging.MessageBrokerServlet.service(MessageBrokerServlet.java:377)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> > at
> >
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> > at
> >
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> > at
> >
>
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
> > at
> >
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> > at
> >
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> > at
> >
>
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
> > at
> >
>
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
> > at
> >
>
> org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
> > at
> >
>
> org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
> > at
> >
>
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
> > at
> >
>
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> > at
> >
>
> org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
> > at
> >
>
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> > at
> >
>
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
> > at
> >
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
> > at
> >
>
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
> > at
> > org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
> > at java.lang.Thread.run(Thread.java:595)
> >
> >
> >
> > I've created a bug report at the Adobe BlazeDS bug and issue
> > management page but I need a robust messaging solution for this
> > project and I was wondering if anybody here had any experience
> > regarding this problem.
> >
> >
> > Thanks for reading,
> >
> > -Justin
> >
>
>  
>



-- 
Thanks for reading. -Justin
Flickr: http://www.flickr.com/photos/neopan/

Reply via email to