users@glassfish.java.net

Re: Telnet client inside EJB

From: <glassfish_at_javadesktop.org>
Date: Mon, 31 Aug 2009 01:48:28 PDT

Inbound/outbound communications from the EJB world to the the "outside" world should theoretically be done through JCA connector. You can google "jca telnet connector", there seem to be a few people who developped such connector.
Using JCA is only a recommendation, and you can maybe use the telnet package right from you session bean.
Note also that if what you want is to have one connection that is initialized at startup, another way would be to use a ServletContextListener to open the connection and store it in a static field. It's not really great, because static field are also theoretically prohibited in the EJB spec, but it should work nevertheless.
Beware also to check if the telnet connection is thread-safe or not.
[Message sent by forum member '{messageUsername}' ({messageName})]

http://forums.java.net/jive/thread.jspa?messageID=362398