users@glassfish.java.net

Re: Java EE, Glassfish: simple server application design guidelines

From: Chris Hurst <chris_at_hurstonline.co.uk>
Date: Thu, 1 Jul 2010 03:11:54 -0700 (PDT)

Hi,

  The documentation isn't friendly but I have done it, I wrapped Apache Mina
(http://mina.apache.org/) as the interface seemed friendly though I'm sure
all other good comms library's will work as well or better (and I have been
intending for way to long at porting it to one of the other big comms libs
for comaprison) . Mine does a bit more that wrap the comms as it then
implements some protocols on top for our bespoke servers I'm connecting to
and / or mimic - ing with a J2EE server.

  I did a quick google and there are some sample socket connectors out there
I didn't look at the source, so can't comment if theer on the lines of what
you want.

http://code.google.com/p/jca-sockets/downloads/detail?name=jcasockets-1.2.1.zip
http://dlc.sun.com/pdf/820-6594/820-6594.pdf

Interested to hear how you get on .


Chris


agatone wrote:
>
> Hi,
>
> I'm trying to write simple server application - EchoServerApp - with the
> only functionality of just replying back to client with whatever the
> client wrote.
>
> It's simple to have that kind of application written and run in CLI, but
> developing a enterprise application is a bit confusing to me and all
> around the internet people are just talking about web applications (http
> initiated).
>
> My goal is to have an application that creates listening socket and so
> that I can run that application inside glassfish.
>
> Can somebody please write a short explanation how to design my
> EchoServerApp and how to run it on/inside glassfish (not on client side).
> The most confusing part for me is where to put socket listening code -
> since it's not allowed to have it inside EJBs (by specs). I understand
> that the request to my EchoServerApp is then processed by EJB - no doubt
> in that.
>
> I've also read something about creating a Java Resource Adapter using the
> Java Connector Architecture where you can have listening socket/s, but
> information/examples of that I cannot find.
>
> Also somebody mentioned "possibility to write a custom protocol in GF
> using
> port unification" - samples anyone?
>
> I'd be very thankful if somebody could point me in the right direction
> (some stuff to read) or write few short sentences - just to know where to
> look and get this confusion cleared.
>
> Thank you
>

-- 
View this message in context: http://old.nabble.com/Java-EE%2C-Glassfish%3A-simple-server-application-design-guidelines-tp29034293p29044038.html
Sent from the java.net - glassfish users mailing list archive at Nabble.com.