Re: WebSocket connection silently drops

2020-09-13 Thread Christopher Dodunski (Apache Tomcat)
It turns out that I was premature in concluding connections were silently getting dropped. I left the client application running for another quarter hour after it stopped displaying message updates from the server. On shutting it down, the server immediately recorded that the client had just

WebSocket connection silently drops

2020-09-13 Thread Christopher Dodunski (Apache Tomcat)
Hi, I have a desktop application that, using the org.glassfish.tyrus WebSocket implementation, connects and talks with a parent web application running on Tomcat. All runs well for a while but, after data transfer falls quiet for a few minutes, the connection gets silently dropped (nothing

Re: Using custom Configurator with WebSockets

2019-04-28 Thread Christopher Dodunski
Your idea of wrapping the interface returned by the registry was a stroke of brilliance! And I'm pleased to say it was successful. I'm now working to resolve another small hiccup. The IoC registry can be configured to provide the service as either a singleton or a new instance for each new

Re: Using custom Configurator with WebSockets

2019-04-26 Thread Christopher Dodunski
So I've converted the server endpoint from annotation-based to programmatic, to get around the constraint of the @ServerEndpoint annotation having to decorate a concrete class. The elements of this annotation now occupy an implementation of ServerApplicationConfig: public class

Re: Using custom Configurator with WebSockets

2019-04-24 Thread Christopher Dodunski
Thanks Mark, you've made it clear that annotating the interface is not an option. Converting my server endpoint from annotation based to programmatic is not a problem, nor is implementing ServerApplicationConfig to configure what were previously @ServerEndpoint elements: value, encoders,

Re: Using custom Configurator with WebSockets

2019-04-24 Thread Christopher Dodunski
Hi Mark, Looking at the Tapestry-IoC Registry code I notice that although it constructs a (plastic) service proxy object, it does cast it to its associated interface before making it available from the registry's getService() method. So if I move the WebSocket annotations to my interface as

Re: Using custom Configurator with WebSockets

2019-04-23 Thread Christopher Dodunski
Based on what you wrote regarding WebSocket annotations not following Java inheritance, I imagine the below wouldn't work either. public class MyServerEndpointConfig extends ServerEndpointConfig { @Override public Class getEndpointClass() { return MyServiceInterface.class; }

Re: Using custom Configurator with WebSockets

2019-04-23 Thread Christopher Dodunski
> The custom Configurator looks fine. The problem is with trying to do > this with a POJO endpoint. There is an underlying assumption that - for > a POJO endpoint - the endpoints will will instances of the POJO class. > This doesn't seem to hold in your case so hence it breaks. > > The WebSocket

Using custom Configurator with WebSockets

2019-04-17 Thread Christopher Dodunski
Hello, Just a quick question with regard to extending ServerEndpointConfig.Configurator to override Tomcat's default action of instantiating the POJO class annotated with @ServerEndpoint on receiving a WebSocket request. My reason for doing this is that my endpoint class depends on IoC

Re: Using WebSockets with a Tapestry WebApp running on Tomcat

2019-04-08 Thread Christopher Dodunski
Just to clarify, both services being injected the IoC way are developed by me as part of the core program, so nothing sinister to be concerned about. What would be useful to know is whether Tomcat instantiates classes annotated with @ServerEndpoint inside or outside of the context of the WAR app

Re: Using WebSockets with a Tapestry WebApp running on Tomcat

2019-04-08 Thread Christopher Dodunski
Hi John, The server-side endpoint is itself implemented as a Tapestry 'service', allowing it to be injected into other application classes for pushing messages out to connected clients. Whereas the service injected into the endpoint class itself allows the endpoint to query this service when a

Using WebSockets with a Tapestry WebApp running on Tomcat

2019-04-08 Thread Christopher Dodunski
Hi team, I have developed a web application using the Apache Tapestry framework and deployed on Apache Tomcat. The application also supports WebSocket connections with desktop clent applications. Following the advice of the Tapestry community, I included the server-side endpoint within the

Re: Configuring which Servlet is invoked

2010-10-12 Thread Christopher Dodunski
Hi, you're looking at an old version of Host. The latest (just above) contains blog.optomus.com and contains several Alias elements. Chris. On 12/10/2010 02:54, Christopher Dodunski wrote: Host name=http://blog.christopher.net.nz; appBase=/home/roller/application unpackWARs

Tomcat looking for document bases that don't exist

2010-10-12 Thread Christopher Dodunski
Hi, I have added an additional Host to server.xml, with its own appBase, and servicing several domains by way of Alias elements. When Tomcat is restarted, Catalina logs errors relating to not finding document bases. These match applications running on my default localhost Host. Why is Tomcat

Re: Tomcat looking for document bases that don't exist

2010-10-12 Thread Christopher Dodunski
even exist in tomcat/webapps anymore. Chris. On 12/10/2010 10:22, Christopher Dodunski wrote: Hi, I have added an additional Host to server.xml, with its own appBase, and servicing several domains by way of Alias elements. When Tomcat is restarted, Catalina logs errors relating

Re: Tomcat looking for document bases that don't exist

2010-10-12 Thread Christopher Dodunski
Sorry, try this instead... optomus:/usr/local/tomcat/conf/Catalina# ls blog.christopher.net.nz blog.optomus.com localhost [I have no Host defined for this next one, so I guess it's safe to delete] optomus:/usr/local/tomcat/conf/Catalina# ls blog.christopher.net.nz/ christopher.xml

Re: Tomcat looking for document bases that don't exist

2010-10-12 Thread Christopher Dodunski
. On 12/10/2010 11:21, Christopher Dodunski wrote: Sorry, try this instead... optomus:/usr/local/tomcat/conf/Catalina# ls blog.christopher.net.nz blog.optomus.com localhost [I have no Host defined for this next one, so I guess it's safe to delete] optomus:/usr/local/tomcat/conf/Catalina

Configuring which Servlet is invoked

2010-10-11 Thread Christopher Dodunski
Hello, I have a slight problem, and am having difficulty determining which part of the Tomcat documentation applies in my case. Apache HTTP Server version (as proxy): 2.2.9 (Debian) Tomcat version: 6.0.29 **My Problem** Apache Roller weblogger is running on Tomcat with ROOT context, and is

Re: Configuring which Servlet is invoked

2010-10-11 Thread Christopher Dodunski
, Christopher Dodunski wrote: Hello, I have a slight problem, and am having difficulty determining which part of the Tomcat documentation applies in my case. Apache HTTP Server version (as proxy): 2.2.9 (Debian) Tomcat version: 6.0.29 **My Problem** Apache Roller weblogger is running on Tomcat

Re: Configuring which Servlet is invoked

2010-10-11 Thread Christopher Dodunski
. Christopher Dodunski wrote: Hi, Thanks, but I'm not quite clear on how to direct Tomcat to call the ROOT application for a given domain. I added the bottom Host element to server.xml, but it doesn't appear to work correctly. Engine name=Catalina defaultHost=localhost Host name=localhost appBase

Re: Configuring which Servlet is invoked

2010-10-11 Thread Christopher Dodunski
appBase happened to be). Chris. Christopher Dodunski wrote: Hi, Thanks, but I'm not quite clear on how to direct Tomcat to call the ROOT application for a given domain. I added the bottom Host element to server.xml, but it doesn't appear to work correctly. Engine name=Catalina defaultHost

RE: Configuring which Servlet is invoked

2010-10-11 Thread Christopher Dodunski
. The catalina.out log doesn't seem to give a reason. Have I missed an important step? Thanks, Chris. From: Christopher Dodunski [mailto:chrisfromsquir...@christopher.net.nz] Subject: Re: Configuring which Servlet is invoked So, based on your explanation below, Tomcat can actually have more

RE: Configuring which Servlet is invoked

2010-10-11 Thread Christopher Dodunski
option might be to set up a Host for each domain Roller serves, all with appBase=/home/roller/application. Is this the best solution in your opinion? Thanks, Chris. From: Christopher Dodunski [mailto:chrisfromsquir...@...] Subject: RE: Configuring which Servlet is invoked I have now set up

RE: Configuring which Servlet is invoked

2010-10-11 Thread Christopher Dodunski
What I probably omitted to say is that localhost is likely to be associated with many more domains than the Roller application alone. So marrying the default host to Roller isn't likely to save me work. Instead, I have added Alias elements to the Roller host for each blog domain. And so far so

Re: Configuring which Servlet is invoked

2010-10-11 Thread Christopher Dodunski
Catalina logs contain some entries that may shine some light on the matter... SEVERE: Error starting static Resources java.lang.IllegalArgumentException: Document base /home/roller/application/optomus does not exist or is not a readable directory INFO: Container