Thanks,
Tom
On 7/11/06, Tom Bray <[EMAIL PROTECTED]> wrote:
I'm new to J2EE webapps, so please pardon my ignorance. When does the Feed class get loaded/instantiated? Does this happen automatically when the samples server is started? I'm trying to do something similar in another app but my class doesn't seem to be loading. I dropped my class in { server.root}/default/flex/WEB-INF/classes/test and was hoping it would magically start running when I restarted the server. My goal is to figure out how to work with FlexSession and DataServiceTransaction and I figured I'd be able to do that from the class below. Any help getting it up and running would be greatly appreciated.
//in C:\JRun4\servers\default\flex\WEB-INF\classes\test
package test;
import flex.messaging.FlexSession;
import flex.messaging.FlexSessionListener;
import flex.data.DataServiceTransaction;
public class MyTest implements FlexSessionListener
{
private static FeedThread thread;
public MyTest()
{
thread = new FeedThread();
thread.start();
FlexSession.addSessionCreatedListener(this);
}
public void sessionCreated( FlexSession session )
{
System.out.println( "sessionDestroyed!" );
}
public void sessionDestroyed( FlexSession session )
{
System.out.println( "sessionDestroyed!" );
}
public static class FeedThread extends Thread
{
public boolean running = true;
public void run()
{
while (running)
{
/*
DataServiceTransaction dtx = DataServiceTransaction.begin( false );
dtx.refreshFill( "myDest", new ArrayList() );
*/
System.out.println( "running!" );
try
{
Thread.sleep(1000);
}
catch (InterruptedException e)
{
}
}
}
}
}
__._,_.___
--
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
| Web site design development | Computer software development | Software design and development |
| Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

