Patent ID: 7739391

Claim:
A method for operating a gateway for wireless mobile clients in a messaging system, the messaging system being configured to comprise a plurality of mobile wireless clients, a core messaging system and at least one gateway process or gateway, the gateway acting as a proxy on behalf of the clients and, in the course of normal operation of the messaging system, maintaining sessions by performing the steps of: the gateway receiving inbound messages from the clients over wireless bearers using a wireless protocol and forwarding said inbound messages to the core messaging system over a connection using a wirebound protocol; the gateway receiving outbound messages from the core messaging system over a connection using a wirebound protocol and forwarding said outbound messages to the clients over wireless bearers using a wireless protocol; the method further comprising the step of the gateway storing a session context, which session context comprises the status of a session established between the core messaging system and one of the clients, a state of the client connection associated with the session, and a session identifier which is unique to the session; the method further comprising the steps of: the gateway receiving a connection request from a client, the connection request comprising a session identifier; the gateway checking whether a stored session context exists that comprises the same session identifier; if such a stored session context exists, the gateway checking a status of the session represented by said stored session context; if the status indicates that the session is already running, the gateway informing the client that the connection request is rejected; wherein the step of checking the status of the session represented by said stored session context comprises the steps of: the gateway initiating a lock operation on said session context; if the lock operation does not succeed, the gateway informing the client that the connection request is rejected; if the lock operation succeeds, the gateway locking the session context, thus preventing other process threads and optionally also other gateways from accessing the session context.