users@glassfish.java.net

Re: does Glassfish can connect to java.net.Socket for binary messages?

From: Saloustros Georgios <gesalous_at_gmail.com>
Date: Thu, 20 Dec 2007 21:11:48 +0200

I haven't done it but I would test this:
Make a lifecycle module ,by doing this
class myclass implements com.sun.appserv.server.LifecycleListener
{
public void handleEvent(){ /*make your code here*/}



}

When you get an INIT_EVENT you can then call your code that makes a socket
bind to a port that listens for incoming connections(binary messages
etc).You can put your code in a .jar and place it somewhere like
<glassfish_root_directory/lib> where glassfish classloaders can find it.
When you get an SHUTDOWN_EVENT you can then close the socket and release the
resources of your program.

2007/12/20, glassfish_at_javadesktop.org <glassfish_at_javadesktop.org>:
>
> is it possible to open a port in Glassfish that can listen to binary
> messages received from a java.net.Socket?
> [Message sent by forum member 'meirwinston' (meirwinston)]
>
> http://forums.java.net/jive/thread.jspa?messageID=251025
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>