Announcement Announcement Module
Collapse
No announcement yet.
RmiServiceExporter Issue Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • RmiServiceExporter Issue

    Hi All,

    We have a "stateful" service that we have exposed to the outside world using RmiServiceExporter. We have made the service stateful by making all "session" related attributes as InheritableThreadLocal. We have observed a very strange behavior and want some help.

    When an external client connects to this service, it gets a stub object using which all subsequent calls to this service are invoked. If we invoke the service method in a very rapid manner i.e. either using multiple clients or running the client code in a loop, eventhough we are not invoking any reconnection, the service method is run on a seperate thread. Just to be more clear see the log below:

    2008-05-29 14:32:23,544 [RMI TCP Connection(2)-10.132.3.103] DEBUG service.InjectorServiceImpl - In InjectorServiceImpl.insertRecord()
    2008-05-29 14:32:23,544 [RMI TCP Connection(2)-10.132.3.103] DEBUG service.InjectorServiceImpl - Out InjectorServiceImpl.insertRecord()
    2008-05-29 14:32:23,544 [RMI TCP Connection(2)-10.132.3.103] DEBUG service.InjectorServiceImpl - In InjectorServiceImpl.insertRecord()
    2008-05-29 14:32:23,544 [RMI TCP Connection(2)-10.132.3.103] DEBUG service.InjectorServiceImpl - Out InjectorServiceImpl.insertRecord()
    2008-05-29 14:32:23,559 [RMI TCP Connection(2)-10.132.3.103] DEBUG service.InjectorServiceImpl - In InjectorServiceImpl.insertRecord()
    2008-05-29 14:32:23,559 [RMI TCP Connection(2)-10.132.3.103] DEBUG service.InjectorServiceImpl - Out InjectorServiceImpl.insertRecord()
    2008-05-29 14:32:23,559 [RMI TCP Connection(2)-10.132.3.103] DEBUG service.InjectorServiceImpl - In InjectorServiceImpl.insertRecord()
    2008-05-29 14:32:23,559 [RMI TCP Connection(2)-10.132.3.103] DEBUG service.InjectorServiceImpl - Out InjectorServiceImpl.insertRecord()
    2008-05-29 14:32:23,559 [RMI TCP Connection(2)-10.132.3.103] DEBUG service.InjectorServiceImpl - In InjectorServiceImpl.insertRecord()
    2008-05-29 14:32:23,575 [RMI TCP Connection(2)-10.132.3.103] DEBUG service.InjectorServiceImpl - Out InjectorServiceImpl.insertRecord()
    2008-05-29 14:32:23,575 [RMI TCP Connection(4)-10.132.3.103] DEBUG service.InjectorServiceImpl - In InjectorServiceImpl.insertRecord()

    The above log is from the RMI service. The Service has a public method called "insertRecord()". Using a client application we are calling this method in a loop. As you can see all the request get handled in a thread named "RMI TCP Connection(2)-10.132.3.103" except the last one. As you can see suddenly without we (as in the client) requesting any re-connection, the server thread on which the invocation happens is changed. The last invocation has happened on thread "RMI TCP Connection(4)-10.132.3.103".

    As our service is stateful, this breaks this service. As the "RMI TCP Connection(4)-10.132.3.103" thread has not been "initialized" it throws exception. Does anyone have any idea on why this is happening and if this is normal behavior for Spring?

    - Sanjay

  • #2
    什么意思?我都吾知道你想讲咩喔

    Comment

    Working...
    X