I suppose 'DataPersistenceService' is a reference/proxy for a SLSB inside the server.
But you have to provide more details that we are able to understand what you want to achieve and what is wrong.
yes, what you guess is right. the service is a slsb in jboss server. by the way, i found a workaround, inside the run method, i create a new context and lookup the remote service, it works. why?
i create a new context and lookup the remote service, it works. why?
That depends on the aproach you are using for lookup, it might be that, if you close teh context or it is desroyed by GC, the connetion to the server is closed.
To get the exact answer you need to share more code.