• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Writing a startup class in JBoss

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have a webservice deployed in JBoss that sends messages to a Server socket based on an invocation from a remote client.
I also need to have an echo client to be installed in the application server, that sends periodical messages to the remote Server to keep the connection open.
This echo client should start up with my webservice. How can this be implemented?
Thanks in advance.. :-)
 
Janis Lee
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I created a class that implements org.jboss.varia.scheduler.Schedulable. This is scheduled to send echo messages to a Server Socket. The same client socket needs to be reused by the Webservice that sends data messages (not echo messages) to the same server socket.

I made my client socket a static variable of the Schedulable class and made the Webservice invoke a non scheduled method in the same class so that the same socket is reused. Is this an OK thing to do? What alternative do I have?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic