I am going to use this as a front end for a realtime box. There is no database. I need security, naming. I will probably be controlling a C program if I can. I need a long lived connection on TCP. I will be doing streaming out of a UDP. I know this is outside of the normal for JBoss but I know it will work. Just need a jump start on some things.
Trail: Custom Networking
Thanks Juha. I will look at that. I need to review my networking.
What I don't understand is what type of object (bean I guess) I need to create for such a service. All of the examples show how to build J2EE Session and Entity Beans. Would I wrap the TCP connection into a J2EE session bean? J2EE seems to be a bit of overkill without a database. Does JBoss manage the socket connections to such primative services? Any suggestions would be appreciated.
You should wrap it as an MBean, as it is an extension to the server itself.
There's examples on how to write MBeans and deploy them on JBoss at docs.jboss.org.
I am all over it like spilt coffee!
Are there any good examples of this type of server available? I created an MBean already but am not sure where to put the ServerSocket piece.
Does it go right in the MBean? I guess I am a little confused about how JBoss deals with ports and such.
I was looking at the naming server source and it appears to be a stand alone server with a Main. Is this the way it runs within JBoss? As a standalone? Should I do the same?
This is a bit frustrating as I can't imagine it is that hard but I can't seem to see the light on how to construct this one.
Any help is appreciated.
i also have similar interest in this....
i have legacy clients writing payload on long lived tcp connections....
the old server sits on a port and forks threads for each connection to that port.......
i would like to use jboss to replace this, but i dont know where to start looking....
if serviceMBean is the solution, would the MBean be forking threads for handling all connections as well?
can i hook invokers to this?
some direction would be appreciated!
I got mine working somewhat. Still lots of work to do.
First create an empty MBean and get that installed and working in JBoss.
Then inside the start method of the MBean create a Thread that creates a ServerSocket or ServerSocketChannel. Then inside the MBean.start method use the Thread.start method to kick off the newly created Thread.
You should then have a working MBean that is a server.
Let me know if you need some help. I can shot you am email.
yes, if you can, please shoot me an email, email@example.com.
i would be interested in seeing what you have... after reading through many threads, i figured serverMBean would be the best, but i still have a few questions if you dont mind... =)
I recommend JBoss for Advanced J2EE Developers for this. Answers all your questions on how to do this, with hands-on exercise.