REQUIREMENT engine.qos.login.session |
Type | NEW |
Priority | MEDIUM |
Status | CLOSED |
Topic | Clients of XmlBlaster can use configurable session parameters on login | ||||||||||||||||||||||||||||
Des cription |
The login mode is session based. This allows multiple logins for the same client. The logins are distinguished by a unique, random session ID. Clients login to xmlBlaster with the connect() method. They deliver a ConnectQos - a XML based quality of service string describing their configuration. A client session has a default duration of 24 hours (this is configurable). Every client request (like publish(), subscribe() etc.) refreshes the duration of the session. After 24 hours of inactivity the session expires.
Note that client callbacks don't refresh the session timer. If you
have a client which does only subscribe and does no other activities
you need to set the session timeout to indefinitely or you need to
call early enough xmlBlasterAccess.refreshSession() or
a faked invocation like get() to avoid that the subscriber
is suddenly disconnected.
On the other hand, this can be used to limit the life span of a subscribe. Every client may have a maximum of 10 sessions, other values are configurable. On demand a connect() can kill all other sessions of this client. If the maximum is reached, an XmlBlasterException is thrown on login. XmlBlaster allows to check clients with a ping to the callback server. The ping frequency is adjustable at login time by the client itself. A client session disappears when it does a logout or on failure (ping() or update() fails after configured retry attempts) or on session-timeout or when clearSessions='true' is set. Interested parties can subscribe on Login/Logout events, to find out if a client arrives or disappears. This needs to be configured using the admin.events plugin. |
||||||||||||||||||||||||||||
Example Java |
<!-- Simple QoS of the connect() method, this raw string is delivered to xmlBlaster --> <qos> <securityService type="simple" version="1.0"> <!-- protected by CDATA --> <user>michele</user> <passwd>secret</passwd> </securityService> <session timeout='3600000' maxSessions='20' clearSessions='false'/> <callback type='XMLRPC' sessionId='sldg03loQ22'> http:/www.mars.universe:8080/RPC2 </callback> </qos> |
||||||||||||||||||||||||||||
Configure |
These parameters allow to configure the xmlBlaster server default behavior.
These parameters can be specified on client side with java clients (see ConnectQos API). Other programming languages need to supply these setting with a raw XML string (see example section above).
NOTE: Configuration parameters are specified on command line (-someValue 17) or in the
xmlBlaster.properties file (someValue=17). See requirement "util.property" for details. |
||||||||||||||||||||||||||||
See REQ | protocol | ||||||||||||||||||||||||||||
See REQ | engine.callback | ||||||||||||||||||||||||||||
See REQ | engine.qos.login.callback | ||||||||||||||||||||||||||||
See REQ | util.property | ||||||||||||||||||||||||||||
See REQ | util.property.args | ||||||||||||||||||||||||||||
See REQ | util.property.env | ||||||||||||||||||||||||||||
See API | org.xmlBlaster.client.qos.ConnectQos | ||||||||||||||||||||||||||||
See TEST | org.xmlBlaster.test.authentication.TestSession |
This page is generated from the requirement XML file xmlBlaster/doc/requirements/engine.qos.login.session.xml