I instantiate it from a servlet that I've configured to load on startup via the following tags in C:\JRun4\servers\default\flex\WEB-INF\web.xml:
<servlet>
<servlet-name>AppStartServlet</servlet-name>
<servlet-class>test.AppStartServlet</servlet-class>
<load-on-startup>11</load-on-startup>
</servlet>
which I placed at the end of the list of servlets just before the <servlet-mapping> section. I chose 11 so that it would be loaded after the last Flex servlet.
My AppStartServlet looks like this:
package test;
import javax.servlet.http.HttpServlet;
public class AppStartServlet extends HttpServlet
{
private FlexSessionTest test;
public void init()
{
test = new FlexSessionTest();
System.out.println( "******************************* AppStartServlet loaded *******************");
}
}
Then you should be good to go.
-Tom
On 9/12/06, Aldo Bucchi <[EMAIL PROTECTED]> wrote:
Hi tom,
looks like this might do it...
now, where/when exactly are you instantiating this FlexSessionTest object??
thanks,
Aldo
On 9/11/06, Tom Bray <[EMAIL PROTECTED]> wrote:Aldo,
Here's some sample code that I used to know when a client disconnected. The FlexSession.sessionDestroyed event corresponds to a disconnection.
...
public FlexSessionTest()
{
FlexSession.addSessionCreatedListener(this);
}
public void sessionCreated( FlexSession session )
{
session.addSessionDestroyedListener(this);
System.out.println( "sessionCreated!" );
}
public void sessionDestroyed( FlexSession session )
{
System.out.println( "sessionDestroyed!" );
}
HTH,
TomOn 9/11/06, Aldo Bucchi <[EMAIL PROTECTED]> wrote:hi all,
I am building a java app that uses fds to pub/subs flex clients to a
set of jms topics and queues and I need a way to obtain a "connected
client list" on the java side... the traditional way would be to
create a topic to ping clients on a given interval.
alternatively, is there any fds low level message that indicates a
client disconnection??
Thanks,
Aldo
--
::::: Aldo Bucchi :::::
mobile (56) 8 429 8300
--
::::: Aldo Bucchi :::::
mobile (56) 8 429 8300
__._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
![]()
SPONSORED LINKS
Software development tool Software development Software development services Home design software Software development company
Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
__,_._,___
Reply via email to

