just changed the interface for ServiceMBean - still having the same problem.
do i need to implement preRegister?
I found out that this is caused by the start() method having a ServerSocket.accept() in it. I gather that this will block.
There have been some posts about how to properly thread the ServerSocket, but I am trying and a little perplexed - I can create the socket, but can't seem to register it with JNDI (it gives me a serialization error)
I think a bunch of people have done this kind of thing - can any one of them point me in the right direction? I don't want to use a servlet if I don't have to.
You need to create your own thread which handles the accept calls.
If any of the start/stop methods block, then JBoss can't start/stop correctly.